Re: RE:Help running tests in python-biom-format
Hi Tim,
On Tue, Nov 12, 2013 at 12:29:57PM +0000, Tim Booth wrote:
> Hi Andreas,
>
> I second that - the tests run fine if I do:
>
> cd python-biom-format-1.2.0/python-code
> env PYTHONPATH=../build/lib.linux-x86_64-2.7/biom nosetests
>
> Also, if I have python-biom-format installed then the commands work fine
> and I can do:
>
> cd ~ ; python -c 'import biom.sparsemat'
>
> But within the python-code directory the above command fails, as it
> picks up the local biom/sparsemat.py module but is missing
> _sparsemat.so.
I think this exactly is the problem: When being in the python-code/ dir
the local biom/sparsemat.py module is missing simply missing
_sparsemat.so. I hacked around this via a symlink to some other place
than the python-code dir:
override_dh_auto_test:
ifeq (,$(filter nocheck,$(DEB_BUILD_OPTIONS)))
set -e -x;\
for pyv in `pyversions -dv` ; do \
cd build/; \
ln -s ../python-code/tests; \
env PYTHONPATH=../build/lib.$(pybuilddir)-$${pyv}/biom nosetests ; \
done
endif
(download at http://blends.debian.net/tmp/packages/python-biom-format/ updated)
However, while inspecting the build log more deeply I realise that the
build is done twice:
dh_auto_build
running build
running build_py
creating build
...
debian/rules override_dh_auto_test
make[1]: Entering directory `/home/tillea/debian-maintain/repack/python-biom-format/biom-format-1.2.0'
set -e -x;\
for pyv in `pyversions -dv` ; do \
cd build/; \
ln -s ../python-code/tests; \
env PYTHONPATH=../build/lib.linux-x86_64-${pyv}/biom nosetests ; \
done
+ pyversions -dv
+ cd build/
+ ln -s ../python-code/tests
+ env PYTHONPATH=../build/lib.linux-x86_64-2.7/biom nosetests
...
dh_auto_install
running install
running build
running build_py
running build_ext
building 'biom._sparsemat' extension
...
Is this an effect of a broken setup.py and how can I prevent this?
> Or is that not working on Sid?
Nop, sid or testing does not matter.
Kind regards
Andreas.
--
http://fam-tille.de
Reply to: