[Python-modules-commits] [pyqt5] 01/02: Install files to temporary location to be able for building arch-indep packages.

Dmitry Shachnev mitya57 at moszumanska.debian.org
Fri Aug 12 07:25:31 UTC 2016


This is an automated email from the git hooks/post-receive script.

mitya57 pushed a commit to branch master
in repository pyqt5.

commit 25cfeb915003aa5f2c42b6f3b6996b400d1e7a6a
Author: Dmitry Shachnev <mitya57 at gmail.com>
Date:   Fri Aug 12 10:23:23 2016 +0300

    Install files to temporary location to be able for building arch-indep packages.
---
 debian/changelog         |  4 ++--
 debian/control           |  1 +
 debian/pyqt5-dev.install |  2 +-
 debian/rules             | 18 ++++++++++++++----
 4 files changed, 18 insertions(+), 7 deletions(-)

diff --git a/debian/changelog b/debian/changelog
index 875413a..01f380f 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -9,10 +9,10 @@ pyqt5 (5.7+dfsg-1) UNRELEASED; urgency=medium
   * Update for upstream changes to pyrcc5 and pylupdate5:
     - Add new files to debian/pyqt5-dev-tools.install.
     - Fix shebangs in /usr/bin/pylupdate5 and /usr/bin/pyrcc5 files.
+    - Call make install to temporary location to be able to run pyrcc5.
   * Use --no-sip-files configure option instead of removing the .sip files
     after they are installed.
-  * Remove useless dependency of build-indep on default Python build stamp,
-    to avoid compiling the code during arch-indep builds.
+  * Only ship files installed by upstream build system in pyqt5-dev.
 
  -- Dmitry Shachnev <mitya57 at debian.org>  Thu, 04 Aug 2016 21:26:03 +0300
 
diff --git a/debian/control b/debian/control
index 613f671..2bd64f8 100644
--- a/debian/control
+++ b/debian/control
@@ -61,6 +61,7 @@ Package: pyqt5-dev-tools
 Depends: python3,
          python3-pyqt5 (= ${binary:Version}),
          ${misc:Depends},
+         ${python3:Depends},
          ${shlibs:Depends}
 Architecture: any
 Description: Development tools for PyQt5
diff --git a/debian/pyqt5-dev.install b/debian/pyqt5-dev.install
index 88fcb0f..21d3c44 100644
--- a/debian/pyqt5-dev.install
+++ b/debian/pyqt5-dev.install
@@ -1 +1 @@
-sip/* usr/share/sip/PyQt5
+usr/share/sip/PyQt5/
diff --git a/debian/rules b/debian/rules
index 74e8dd7..0cd1968 100755
--- a/debian/rules
+++ b/debian/rules
@@ -58,8 +58,7 @@ build-%/configure-stamp:
 			-m $(shell python$*-config --configdir) \
 			-d /usr/lib/python$*/dist-packages \
 			--sip-incdir /usr/include/python$*$(if $(filter 3.%, $*),m,) \
-			$(if $(filter $(DEFAULT_PYTHON),$*),,--no-designer-plugin --no-qml-plugin --no-tools) \
-			--no-sip-files
+			$(if $(filter $(DEFAULT_PYTHON),$*),,--no-designer-plugin --no-qml-plugin --no-tools --no-sip-files)
 	sed -i '/strip/d' build-$*/*/Makefile
 	touch $@
 
@@ -79,7 +78,7 @@ dbg-build-%/configure-stamp:
 
 build: build-arch build-indep
 build-arch: $(ALLPYTHONS:%=build-%/build-stamp) $(ALLPYTHONS:%=dbg-build-%/build-stamp)
-build-indep:
+build-indep: build-$(DEFAULT_PYTHON)/build-stamp
 
 build-%/build-stamp: build-%/configure-stamp
 	dh_testdir
@@ -95,15 +94,25 @@ install-indep: build-indep
 	dh_testdir
 	dh_testroot
 	dh_prep -i
+
+	# Install the files to temporary location to be able to use pyrcc5 below
+	mkdir -p tmp_install_root
+	$(MAKE) -C build-$(DEFAULT_PYTHON) install INSTALL_ROOT=$(CURDIR)/tmp_install_root
+
+	# Install the sip files generated by make install
+	mkdir -p debian/tmp/usr/share/
+	mv tmp_install_root/usr/share/sip/ debian/tmp/usr/share/
+
 	dh_installdirs -i
 	dh_install -i --fail-missing
 	dh_installexamples -Xactiveqt -i
 	# Use python3 shebangs and regenerate resource files
+	export PYTHONPATH=$(CURDIR)/tmp_install_root/usr/lib/python$(DEFAULT_PYTHON)/dist-packages; \
 	cd $(CURDIR)/debian/pyqt5-examples/usr/share/doc/pyqt5-examples/examples/; \
 		cp /usr/share/javascript/jquery/jquery.min.js webkit/fancybrowser/; \
 		find . -name '*.py' -exec sed -i 's/\/env python/\/python3/g' {} +; \
 		find . -name '*.qrc' | sed 's/\.qrc//g' | xargs -I {} \
-		$(CURDIR)/build-$(DEFAULT_PYTHON)/pyrcc/pyrcc5 {}.qrc -o {}_rc.py
+		$(CURDIR)/tmp_install_root/usr/bin/pyrcc5 {}.qrc -o {}_rc.py
 	# Symlink duplicate files in examples. Based on Andrew Starr-Bochicchio's
 	# code in ubuntu-packaging-guide.
 	cd $(CURDIR)/debian/pyqt5-examples && \
@@ -237,6 +246,7 @@ clean:
 	dh_testdir
 	dh_testroot
 	rm -rf $(ALLPYTHONS:%=build-%) $(ALLPYTHONS:%=dbg-build-%)
+	rm -rf tmp_install_root
 	find . -type f -name .DS_Store -delete
 	find . -type f -name *.pyc -delete
 	find . -type d -name __pycache__ -delete

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/python-modules/packages/pyqt5.git



More information about the Python-modules-commits mailing list