Message ID | 1392756013-27757-7-git-send-email-thomas.petazzoni@free-electrons.com |
---|---|
State | Rejected |
Headers | show |
>>>>> "Thomas" == Thomas Petazzoni <thomas.petazzoni@free-electrons.com> writes: > From: "kpa_info@yahoo.fr" <kpa_info@yahoo.fr> > When using host python to install an external module, the setup tool > look for some files in python3.3/config/. The python3 package config > directory is called config-3.3m. This is why we need to alias config > to config-3.3m. > [Thomas: use PYTHON3_VERSION_MAJOR instead of hardcoding 3.3, update > commit title.] > Signed-off-by: Patrick Gerber <kpa_info@yahoo.fr> > Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com> > --- > package/python3/python3.mk | 11 ++++++++++- > 1 file changed, 10 insertions(+), 1 deletion(-) > diff --git a/package/python3/python3.mk b/package/python3/python3.mk > index ba72e75..d98ca38 100644 > --- a/package/python3/python3.mk > +++ b/package/python3/python3.mk > @@ -163,7 +163,16 @@ define HOST_PYTHON3_INSTALL_SYMLINK > ln -fs python3 $(HOST_DIR)/usr/bin/python > endef > -HOST_PYTHON3_POST_INSTALL_HOOKS += HOST_PYTHON3_INSTALL_SYMLINK > +# Alias the python<version>/config-<version>m to python<version>/config > +# This is needed when installing an external python module, because > +# the setup is looking for files in python<version>/config/ > +define HOST_PYTHON3_INSTALL_CONFIG_SYMLINK > + ln -fs config-$(PYTHON3_VERSION_MAJOR)m $(HOST_DIR)/usr/lib/python$(PYTHON3_VERSION_MAJOE)config Ehh, shouldn't this be ..$(HOST_DIR)/usr/lib/python$(PYTHON3_VERSION_MAJOR)/config? As you didn't notice, perhaps the symlink isn't really needed after all?
Dear Peter Korsgaard, On Tue, 18 Feb 2014 22:56:55 +0100, Peter Korsgaard wrote: > > -HOST_PYTHON3_POST_INSTALL_HOOKS += HOST_PYTHON3_INSTALL_SYMLINK > > +# Alias the python<version>/config-<version>m to python<version>/config > > +# This is needed when installing an external python module, because > > +# the setup is looking for files in python<version>/config/ > > +define HOST_PYTHON3_INSTALL_CONFIG_SYMLINK > > + ln -fs config-$(PYTHON3_VERSION_MAJOR)m $(HOST_DIR)/usr/lib/python$(PYTHON3_VERSION_MAJOE)config > > Ehh, shouldn't this be ..$(HOST_DIR)/usr/lib/python$(PYTHON3_VERSION_MAJOR)/config? > > As you didn't notice, perhaps the symlink isn't really needed after all? I tested without this patch, and indeed, I could build Python 3 and all the external modules that can be enabled with Python 3 without problem. So I believe it may no longer be necessary with the Python 3 bump to 3.4. I have tested, and patches 7 onwards apply without problem if you discard PATCH 6. So I guess there is no need for me to resend the series, you can just continue to apply it starting from PATCH 7, if you don't mind. Thanks! Thomas
>>>>> "Thomas" == Thomas Petazzoni <thomas.petazzoni@free-electrons.com> writes: >> Ehh, shouldn't this be ..$(HOST_DIR)/usr/lib/python$(PYTHON3_VERSION_MAJOR)/config? >> >> As you didn't notice, perhaps the symlink isn't really needed after all? > I tested without this patch, and indeed, I could build Python 3 and all > the external modules that can be enabled with Python 3 without problem. > So I believe it may no longer be necessary with the Python 3 bump to > 3.4. > I have tested, and patches 7 onwards apply without problem if you > discard PATCH 6. So I guess there is no need for me to resend the > series, you can just continue to apply it starting from PATCH 7, if you > don't mind. Ok, thanks. Will do so.
diff --git a/package/python3/python3.mk b/package/python3/python3.mk index ba72e75..d98ca38 100644 --- a/package/python3/python3.mk +++ b/package/python3/python3.mk @@ -163,7 +163,16 @@ define HOST_PYTHON3_INSTALL_SYMLINK ln -fs python3 $(HOST_DIR)/usr/bin/python endef -HOST_PYTHON3_POST_INSTALL_HOOKS += HOST_PYTHON3_INSTALL_SYMLINK +# Alias the python<version>/config-<version>m to python<version>/config +# This is needed when installing an external python module, because +# the setup is looking for files in python<version>/config/ +define HOST_PYTHON3_INSTALL_CONFIG_SYMLINK + ln -fs config-$(PYTHON3_VERSION_MAJOR)m $(HOST_DIR)/usr/lib/python$(PYTHON3_VERSION_MAJOE)config +endef + +HOST_PYTHON3_POST_INSTALL_HOOKS += \ + HOST_PYTHON3_INSTALL_SYMLINK \ + HOST_PYTHON3_INSTALL_CONFIG_SYMLINK $(eval $(autotools-package)) $(eval $(host-autotools-package))