pip-upgrader icon indicating copy to clipboard operation
pip-upgrader copied to clipboard

Parsing setup.cfg files

Open canassa opened this issue 5 years ago • 3 comments

Hello,

Setuptools supports configuring libraries using only the setup.cfg nowadays., see:

https://setuptools.readthedocs.io/en/latest/setuptools.html#configuring-setup-using-setup-cfg-files

It would be nice if pip-upgrader could parse that aswell. I think that it should limit itself for dependencies are pinned e.g.:

[options.extras_require]
tests =
    flake8==3.7.8
    isort==4.3.21
    mypy==0.711
    pytest==5.0.1
    pytest-cov==2.7.1
    black==19.3b0
    pre-commit==1.17.0
    bump2version==0.5.10

And not so much for the version ranges.

Let me know if this is a welcome addition, I could maybe contribute to the project myself 😁

Thanks!

canassa avatar Aug 30 '19 12:08 canassa

It would be a great addition. 💪

I'm also intending to remove package installation feature (ie: --skip-package-installation), and just update the requirtements/setup.cfg files with the new versions. This would allow me to implement support for Pipenv (nowadays I'm using pipenv/Pipfile for managing packages and virtualenvs).

simion avatar Sep 04 '19 08:09 simion

Since I recently migrated all my reqs.txt files to setup.cfg pip-upgraded become useless as it fails to find any kind of requirements. It would be great to add support for setup.cfg as this is the future.

ssbarnea avatar Oct 15 '19 19:10 ssbarnea

An identical use-case is tox and deps, so an implementation should have a set of patterns for sections+keys like [options.extras_require]*, [testenv*]deps, and so on. The filename should be passed like any requirements file, so that tox.ini could also be used.

jhermann avatar Jul 13 '20 15:07 jhermann