Search code examples
pythonpypi

Trying to Package a Python package up for PYPI getting an invalid requirement error


Am trying to package a pyton3 program for pypi I'm getting as far as

python -m build --sdist --wheel --outdir dist/ .

and am getting the following error

raise InvalidRequirement(
pkg_resources.extern.packaging.requirements.InvalidRequirement: Parse error at ""['tracew"": 
Expected W:(abcd...)

in my options section of setup.cfg I have

install_requires=['tracewrapper'],

any thoughts obviously happy to provide full stack trace if folks want it

Cheers


Solution

  • setup.cfg, unlike setup.py, is not Python; it's INI config.

    [options]
    install_requires =
        tracewrapper
    

    Ref: https://setuptools.readthedocs.io/en/latest/userguide/declarative_config.html