E: dh_python2:146: you most probably have to build extension for python2.5.
Hello,
I moved my package pykcs11 [1] from dh_pycentral to dh_python2. The
conversion was easy. The version in unstable uses dh_python2.
I also wanted to move my debian/rules file from the "heavy" version
[2] to the minimal version using:
#!/usr/bin/make -f
%:
dh $@ --with python2
But I now get a warning and an error (complete log attached):
[...]
dh_python2
W: dh_python2:94: Python 2.6 should install files in
/usr/lib/python2.6/dist-packages/. Did you forget
"--install-layout=deb"?
E: dh_python2:146: you most probably have to build extension for python2.5.
make: *** [binary] Error 12
My package provides a binary extension so must be compiled for each
supported Python versions: 2.5 and 2.6 as of now.
My debian/control file [3] is:
Source: pykcs11
Priority: optional
Maintainer: Ludovic Rousseau <rousseau@debian.org>
Uploaders: Debian Python Modules Team
<python-modules-team@lists.alioth.debian.org>, David Smith
<davidsmith@acm.org>
Build-Depends: debhelper (>= 7.0.0), swig, python-all-dev (>= 2.6.6-3)
Standards-Version: 3.9.1
Section: python
Vcs-Svn: svn://svn.debian.org/python-modules/packages/pykcs11/trunk
Vcs-Browser: http://svn.debian.org/viewsvn/python-modules/packages/pykcs11/trunk/
Homepage: http://www.bit4id.org/trac/pykcs11/
Package: python-pykcs11
Architecture: any
Depends: ${shlibs:Depends}, ${misc:Depends}, ${python:Depends}
Provides: ${python:Provides}
Description: PKCS#11 wrapper for Python
PyKCS11 let you access to almost all PKCS#11 functions and data types using
any PKCS#11 library, such as the various modules supplied by smartcard
vendors.
.
The wrapper comes with 2 interfaces: a low level and very thin interface over
the original PKCS#11 API, generated using the SWIG compiler (designed for
library tests); and an high level interface that offers a simpler access (with
few limits) to the PKCS#11 APIs.
Is there an easy way to build for 2 versions of Python using dh?
Should I just care about the latest python 2.x version since we should
only have one python 2.x version in wheezy (2.7)?
I tried to change:
Build-Depends: [...], python-all-dev (>= 2.6.6-3)
to
Build-Depends: [...], python-dev (>= 2.6.6-3)
but I still have the same error.
I even tried to remove python2.5 but still the same error :-(
Any idea?
Thanks
[1] http://packages.debian.org/sid/python-pykcs11
[2] http://svn.debian.org/viewsvn/python-modules/packages/pykcs11/trunk/debian/rules?view=markup
[3] http://svn.debian.org/viewsvn/python-modules/packages/pykcs11/trunk/debian/control?view=markup
--
Dr. Ludovic Rousseau
origDir: ../../tarballs
Complete layout information:
buildArea=/home/rousseau/Sources/Debian/SVN/pykcs11/build-area
origDir=../../tarballs
tagsDir=/home/rousseau/Sources/Debian/SVN/pykcs11/tags
tagsUrl=svn+ssh://svn.debian.org/svn/python-modules/packages/pykcs11/tags
trunkDir=/home/rousseau/Sources/Debian/SVN/pykcs11/trunk
trunkUrl=svn+ssh://svn.debian.org/svn/python-modules/packages/pykcs11/trunk
dpkg-checkbuilddeps
UNRELEASED tag found - you don't want to release with it, do you?
/home/rousseau/Sources/Debian/SVN/pykcs11/build-area/pykcs11-1.2.3 exists, renaming to /home/rousseau/Sources/Debian/SVN/pykcs11/build-area/pykcs11-1.2.3.obsolete.0.654689672011049
mergeWithUpstream mode detected, looking for ../../tarballs/pykcs11_1.2.3.orig.tar.gz
I: mergeWithUpstream property set, looking for upstream source tarball...
tar --no-same-owner --no-same-permissions --extract --gzip --file /home/rousseau/Sources/Debian/SVN/tarballs/pykcs11_1.2.3.orig.tar.gz --directory /home/rousseau/Sources/Debian/SVN/pykcs11/build-area/tmp-0.210841780386062
mv /home/rousseau/Sources/Debian/SVN/pykcs11/build-area/tmp-0.210841780386062/PyKCS11-1.2.3 /home/rousseau/Sources/Debian/SVN/pykcs11/build-area/pykcs11-1.2.3
svn --force export /home/rousseau/Sources/Debian/SVN/pykcs11/trunk /home/rousseau/Sources/Debian/SVN/pykcs11/build-area/pykcs11-1.2.3
Export complete.
rm -rf /home/rousseau/Sources/Debian/SVN/pykcs11/build-area/tmp-0.210841780386062
chmod -R u+r+w+X,g+r-w+X,o+r-w+X -- /home/rousseau/Sources/Debian/SVN/pykcs11/build-area/pykcs11-1.2.3
dpkg-buildpackage -rfakeroot
dpkg-buildpackage: export CFLAGS from dpkg-buildflags (origin: vendor): -g -O2
dpkg-buildpackage: export CPPFLAGS from dpkg-buildflags (origin: vendor):
dpkg-buildpackage: export CXXFLAGS from dpkg-buildflags (origin: vendor): -g -O2
dpkg-buildpackage: export FFLAGS from dpkg-buildflags (origin: vendor): -g -O2
dpkg-buildpackage: export LDFLAGS from dpkg-buildflags (origin: vendor):
dpkg-buildpackage: source package pykcs11
dpkg-buildpackage: source version 1.2.3-4
dpkg-buildpackage: source changed by Ludovic Rousseau <rousseau@debian.org>
dpkg-source --before-build pykcs11-1.2.3
dpkg-buildpackage: host architecture amd64
fakeroot debian/rules clean
dh clean --with python2
dh_testdir
dh_auto_clean
make[1]: Entering directory `/home/rousseau/Sources/Debian/SVN/pykcs11/build-area/pykcs11-1.2.3'
python setup.py clean
running clean
rm -f src/unix_pykcs11_wrap.cpp
rm -rf build
rm -f *.pyc PyKCS11/*.pyc
rm -f PyKCS11/LowLevel.py
rm -f build-stamp
make[1]: Leaving directory `/home/rousseau/Sources/Debian/SVN/pykcs11/build-area/pykcs11-1.2.3'
dh_clean
dpkg-source -b pykcs11-1.2.3
dpkg-source: info: using source format `3.0 (quilt)'
dpkg-source: info: building pykcs11 using existing ./pykcs11_1.2.3.orig.tar.gz
dpkg-source: warning: ignoring deletion of file src/unix_pykcs11_wrap.cpp
dpkg-source: warning: ignoring deletion of file PyKCS11/LowLevel.py
dpkg-source: info: building pykcs11 in pykcs11_1.2.3-4.debian.tar.gz
dpkg-source: info: building pykcs11 in pykcs11_1.2.3-4.dsc
debian/rules build
dh build --with python2
dh_testdir
dh_auto_configure
dh_auto_build
make[1]: Entering directory `/home/rousseau/Sources/Debian/SVN/pykcs11/build-area/pykcs11-1.2.3'
touch src/pykcs11.i
cd src ; swig -c++ -python pykcs11.i ; mv pykcs11_wrap.cxx unix_pykcs11_wrap.cpp ; mv LowLevel.py ../PyKCS11
python setup.py build
running build
running build_py
creating build
creating build/lib.linux-x86_64-2.6
creating build/lib.linux-x86_64-2.6/PyKCS11
copying PyKCS11/__init__.py -> build/lib.linux-x86_64-2.6/PyKCS11
copying PyKCS11/LowLevel.py -> build/lib.linux-x86_64-2.6/PyKCS11
running build_ext
building 'PyKCS11._LowLevel' extension
creating build/temp.linux-x86_64-2.6
creating build/temp.linux-x86_64-2.6/src
gcc -pthread -fno-strict-aliasing -DNDEBUG -g -fwrapv -O2 -Wall -Wstrict-prototypes -g -O2 -fPIC -Isrc -I/usr/local/include -I/usr/include/python2.6 -c src/ck_attribute_smart.cpp -o build/temp.linux-x86_64-2.6/src/ck_attribute_smart.o
cc1plus: warning: command line option "-Wstrict-prototypes" is valid for Ada/C/ObjC but not for C++
gcc -pthread -fno-strict-aliasing -DNDEBUG -g -fwrapv -O2 -Wall -Wstrict-prototypes -g -O2 -fPIC -Isrc -I/usr/local/include -I/usr/include/python2.6 -c src/pkcs11lib.cpp -o build/temp.linux-x86_64-2.6/src/pkcs11lib.o
cc1plus: warning: command line option "-Wstrict-prototypes" is valid for Ada/C/ObjC but not for C++
gcc -pthread -fno-strict-aliasing -DNDEBUG -g -fwrapv -O2 -Wall -Wstrict-prototypes -g -O2 -fPIC -Isrc -I/usr/local/include -I/usr/include/python2.6 -c src/pykcs11string.cpp -o build/temp.linux-x86_64-2.6/src/pykcs11string.o
cc1plus: warning: command line option "-Wstrict-prototypes" is valid for Ada/C/ObjC but not for C++
gcc -pthread -fno-strict-aliasing -DNDEBUG -g -fwrapv -O2 -Wall -Wstrict-prototypes -g -O2 -fPIC -Isrc -I/usr/local/include -I/usr/include/python2.6 -c src/utility.cpp -o build/temp.linux-x86_64-2.6/src/utility.o
cc1plus: warning: command line option "-Wstrict-prototypes" is valid for Ada/C/ObjC but not for C++
gcc -pthread -fno-strict-aliasing -DNDEBUG -g -fwrapv -O2 -Wall -Wstrict-prototypes -g -O2 -fPIC -Isrc -I/usr/local/include -I/usr/include/python2.6 -c src/pykcs11.cpp -o build/temp.linux-x86_64-2.6/src/pykcs11.o
cc1plus: warning: command line option "-Wstrict-prototypes" is valid for Ada/C/ObjC but not for C++
gcc -pthread -fno-strict-aliasing -DNDEBUG -g -fwrapv -O2 -Wall -Wstrict-prototypes -g -O2 -fPIC -Isrc -I/usr/local/include -I/usr/include/python2.6 -c src/dyn_unix.c -o build/temp.linux-x86_64-2.6/src/dyn_unix.o
gcc -pthread -fno-strict-aliasing -DNDEBUG -g -fwrapv -O2 -Wall -Wstrict-prototypes -g -O2 -fPIC -Isrc -I/usr/local/include -I/usr/include/python2.6 -c src/unix_pykcs11_wrap.cpp -o build/temp.linux-x86_64-2.6/src/unix_pykcs11_wrap.o
cc1plus: warning: command line option "-Wstrict-prototypes" is valid for Ada/C/ObjC but not for C++
g++ -pthread -shared -Wl,-O1 -Wl,-Bsymbolic-functions -g -O2 build/temp.linux-x86_64-2.6/src/ck_attribute_smart.o build/temp.linux-x86_64-2.6/src/pkcs11lib.o build/temp.linux-x86_64-2.6/src/pykcs11string.o build/temp.linux-x86_64-2.6/src/utility.o build/temp.linux-x86_64-2.6/src/pykcs11.o build/temp.linux-x86_64-2.6/src/dyn_unix.o build/temp.linux-x86_64-2.6/src/unix_pykcs11_wrap.o -L/usr/local/lib -lpython2.6 -o build/lib.linux-x86_64-2.6/PyKCS11/_LowLevel.so
touch build-stamp
make[1]: Leaving directory `/home/rousseau/Sources/Debian/SVN/pykcs11/build-area/pykcs11-1.2.3'
dh_auto_test
fakeroot debian/rules binary
dh binary --with python2
dh_testroot
dh_prep
dh_installdirs
dh_auto_install
make[1]: Entering directory `/home/rousseau/Sources/Debian/SVN/pykcs11/build-area/pykcs11-1.2.3'
python setup.py install --prefix=/usr --root=/home/rousseau/Sources/Debian/SVN/pykcs11/build-area/pykcs11-1.2.3/debian/python-pykcs11
running install
running build
running build_py
running build_ext
running install_lib
creating /home/rousseau/Sources/Debian/SVN/pykcs11/build-area/pykcs11-1.2.3/debian/python-pykcs11/usr
creating /home/rousseau/Sources/Debian/SVN/pykcs11/build-area/pykcs11-1.2.3/debian/python-pykcs11/usr/lib
creating /home/rousseau/Sources/Debian/SVN/pykcs11/build-area/pykcs11-1.2.3/debian/python-pykcs11/usr/lib/python2.6
creating /home/rousseau/Sources/Debian/SVN/pykcs11/build-area/pykcs11-1.2.3/debian/python-pykcs11/usr/lib/python2.6/site-packages
creating /home/rousseau/Sources/Debian/SVN/pykcs11/build-area/pykcs11-1.2.3/debian/python-pykcs11/usr/lib/python2.6/site-packages/PyKCS11
copying build/lib.linux-x86_64-2.6/PyKCS11/_LowLevel.so -> /home/rousseau/Sources/Debian/SVN/pykcs11/build-area/pykcs11-1.2.3/debian/python-pykcs11/usr/lib/python2.6/site-packages/PyKCS11
copying build/lib.linux-x86_64-2.6/PyKCS11/__init__.py -> /home/rousseau/Sources/Debian/SVN/pykcs11/build-area/pykcs11-1.2.3/debian/python-pykcs11/usr/lib/python2.6/site-packages/PyKCS11
copying build/lib.linux-x86_64-2.6/PyKCS11/LowLevel.py -> /home/rousseau/Sources/Debian/SVN/pykcs11/build-area/pykcs11-1.2.3/debian/python-pykcs11/usr/lib/python2.6/site-packages/PyKCS11
byte-compiling /home/rousseau/Sources/Debian/SVN/pykcs11/build-area/pykcs11-1.2.3/debian/python-pykcs11/usr/lib/python2.6/site-packages/PyKCS11/__init__.py to __init__.pyc
byte-compiling /home/rousseau/Sources/Debian/SVN/pykcs11/build-area/pykcs11-1.2.3/debian/python-pykcs11/usr/lib/python2.6/site-packages/PyKCS11/LowLevel.py to LowLevel.pyc
running install_egg_info
Writing /home/rousseau/Sources/Debian/SVN/pykcs11/build-area/pykcs11-1.2.3/debian/python-pykcs11/usr/lib/python2.6/site-packages/PyKCS11-1.2.3-py2.6.egg-info
make[1]: Leaving directory `/home/rousseau/Sources/Debian/SVN/pykcs11/build-area/pykcs11-1.2.3'
dh_install
dh_installdocs
dh_installchangelogs
dh_installexamples
dh_installman
dh_installcatalogs
dh_installcron
dh_installdebconf
dh_installemacsen
dh_installifupdown
dh_installinfo
dh_installinit
dh_installmenu
dh_installmime
dh_installmodules
dh_installlogcheck
dh_installlogrotate
dh_installpam
dh_installppp
dh_installudev
dh_installwm
dh_installxfonts
dh_bugfiles
dh_lintian
dh_gconf
dh_icons
dh_perl
dh_python2
W: dh_python2:94: Python 2.6 should install files in /usr/lib/python2.6/dist-packages/. Did you forget "--install-layout=deb"?
E: dh_python2:146: you most probably have to build extension for python2.5.
make: *** [binary] Error 12
dpkg-buildpackage: error: fakeroot debian/rules binary gave error exit status 2
Command 'dpkg-buildpackage -rfakeroot' failed in '/home/rousseau/Sources/Debian/SVN/pykcs11/build-area/pykcs11-1.2.3', how to continue now? [Qri?]: Aborting.
Reply to: