Message ID | 1430836434-24257-1-git-send-email-gwenj@trabucayre.com |
---|---|
State | Accepted |
Headers | show |
>>>>> "Gwenhael" == Gwenhael Goavec-Merou <gwenj@trabucayre.com> writes: > From: Gwenhael Goavec-Merou <gwenhael.goavec-merou@trabucayre.com> > PyQt4 provides two version for some py files: one for python2.x and one for > python3.x. This two versions are installed in TARGET_DIR. > After installing files, python is used to generate all .pyc files, but fails > like : > class ProxyBase(metaclass=ProxyMetaclass): > ^ > SyntaxError: invalid syntax > This is not a package build failure and this fix is only cosmetic. > This patch suppress directory for not targeted python version. Do we have any autobuilder results showing this?
Dear Peter Korsgaard, On Tue, 05 May 2015 17:26:13 +0200, Peter Korsgaard wrote: > > This is not a package build failure and this fix is only cosmetic. > > This patch suppress directory for not targeted python version. > > Do we have any autobuilder results showing this? Read two lines before :-) Thomas
>>>>> "Thomas" == Thomas Petazzoni <thomas.petazzoni@free-electrons.com> writes: > Dear Peter Korsgaard, > On Tue, 05 May 2015 17:26:13 +0200, Peter Korsgaard wrote: >> > This is not a package build failure and this fix is only cosmetic. >> > This patch suppress directory for not targeted python version. >> >> Do we have any autobuilder results showing this? > Read two lines before :-) Doh, seems like I need more coffee.
>>>>> "Gwenhael" == Gwenhael Goavec-Merou <gwenj@trabucayre.com> writes: > From: Gwenhael Goavec-Merou <gwenhael.goavec-merou@trabucayre.com> > PyQt4 provides two version for some py files: one for python2.x and one for > python3.x. This two versions are installed in TARGET_DIR. > After installing files, python is used to generate all .pyc files, but fails > like : > class ProxyBase(metaclass=ProxyMetaclass): > ^ > SyntaxError: invalid syntax > This is not a package build failure and this fix is only cosmetic. > This patch suppress directory for not targeted python version. > Signed-off-by: Gwenhael Goavec-Merou <gwenhael.goavec-merou@trabucayre.com> Sorry, just to be clear - It was the v3 versions I committed.
diff --git a/package/python-pyqt/python-pyqt.mk b/package/python-pyqt/python-pyqt.mk index c151dfd..d6587a8 100644 --- a/package/python-pyqt/python-pyqt.mk +++ b/package/python-pyqt/python-pyqt.mk @@ -14,8 +14,10 @@ PYTHON_PYQT_DEPENDENCIES = python-sip host-python-sip qt ifeq ($(BR2_PACKAGE_PYTHON),y) PYTHON_PYQT_PYTHON_DIR = python$(PYTHON_VERSION_MAJOR) +PYTHON_PYQT_RM_PORT_BASE = port_v3 else ifeq ($(BR2_PACKAGE_PYTHON3),y) PYTHON_PYQT_PYTHON_DIR = python$(PYTHON3_VERSION_MAJOR) +PYTHON_PYQT_RM_PORT_BASE = port_v2 endif ifeq ($(BR2_PACKAGE_QT_EMBEDDED),y) @@ -104,6 +106,7 @@ endef define PYTHON_PYQT_INSTALL_TARGET_CMDS $(TARGET_MAKE_ENV) $(TARGET_CONFIGURE_OPTS) $(MAKE) -C $(@D) install touch $(TARGET_DIR)/usr/lib/$(PYTHON_PYQT_PYTHON_DIR)/site-packages/PyQt4/__init__.py + $(RM) -rf $(TARGET_DIR)/usr/lib/$(PYTHON_PYQT_PYTHON_DIR)/site-packages/PyQt4/uic/$(PYTHON_PYQT_RM_PORT_BASE) PYTHONPATH="$(PYTHON_PATH)" \ $(HOST_DIR)/usr/bin/python -c "import compileall; \ compileall.compile_dir('$(TARGET_DIR)/usr/lib/$(PYTHON_PYQT_PYTHON_DIR)/site-packages/PyQt4')"