Sunday February 28th 2021 - Update issue with packman inode mirror
There are issues with the inode mirror, please configure an alternative mirror. See http://packman.links2linux.org/mirrors
Saturday March 3rd 2021 - Missing Packman Tumbleweed Packages
There are issues with package signing since the move last week and these packages have disappeared from the mirrors, see https://lists.links2linux.de/pipermail/packman/2021-March/016623.html for more information... ETA for fix 3/10 or 3/11.
-
Need help packaging python-thewalrus
Hello,
I have been trying to package python-thewalrus.
https://build.opensuse.org/package/s...thon-thewalrus
https://github.com/XanaduAI/thewalrus/issues/184
But the error is always this.
Code:
[ 58s] ==================================== ERRORS ====================================
[ 58s] ___________ ERROR collecting thewalrus/tests/test_fock_gradients.py ____________
[ 58s] ImportError while importing test module '/home/abuild/rpmbuild/BUILD/thewalrus-0.12.0/thewalrus/tests/test_fock_gradients.py'.
[ 58s] Hint: make sure your test modules/packages have valid Python names.
[ 58s] Traceback:
[ 58s] thewalrus/tests/test_fock_gradients.py:16: in <module>
[ 58s] from thewalrus.fock_gradients import (
[ 58s] E ModuleNotFoundError: No module named 'thewalrus'
So I tired building it locally with pip and test with pytest.
I download the thewalrus-0.12.0.tar.gz from github and install with
Code:
pip install thewalrus-0.12.0.tar.gz
cd /home/andy/.local/lib/python3.8/site-packages/thewalrus
pytest
=========================================================================================================== test session starts ============================================================================================================
platform linux -- Python 3.8.4, pytest-5.4.3, py-1.9.0, pluggy-0.13.1
benchmark: 3.2.3 (defaults: timer=time.perf_counter disable_gc=False min_rounds=5 min_time=0.000005 max_time=1.0 calibration_precision=10 warmup=False warmup_iterations=100000)
rootdir: /home/andy/.local/lib/python3.8/site-packages/thewalrus/tests
plugins: asdf-2.6.0, asyncio-0.14.0, aspectlib-1.5.0, benchmark-3.2.3
collected 951 items
test_fock_gradients.py ............... [ 1%]
test_hafnian.py ........................................................................................... [ 11%]
test_hafnian_approx.py ....... [ 11%]
test_hafnian_repeated.py ........................................ [ 16%]
test_hermite_multidimensional.py ........ [ 16%]
test_integration.py ....... [ 17%]
test_permanent.py ........................ [ 20%]
test_quantum.py .................................................................................................................................................................................................................... [ 42%]
.................................................................................................................................................................................................................................... [ 66%]
..................................................................................................... [ 77%]
test_reference.py ........................... [ 79%]
test_samples.py ........................................ [ 84%]
test_samples_classical.py ....... [ 84%]
test_symplectic.py ..................................................................................... [ 93%]
test_torontonian.py ........................................................... [100%]
===================================================================================================== 951 passed in 436.84s (0:07:16) ======================================================================================================
Which passed flawlessly.
I'm not sure what the error implies.
This also happen to pythno-sat-stac
https://build.opensuse.org/package/s...ython-sat-stac
Thanks.
-
Re: Need help packaging python-thewalrus
Hi
Not sure it's really a python- package since it's a python library, not a module, your probably better off to just package as thewalrus.
AFAIKT, you need to cd into the test directory, then call your macro.
Cheers Malcolm °¿° SUSE Knowledge Partner (Linux Counter #276890)
SUSE SLE, openSUSE Leap/Tumbleweed (x86_64) | GNOME DE
If you find this post helpful and are logged into the web interface,
please show your appreciation and click on the star below... Thanks!
-
Re: Need help packaging python-thewalrus
 Originally Posted by malcolmlewis
Hi
Not sure it's really a python- package since it's a python library, not a module, your probably better off to just package as thewalrus.
AFAIKT, you need to cd into the test directory, then call your macro.
I have tried,
Code:
cd thewalrus/tests
%pytest
cd ../../
Code:
cd thewalrus
%pytest
cd ..
but still same error. It seems that pytest could not find the test for some reason, or I might understand it wrong.
Code:
[ 296s] ============================= test session starts ==============================
[ 296s] platform linux -- Python 3.8.4, pytest-5.4.3, py-1.9.0, pluggy-0.13.1 -- /usr/bin/python3
[ 296s] cachedir: .pytest_cache
[ 296s] benchmark: 3.2.3 (defaults: timer=time.perf_counter disable_gc=False min_rounds=5 min_time=0.000005 max_time=1.0 calibration_precision=10 warmup=False warmup_iterations=100000)
[ 296s] rootdir: /home/abuild/rpmbuild/BUILD/thewalrus-0.12.0
[ 296s] plugins: benchmark-3.2.3
[ 298s] collecting ... collected 0 items / 13 errors
[ 298s]
[ 298s] ==================================== ERRORS ====================================
[ 298s] ___________ ERROR collecting thewalrus/tests/test_fock_gradients.py ____________
[ 298s] ImportError while importing test module '/home/abuild/rpmbuild/BUILD/thewalrus-0.12.0/thewalrus/tests/test_fock_gradients.py'.
[ 298s] Hint: make sure your test modules/packages have valid Python names.
[ 298s] Traceback:
[ 298s] test_fock_gradients.py:16: in <module>
[ 298s] from thewalrus.fock_gradients import (
[ 298s] E ModuleNotFoundError: No module named 'thewalrus'
I will change the package name, thanks.
In the case of sat-stac, it solve the issue for me by cd into the test, but it does not work for thewalrus.
-
Re: Need help packaging python-thewalrus
 Originally Posted by andythe_great
I have tried,
Code:
cd thewalrus/tests
%pytest
cd ../../
Code:
cd thewalrus
%pytest
cd ..
but still same error. It seems that pytest could not find the test for some reason, or I might understand it wrong.
Code:
[ 296s] ============================= test session starts ==============================
[ 296s] platform linux -- Python 3.8.4, pytest-5.4.3, py-1.9.0, pluggy-0.13.1 -- /usr/bin/python3
[ 296s] cachedir: .pytest_cache
[ 296s] benchmark: 3.2.3 (defaults: timer=time.perf_counter disable_gc=False min_rounds=5 min_time=0.000005 max_time=1.0 calibration_precision=10 warmup=False warmup_iterations=100000)
[ 296s] rootdir: /home/abuild/rpmbuild/BUILD/thewalrus-0.12.0
[ 296s] plugins: benchmark-3.2.3
[ 298s] collecting ... collected 0 items / 13 errors
[ 298s]
[ 298s] ==================================== ERRORS ====================================
[ 298s] ___________ ERROR collecting thewalrus/tests/test_fock_gradients.py ____________
[ 298s] ImportError while importing test module '/home/abuild/rpmbuild/BUILD/thewalrus-0.12.0/thewalrus/tests/test_fock_gradients.py'.
[ 298s] Hint: make sure your test modules/packages have valid Python names.
[ 298s] Traceback:
[ 298s] test_fock_gradients.py:16: in <module>
[ 298s] from thewalrus.fock_gradients import (
[ 298s] E ModuleNotFoundError: No module named 'thewalrus'
I will change the package name, thanks.
In the case of sat-stac, it solve the issue for me by cd into the test, but it does not work for thewalrus.
Hi
If you rename and give me a link, will branch and have a play
Cheers Malcolm °¿° SUSE Knowledge Partner (Linux Counter #276890)
SUSE SLE, openSUSE Leap/Tumbleweed (x86_64) | GNOME DE
If you find this post helpful and are logged into the web interface,
please show your appreciation and click on the star below... Thanks!
-
Re: Need help packaging python-thewalrus
-
Re: Need help packaging python-thewalrus
 Originally Posted by andythe_great
Hi
The tests are to be run after install as per the source instructions, nothing to do at build time
Cheers Malcolm °¿° SUSE Knowledge Partner (Linux Counter #276890)
SUSE SLE, openSUSE Leap/Tumbleweed (x86_64) | GNOME DE
If you find this post helpful and are logged into the web interface,
please show your appreciation and click on the star below... Thanks!
-
Re: Need help packaging python-thewalrus
 Originally Posted by malcolmlewis
Hi
The tests are to be run after install as per the source instructions, nothing to do at build time 
Is it normal to do it like this? Isn't the package suppose to test as it is installed?
-
Re: Need help packaging python-thewalrus
 Originally Posted by andythe_great
Is it normal to do it like this? Isn't the package suppose to test as it is installed?
Hi
You could add as post install option, in this case as the packager/tester I would suggest you run locally after install...
Cheers Malcolm °¿° SUSE Knowledge Partner (Linux Counter #276890)
SUSE SLE, openSUSE Leap/Tumbleweed (x86_64) | GNOME DE
If you find this post helpful and are logged into the web interface,
please show your appreciation and click on the star below... Thanks!
-
Re: Need help packaging python-thewalrus
 Originally Posted by malcolmlewis
Hi
You could add as post install option, in this case as the packager/tester I would suggest you run locally after install...
I tried using gtest instead of pytest as the doc suggest. The check is now passing.
But is it ok to do it this way?
Code:
%check
cd tests
%make_build test
cd ..
-
Re: Need help packaging python-thewalrus
 Originally Posted by andythe_great
I tried using gtest instead of pytest as the doc suggest. The check is now passing.
But is it ok to do it this way?
Code:
%check
cd tests
%make_build test
cd ..
Hi
If it works, don't see why not
Cheers Malcolm °¿° SUSE Knowledge Partner (Linux Counter #276890)
SUSE SLE, openSUSE Leap/Tumbleweed (x86_64) | GNOME DE
If you find this post helpful and are logged into the web interface,
please show your appreciation and click on the star below... Thanks!
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
| |