althonos / pyrodigal

Cython bindings and Python interface to Prodigal, an ORF finder for genomes and metagenomes. Now with SIMD!
https://pyrodigal.readthedocs.org
GNU General Public License v3.0
138 stars 5 forks source link

Tests failing in version 2.2.0 under Archlinux #38

Closed kbipinkumar closed 1 year ago

kbipinkumar commented 1 year ago

while packaging pyrodigal version 2.2.0 for BioArchlinux Repo we have encountered following error

Successfully built pyrodigal-2.2.0-cp311-cp311-linux_x86_64.whl
==> Starting check()...
E
======================================================================
ERROR: pyrodigal (unittest.loader._FailedTest.pyrodigal)
----------------------------------------------------------------------
ImportError: Failed to import test module: pyrodigal
Traceback (most recent call last):
  File "/usr/lib/python3.11/unittest/loader.py", line 154, in loadTestsFromName
    module = __import__(module_name)
             ^^^^^^^^^^^^^^^^^^^^^^^
  File "/build/python-pyrodigal/src/pyrodigal-2.2.0/build/lib.linux-x86_64-cpython-311/pyrodigal/__init__.py", line 8, in <module>
    from . import _pyrodigal
  File "pyrodigal/_pyrodigal.pyx", line 145, in init pyrodigal._pyrodigal
    import archspec.cpu
ModuleNotFoundError: No module named 'archspec'

----------------------------------------------------------------------
Ran 1 test in 0.000s

FAILED (errors=1)
==> ERROR: A failure occurred in check().

the issue seems to be due to missing python module archspec. After installing python-archspec from AUR as checkdepends the tests complete without any issue.

it would be great PKGBUILD is updated python-archspec as checkdepends

althonos commented 1 year ago

Thanks for the heads-up. archspec is now a runtime dependency as well, I forgot to update the PKGBUILD and will do so now. Unfortunately, it looks like python-archspec is outdated on AUR: https://aur.archlinux.org/packages/python-archspec. Hopefully the package is updated shortly.

kbipinkumar commented 1 year ago

pyrodigal compiles just fine with older and newer version of archspec

kbipinkumar commented 1 year ago

on the topic of updating PKGBUILD running namcap on resulting package shows following warnings

Checking python-pyrodigal-2.2.0-1-x86_64.pkg.tar.zst
python-pyrodigal W: Referenced python module 'importlib_resources.files' is an uninstalled dependency (needed in files ['usr/lib/python3.11/site-packages/pyrodigal/tests/data/__init__.py'])
python-pyrodigal W: Referenced python module 'isal.igzip' is an uninstalled dependency (needed in files ['usr/lib/python3.11/site-packages/pyrodigal/tests/fasta.py'])
python-pyrodigal W: Dependency glibc detected and implicitly satisfied (libraries ['usr/lib/libc.so.6'] needed in files ['usr/lib/python3.11/site-packages/pyrodigal/_pyrodigal.cpython-311-x86_64-linux-gnu.so'])
python-pyrodigal W: Dependency included, but may not be needed ('python-archspec')

just take look at these as well

althonos commented 1 year ago

Both importlib-resources and isal are optional dependencies, they are wrapped in a try / except ImportError block and the package will work just fine without them.

althonos commented 1 year ago

I updated PKGBUILD both in this repository and online for the v2.2.0, python-archspec should be installed now.