Bug#739631: [Help] Bug#739631: python-pysam: FTBFS: ImportError: No module named pysam
Hi Piotr, On Fri, Feb 21, 2014 at 02:42:37PM +0100, Piotr Ożarowski wrote: > /me continues promoting pybuild: Thanks for this nice promotion demo - it worked nicely. Thanks for the patch Andreas. PS: What is the best place to read about this in the first place. -- http://fam-tille.de -- To UNSUBSCRIBE, email to debian-bugs-rc-requ...@lists.debian.org with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org
Bug#739631: [Help] Bug#739631: python-pysam: FTBFS: ImportError: No module named pysam
/me continues promoting pybuild: -- Piotr Ożarowski Debian GNU/Linux Developer www.ozarowski.pl www.griffith.cc www.debian.org GPG Fingerprint: 1D2F A898 58DA AF62 1786 2DF7 AEF6 F1A2 A745 7645 diff --git a/debian/control b/debian/control index 8699486..c9acaaf 100644 --- a/debian/control +++ b/debian/control @@ -6,6 +6,7 @@ Section: python XS-Testsuite: autopkgtest Priority: optional Build-Depends: debhelper (>= 9), + dh-python, python-all-dev, python-setuptools, cython, diff --git a/debian/rules b/debian/rules index 50d4cad..aaf270f 100755 --- a/debian/rules +++ b/debian/rules @@ -1,19 +1,12 @@ #!/usr/bin/make -f -# Hint: -# https://wiki.debian.org/Python/LibraryStyleGuide -# suggests: export PYBUILD_NAME=pysam -# which probably does not harm but due to the fact that there is -# some additional binary package a debian/python-pysam.install -# file is definitely needed. DEBPKGNAME := $(shell dpkg-parsechangelog | awk '/^Source:/ {print $$2}') TESTPKG:= $(DEBPKGNAME)-tests -pybuilddir := $(CURDIR)/build/lib.$(shell dpkg-architecture -qDEB_BUILD_ARCH_OS)-$(shell dpkg-architecture -qDEB_BUILD_GNU_CPU) %: - dh $@ --with python2 + dh $@ --with python2 --buildsystem=pybuild # Cython is recreating some c-files. To enable building twice in a row these # will be saved in advance and restored afterwards @@ -33,14 +26,10 @@ override_dh_auto_build: debian/savefiles dh_auto_build override_dh_auto_test: - dh_auto_test - chmod a+x tests/pysam_test_offline.py -ifeq (,$(filter nocheck,$(DEB_BUILD_OPTIONS))) - set -e -x;\ - for pyv in `pyversions -dv` ; do \ - cd tests && env PYTHONPATH=$(pybuilddir)-$${pyv} ./pysam_test_offline.py ; \ - done -endif + dh_auto_test # default tests + PYBUILD_SYSTEM=custom \ + PYBUILD_TEST_ARGS="cd tests && PYTHONPATH={build_dir} {interpreter} ./pysam_test_offline.py" \ + dh_auto_test --buildsystem=pybuild override_dh_install-indep: dh_install -p $(TESTPKG)
Bug#739631: [Help] Bug#739631: python-pysam: FTBFS: ImportError: No module named pysam
Hi Jacub, On Thu, Feb 20, 2014 at 06:44:00PM +0100, Jakub Wilk wrote: > | running build > | running build_py > | creating build > | creating build/lib.linux-i686-2.7 > | creating build/lib.linux-i686-2.7/pysam > [...] > | + env > PYTHONPATH=/build/python-pysam-fLMqAQ/python-pysam-0.7.5/build/lib.linux-i486-2.7 > ./pysam_test_offline.py > | Traceback (most recent call last): > | File "./pysam_test_offline.py", line 8, in > | import pysam > | ImportError: No module named pysam > | make[1]: *** [override_dh_auto_test] Error 1 > > So setup.py installed stuff to "build/lib.linux-i686-2.7", but > PYTHONPATH is set to "build/lib.linux-i486-2.7". I think I understood the problem ... > /usr/share/python/python.mk defines a macro for determining build > directory. You might want to use it. :) ... but not the suggested solution. I tried: $ git diff debian/rules diff --git a/debian/rules b/debian/rules index 50d4cad..073f3b1 100755 --- a/debian/rules +++ b/debian/rules @@ -10,7 +10,8 @@ export PYBUILD_NAME=pysam DEBPKGNAME := $(shell dpkg-parsechangelog | awk '/^Source:/ {print $$2}') TESTPKG:= $(DEBPKGNAME)-tests -pybuilddir := $(CURDIR)/build/lib.$(shell dpkg-architecture -qDEB_BUILD_ARCH_OS)-$(shell dpkg-architecture -qDEB_BUILD_GNU_CPU) + +include /usr/share/python/python.mk %: dh $@ --with python2 @@ -38,7 +39,7 @@ override_dh_auto_test: ifeq (,$(filter nocheck,$(DEB_BUILD_OPTIONS))) set -e -x;\ for pyv in `pyversions -dv` ; do \ - cd tests && env PYTHONPATH=$(pybuilddir)-$${pyv} ./pysam_test_offline.py ; \ + cd tests && env PYTHONPATH=$(py_builddir) ./pysam_test_offline.py ; \ done endif which leads to: dh_auto_test chmod a+x tests/pysam_test_offline.py set -e -x;\ for pyv in `pyversions -dv` ; do \ cd tests && env PYTHONPATH=build/lib.linux-x86_64-2.7 ./pysam_test_offline.py ; \ done + pyversions -dv + cd tests + env PYTHONPATH=build/lib.linux-x86_64-2.7 ./pysam_test_offline.py Traceback (most recent call last): File "./pysam_test_offline.py", line 8, in import pysam ImportError: No module named pysam So how exactly do you want me to use a variable from /usr/share/python/python.mk? Kind regards Andreas. -- http://fam-tille.de -- To UNSUBSCRIBE, email to debian-bugs-rc-requ...@lists.debian.org with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org
Bug#739631: [Help] Bug#739631: python-pysam: FTBFS: ImportError: No module named pysam
* Andreas Tille , 2014-02-20, 18:04: dh_auto_test chmod a+x tests/pysam_test_offline.py set -e -x;\ for pyv in `pyversions -dv` ; do \ cd tests && env PYTHONPATH=/«PKGBUILDDIR»/build/lib.«ARCH»-${pyv} ./pysam_test_offline.py ; \ done + pyversions -dv + cd tests + env PYTHONPATH=/«PKGBUILDDIR»/build/lib.«ARCH»-2.7 ./pysam_test_offline.py Traceback (most recent call last): File "./pysam_test_offline.py", line 8, in import pysam ImportError: No module named pysam make[1]: *** [override_dh_auto_test] Error 1 make[1]: Leaving directory `/«PKGBUILDDIR»' make: *** [build-arch] Error 2 Obfuscated build logs are not very helpful. :| Here's an actual build log snippet for i386: | dh_auto_build | running build | running build_py | creating build | creating build/lib.linux-i686-2.7 | creating build/lib.linux-i686-2.7/pysam [...] | + env PYTHONPATH=/build/python-pysam-fLMqAQ/python-pysam-0.7.5/build/lib.linux-i486-2.7 ./pysam_test_offline.py | Traceback (most recent call last): | File "./pysam_test_offline.py", line 8, in | import pysam | ImportError: No module named pysam | make[1]: *** [override_dh_auto_test] Error 1 So setup.py installed stuff to "build/lib.linux-i686-2.7", but PYTHONPATH is set to "build/lib.linux-i486-2.7". /usr/share/python/python.mk defines a macro for determining build directory. You might want to use it. :) -- Jakub Wilk -- To UNSUBSCRIBE, email to debian-bugs-rc-requ...@lists.debian.org with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org
Bug#739631: [Help] Bug#739631: python-pysam: FTBFS: ImportError: No module named pysam
Hi, I have built the package in pbuilder and wonder why it does not build in autobuilders. Any clue? The package is maintained at git://anonscm.debian.org/debian-med/python-pysam.git Any hint is welcome Andreas. - Forwarded message from "Aaron M. Ucko" - Date: Thu, 20 Feb 2014 11:17:53 -0500 From: "Aaron M. Ucko" To: Debian Bug Tracking System Subject: Bug#739631: python-pysam: FTBFS: ImportError: No module named pysam X-Debian-PR-Message: report 739631 X-Debian-PR-Package: src:python-pysam X-Debian-PR-Keywords: X-Debian-PR-Source: python-pysam Source: python-pysam Version: 0.7.5-1 Severity: serious Justification: fails to build from source Builds of python-pysam in minimal environments (as on the autobuilders) have been failing: dh_auto_test chmod a+x tests/pysam_test_offline.py set -e -x;\ for pyv in `pyversions -dv` ; do \ cd tests && env PYTHONPATH=/«PKGBUILDDIR»/build/lib.«ARCH»-${pyv} ./pysam_test_offline.py ; \ done + pyversions -dv + cd tests + env PYTHONPATH=/«PKGBUILDDIR»/build/lib.«ARCH»-2.7 ./pysam_test_offline.py Traceback (most recent call last): File "./pysam_test_offline.py", line 8, in import pysam ImportError: No module named pysam make[1]: *** [override_dh_auto_test] Error 1 make[1]: Leaving directory `/«PKGBUILDDIR»' make: *** [build-arch] Error 2 Could you please take a look, and ensure that PYTHONPATH covers pysam's Python files, not just the extensions that support them? Thanks! ___ Debian-med-packaging mailing list debian-med-packag...@lists.alioth.debian.org http://lists.alioth.debian.org/cgi-bin/mailman/listinfo/debian-med-packaging - End forwarded message - -- http://fam-tille.de -- To UNSUBSCRIBE, email to debian-bugs-rc-requ...@lists.debian.org with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org