Package Details: python-requirements-parser 0.5.0-5

Git Clone URL: https://aur.archlinux.org/python-requirements-parser.git (read-only, click to copy)
Package Base: python-requirements-parser
Description: A Pip requirements file parser.
Upstream URL: https://github.com/madpah/requirements-parser
Licenses: Apache
Submitter: hexchain
Maintainer: yochananmarqos
Last Packager: yochananmarqos
Votes: 1
Popularity: 0.000000
First Submitted: 2017-01-23 08:34 (UTC)
Last Updated: 2023-02-08 00:51 (UTC)

Latest Comments

mickael9 commented on 2022-07-31 12:25 (UTC) (edited on 2022-07-31 12:26 (UTC) by mickael9)

Just running poetry build in the source directory, the wheel and source tarball don't include the requirements module (just the metadata).

It seems to be related to the use of the include keyword in pyproject.toml:

packages = [
    { include = "requirements" }
]
include = [
    "AUTHORS.rst",
    "LICENSE",
    "README.md"
]

Adding requirements/**/* to it fixes the problem:

include = [
    "AUTHORS.rst",
    "LICENSE",
    "README.md",
    "requirements/**/*",
]

I suppose this is a bug/regression in poetry or a misunderstanding of the include mechanism ?

yochananmarqos commented on 2022-06-14 22:28 (UTC) (edited on 2022-06-14 22:29 (UTC) by yochananmarqos)

@flipflop97:

ModuleNotFoundError: No module named 'requirements'

That makes no sense as the module resides in /usr/lib/python3.10/site-packages/requirements/ no matter if build / install vs. setuptools is used. It's designed to be installed with poetry.

flipflop97 commented on 2022-06-14 21:53 (UTC)

This was mainly an example of a pkgbuild that results in a usable package. I didn't know setup.py was deprecated, thanks for telling!

I'm able to build it just fine using your pkgbuild, but I can't import the package in python afterwards, it just says ModuleNotFoundError: No module named 'requirements' (the same happens with the new release you just pushed). Using my example pkgbuild does let me import and use the module. Does this work correctly for you? I wonder what's going on in that case…

yochananmarqos commented on 2022-06-14 15:13 (UTC)

@flipflop97: ognibuild is able to use this package just fine.

Your PKGBUILD is missing the correct dependencies. setup.py install is deprecated, why do you think that makes any difference?

flipflop97 commented on 2022-06-14 13:23 (UTC) (edited on 2022-06-14 13:33 (UTC) by flipflop97)

Hi, after installing this package I cannot import requirements in Python. I think something might be broken.

EDIT: This PKGBUILD works for me:

_pkgname=requirements-parser
pkgname=python-${_pkgname}
pkgver=0.5.0
pkgrel=3
pkgdesc='Small Python module for parsing Pip requirement files'
arch=(x86_64 aarch64)
url='https://github.com/madpah/requirements-parser'
license=(Apache)
depends=(
    python
)
makedepends=(
    python-setuptools
)
source=("https://files.pythonhosted.org/packages/source/${_pkgname::1}/${_pkgname}/${_pkgname}-${pkgver}.tar.gz")
b2sums=('ad3ac00e4556107d0d2cfc3b34fb3c9ca6f7f0a1f46c48bf46e9fd476eccdfdfc9ea6bfd691869cff78f628797c6afdaa9333de951481094d4abdf5947daf35a')

build() {
    cd "${_pkgname}-${pkgver}"
    python setup.py build
}

package() {
    cd "${_pkgname}-${pkgver}"
    python setup.py install --skip-build --root="${pkgdir}" --optimize=1
    install -Dm644 LICENSE "${pkgdir}/usr/share/licenses/${pkgname}/LICENSE"    
}

hexchain commented on 2017-02-22 03:11 (UTC)

@carlwgeorge: thanks, fixed

commented on 2017-02-22 03:07 (UTC)

This fails to build in a clean chroot. Please set setuptools as a build dependency (outside any package functions). makedepends=(python-setuptools python2-setuptools) Additionally, I noticed a few other things that should be corrected. * no url set * BSD license, not custom