python3: use proper PYTHON3_VERSION_MAJOR instead of harcoding 3.3
authorThomas Petazzoni <thomas.petazzoni@free-electrons.com>
Tue, 18 Feb 2014 20:40:00 +0000 (21:40 +0100)
committerPeter Korsgaard <peter@korsgaard.com>
Tue, 18 Feb 2014 22:21:34 +0000 (23:21 +0100)
Some parts of python3.mk were hardcoding the 3.3 version as the major
version, which does not work for Python 3.4 and other future
versions. Instead, use the existing PYTHON3_VERSION_MAJOR.

Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
Signed-off-by: Peter Korsgaard <peter@korsgaard.com>
package/python3/python3.mk

index ba72e753290c37ff19092e94ced935ecd2040ca0..2773a1203b7685858b66f05fc94e46361d78bac3 100644 (file)
@@ -127,7 +127,7 @@ PYTHON3_MAKE_ENV = \
 # trouble for cross compilation
 define PYTHON3_FIXUP_LIBDIR
        $(SED) 's|^LIBDIR=.*|LIBDIR= $(STAGING_DIR)/usr/lib|' \
-          $(STAGING_DIR)/usr/lib/python$(PYTHON3_VERSION_MAJOR)/config-3.3m/Makefile
+          $(STAGING_DIR)/usr/lib/python$(PYTHON3_VERSION_MAJOR)/config-$(PYTHON3_VERSION_MAJOR)m/Makefile
 endef
 
 PYTHON3_POST_INSTALL_STAGING_HOOKS += PYTHON3_FIXUP_LIBDIR
@@ -141,7 +141,7 @@ define PYTHON3_REMOVE_USELESS_FILES
        rm -f $(TARGET_DIR)/usr/bin/python$(PYTHON3_VERSION_MAJOR)m-config
        rm -f $(TARGET_DIR)/usr/bin/python3-config
        rm -f $(TARGET_DIR)/usr/bin/smtpd.py.3
-       for i in `find $(TARGET_DIR)/usr/lib/python$(PYTHON3_VERSION_MAJOR)/config-3.3m/ \
+       for i in `find $(TARGET_DIR)/usr/lib/python$(PYTHON3_VERSION_MAJOR)/config-$(PYTHON3_VERSION_MAJOR)m/ \
                -type f -not -name pyconfig.h -a -not -name Makefile` ; do \
                rm -f $$i ; \
        done