Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

python-pyhmmer: Update python-pyhmmer PKGBUILD #256

Merged
merged 3 commits into from
Jan 20, 2025

Conversation

althonos
Copy link
Member

Involved packages

  • python-pyhmmer

Details

  • Tested in the local machine (largest 16G RAM) and it is passed without any issue
  • Provide New Package
  • Fix the Packages
    • PKGBUILD
    • lilac.yaml
    • lilac.py
  • Would like to continue to work with us

Additional Note

This PR updates the python-pyhmmer PKGBUILD to the latest version. The last release (v0.11.0) changed the build system from setuptools to CMake and scikit-build-core, so the build dependencies and process had to be updated.

@starsareintherose starsareintherose changed the title Update python-pyhmmer PKGBUILD python-pyhmmer: Update python-pyhmmer PKGBUILD Jan 10, 2025
Copy link
Member

@starsareintherose starsareintherose left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is git still nedded in make depends as the source is a git url

@kbipinkumar
Copy link
Member

git is needed for initialising submodules present in the vendor folder. without git as makedepends the build will fail in clean chroot
Screenshot_20250110_235709

additionally while attempting to build with modified `PKGBUILD' after adding git as dependency the build process fails at check() stage with following output

*** Making wheel...
*** Created pyhmmer-0.11.0-cp313-cp313-linux_x86_64.whl
Successfully built pyhmmer-0.11.0-cp313-cp313-linux_x86_64.whl
==> Starting check()...
Traceback (most recent call last):
  File "<frozen runpy>", line 198, in _run_module_as_main
  File "<frozen runpy>", line 88, in _run_code
  File "/usr/lib/python3.13/site-packages/installer/__main__.py", line 98, in <module>
    _main(sys.argv[1:], "python -m installer")
    ~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib/python3.13/site-packages/installer/__main__.py", line 86, in _main
    with WheelFile.open(args.wheel) as source:
         ~~~~~~~~~~~~~~^^^^^^^^^^^^
  File "/usr/lib/python3.13/contextlib.py", line 141, in __enter__
    return next(self.gen)
  File "/usr/lib/python3.13/site-packages/installer/sources.py", line 162, in open
    with zipfile.ZipFile(path) as f:
         ~~~~~~~~~~~~~~~^^^^^^
  File "/usr/lib/python3.13/zipfile/__init__.py", line 1362, in __init__
    self.fp = io.open(file, filemode)
              ~~~~~~~^^^^^^^^^^^^^^^^
FileNotFoundError: [Errno 2] No such file or directory: '/build/python-pyhmmer/src/pyhmmer-0.11.0/dist/pyhmmer-0.11.0-cp313-cp313-linux_x86_64.whl'
==> ERROR: A failure occurred in check().
    Aborting...

Copy link
Member

@sukanka sukanka left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for your contribution, could you please fix these minor problems?

BioArchLinux/python-pyhmmer/PKGBUILD Outdated Show resolved Hide resolved
BioArchLinux/python-pyhmmer/PKGBUILD Outdated Show resolved Hide resolved
BioArchLinux/python-pyhmmer/PKGBUILD Outdated Show resolved Hide resolved
BioArchLinux/python-pyhmmer/PKGBUILD Outdated Show resolved Hide resolved
@althonos
Copy link
Member Author

@sukanka @starsareintherose @kbipinkumar : Good catch, thanks. I tested this locally on a computer with git installed and didn't realize I removed it.

@althonos althonos requested a review from sukanka January 11, 2025 22:36
@kbipinkumar
Copy link
Member

running namcap on final package archive shows following missing dependencies

> namcap python-pyhmmer-0.11.0-1-x86_64.pkg.tar.zst | less | grep "E:"
python-pyhmmer E: Dependency python-typing_extensions detected and not included (python modules ['typing_extensions.Literal', 'typing_extensions.TypedDict', 'typing_extensions.Unpack'] needed in files ['usr/lib/python3.13/site-packages/pyhmmer/hmmer/_base.py', 'usr/lib/python3.13/site-packages/pyhmmer/hmmer/_jackhmmer.py'])
python-pyhmmer E: Dependency python-numpy detected and not included (python modules ['numpy'] needed in files ['usr/lib/python3.13/site-packages/pyhmmer/tests/test_doctest.py'])

python-numpy is probably for running tests during build process but python-typing_extensions seems to be imported by main pyhmmer package itself.

@althonos
Copy link
Member Author

python-typing_extensions is also not required, it's only ever needed for Python versions older than 3.11, and only used in type checking, so the package will work just fine without it as the imports are gated:

if typing.TYPE_CHECKING:

    if sys.version_info >= (3, 8):
        from typing import Literal, TypedDict
    else:
        from typing_extensions import Literal, TypedDict  # type: ignore

@kbipinkumar
Copy link
Member

python-typing_extensions is also not required, it's only ever needed for Python versions older than 3.11, and only used in type checking, so the package will work just fine without it as the imports are gated:

if typing.TYPE_CHECKING:

    if sys.version_info >= (3, 8):
        from typing import Literal, TypedDict
    else:
        from typing_extensions import Literal, TypedDict  # type: ignore

Okay. So we can ignore the errors.

@starsareintherose
Copy link
Member

@sukanka Can this PR be merged?

@kbipinkumar
Copy link
Member

kbipinkumar commented Jan 16, 2025

@sukanka Can this PR be merged?

the license install line in package () section needs to be modified as install -Dm644 ${srcdir}/${_name}/COPYING "$pkgdir/usr/share/licenses/$pkgname/COPYING" to call proper build directory. everything else is fine

Copy link
Member

@kbipinkumar kbipinkumar left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

install -Dm644 ${srcdir}/${_name}-${pkgver}/COPYING "$pkgdir/usr/share/licenses/$pkgname/COPYING" should be changed to install -Dm644 ${srcdir}/${_name}/COPYING "$pkgdir/usr/share/licenses/$pkgname/COPYING" as well for calling the correct build directory

BioArchLinux/python-pyhmmer/PKGBUILD Outdated Show resolved Hide resolved
@starsareintherose starsareintherose merged commit 91d1622 into BioArchLinux:master Jan 20, 2025
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants