
On 07/30/2016 08:14 AM, Sebastian wrote:
Hi,
I'm currently trying to package a python-lib which includes some c-code and face some issues for running the automatic tests.
For normal packages, the test can be run quite simply. E.g. tests are in tests/, you add .. to the python path and then run nose or unittests. An ugly too, but it works.
For normal packages, don't you just do something like python[3] setup.py test ?
For compiled files I can't do this trick, because I need to get the compiled resources in site-packages. In chroot I can run this: PYTHONPATH=/home/abuild/rpmbuild/BUILDROOT/python3-pyasn-1.5.0b7-0.x86_64/usr/lib64/python3.5/site-packages/ python3 -c "import pyasn.pyasn_radix"
But I can't use this in the spec-file. I only get /home/abuild/rpmbuild/BUILDROOT/python3-pyasn-1.5.0b7-0.x86_64/ as %{buildroot}, but %{python_sitearch} seems to be empty. Do you have any hints how to accomplish this?
Well, since it is a Python 3 and not 2 package I believe the macro you are looking for is %{python3_sitearch}. I do not, however, understand what the problem is so I can't be of more help.
The package in question: https://build.opensuse.org/package/show/home:sebix/python3-pyasn
-- Jason Craig -- To unsubscribe, e-mail: opensuse-packaging+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse-packaging+owner@opensuse.org