Re: building python debian packages and virtualenv
Hi Brian,
> Fortunately, so far I have always noticed this before uploading the
> package, however think it is only a matter of time before I stuff up an
> upload.
While not directly addressing your question, perhaps this is also a good
opportunity to add some autopkgtest tests to the packages -- even if there's
not a full test suite from upstream, a (minimal) smoke test would catch
this. The autopkgtest tests probe the installed package as opposed to the
the just-built source so it catches wrong file paths, files that get missed
out from the "install" step etc.
The autopkgtest specification is also known as DEP-8:
http://anonscm.debian.org/gitweb/?p=autopkgtest/autopkgtest.git;a=blob_plain;f=doc/README.package-
tests;hb=HEAD
http://packaging.ubuntu.com/html/auto-pkg-test.html
and an example of a python module's test suite that runs upstream's test
suite is:
http://sources.debian.net/src/translate-toolkit/1.11.0%2Bdfsg-1/debian/tests
(or look for other packages that declare "Testsuite: autopkgtest" in the
Sources file)
To run the tests, there's "sadt" from devscripts which runs in your current
environment (but would possibly still suffer from the virtualenv problem --
I don't think it sanitises this part of the environment). For better
isolation, adt-run can run it in a chroot or virtual machine -- if you're
already using schroot/sbuild to build things, then you can:
adt-run -B \
--binary $DEBS \
--source $DSC \
--log-file $CHANGES.adt.log \
--- adt-virt-schroot unstable-amd64-sbuild
cheers
Stuart
(this message was brought to you by the package testing fan club)
--
Stuart Prescott http://www.nanonanonano.net/ stuart@nanonanonano.net
Debian Developer http://www.debian.org/ stuart@debian.org
GPG fingerprint 90E2 D2C1 AD14 6A1B 7EBB 891D BBC1 7EBB 1396 F2F7
Reply to: