Package: dh-python Version: 1.20140128-1 Severity: normal Thank you for providing dh-python with pybuild support in Jessie.
It will be nice if a "tutorial" type document with examples for a few typical cases: distutils, cmake, autotools, ... for packages with dh and CDBS is available as README.pybuild in /usr/share/doc/dh-python. Manpage alone is not so easy for people to get general idea how all these fit together. The distutils and cmake based packages seem to be supported. But autotool package based packages seem to require "custom" setup and I am completely lost in manpage and struggling :-) ---- $ dh clean --with autoreconf,gir,python2,python3 --buildsystem=pybuild dh_testdir -O--buildsystem=pybuild dh_auto_clean -O--buildsystem=pybuild E: pybuild pybuild:82: cannot detect build system, please use --system option or set PYBUILD_SYSTEM env. variable dh_auto_clean: pybuild --clean -i python{version} -p 2.7 --dir . returned exit code 11 make: *** [clean] Error 11 dpkg-buildpackage: error: fakeroot debian/rules clean gave error exit status 2 ---- I have no idea what value should be given to PYBUILD_SYSTEM or where to set "--system option" with what value. I love to see this "tutorial" type document is written like what you have posted to BTS as README.pybuild in /usr/share/doc/dh-python Copy of your BTS posting https://bugs.debian.org/538978#47 ----- You can build modules/extensions for Python 2.X *and* Python 3.X with this debian/rules file: #!/usr/bin/make -f %: dh $@ --with python2,python3 --buildsystem=pybuild pybuild.pm will check Build-Depends* and build Python (python, python-dev, python-dbg, python-all, python-all-dev, python-all-dbg), Python 3 (python3, python3-dev, python3-dbg, python3-all, python3-all-dev, python3-all-dbg) and PyPy (pypy) modules/extensions. It can be configured via command line or CDBS-like - by exporting PYBUILD_OPTION / PYBUILD_OPTION_interpreter / PYBUILD_OPTION_interpreterversion env. variables in debian/rules, f.e. * if you don't want to use debian/*.install files, you can set DESTDIR for each interpreter (note that you can use "python2" for all python2.X interpreters and "python3" for all python3.X ones): export PYBUILD_DESTDIR_python2=debian/python-foo/ export PYBUILD_DESTDIR_python2-dbg=debian/python-foo-dbg/ export PYBUILD_DESTDIR_python3=debian/python3-foo/ export PYBUILD_DESTDIR_python3-dbg=debian/python3-foo-dbg/ export PYBUILD_DESTDIR_python3.1-dbg=debian/spam-pkg-with-python3.1-only/ export PYBUILD_DESTDIR_pypy=debian/pypy-foo/ * if you want to add some custom arguments to Python 3's install command: export PYBUILD_INSTALL_ARGS_python3=--install-scripts=/usr/share/foo/ * you can disable (almost) any action via --disable / DISABLE env. var: export PYBUILD_DISABLE=configure export PYBUILD_DISABLE_python3.1=test * if you want to disable Build-Depends detection: export PYBUILD_INTERPRETERS=python{version} python{version}-dbg export PYBUILD_VERSIONS=2.7 3.3 * if auto detection didn't detect the right build system: export PYBUILD_SYSTEM=distutils * if you want to add a custom command before or after each iteration: export PYBUILD_BEFORE_BUILD=echo {version} >> '{dir}/enabled' export PYBUILD_AFTER_INSTALL=rm -rf '{destdir}/{install_dir}/foo/tests' Right now it supports distutils (i.e. setup.py) and custom build systems only (I tried to add cmake one that uses dh_auto_* tools, but failed to teach cmake which interpreter should be used). Anyone wants to contribute more plugins? Let me know if you want some guidance or if I can make writing plugins easier. If your build system is not yet supported, you can use custom build system: export PYBUILD_SYSTEM=custom export PYBUILD_CLEAN_ARGS=rm -rf {build_dir}/python{version}/ export PYBUILD_CONFIGURE_ARGS=./configure --python={version} export PYBUILD_BUILD_ARGS=make build --dir={build_dir} --python={version} export PYBUILD_INSTALL_ARGS=make --destdir={destdir} --python={version} --install-dir={install_dir} export PYBUILD_TEST_ARGS_python2=cd {build_dir}; nosetests export PYBUILD_TEST_ARGS_python3=cd {build_dir}; python{version} -m discover ----- I do not know if the above is still valid or not for cmake, since pybuild returns as follows: $ pybuild --list-systems cmake CMake build system (using dh_auto_* commands) custom use --*-args options to configure this system distutils Distutils build system Besides, I do not understand what is "--*-args options". Regards, Osamu PS: I am packaging a python3 compatible upstream source (ibus). So 2to3 is not the issue . I can not take easy path by limiting this package to python3, since this package needs to support dependencies still using old python2 bindings. -- System Information: Debian Release: jessie/sid APT prefers unstable APT policy: (500, 'unstable'), (500, 'testing') Architecture: amd64 (x86_64) Foreign Architectures: i386 Kernel: Linux 3.13-1-amd64 (SMP w/8 CPU cores) Locale: LANG=en_US.utf8, LC_CTYPE=en_US.utf8 (charmap=UTF-8) Shell: /bin/sh linked to /bin/dash Versions of packages dh-python depends on: pn python3:any <none> dh-python recommends no packages. dh-python suggests no packages. -- no debconf information -- To UNSUBSCRIBE, email to debian-bugs-dist-requ...@lists.debian.org with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org