tomerfiliba / plumbum

Plumbum: Shell Combinators
https://plumbum.readthedocs.io
MIT License
2.81k stars 183 forks source link

Removed setup.py. #546

Closed KOLANICH closed 2 years ago

KOLANICH commented 3 years ago

It turned out that only setup.cfg is enough for modern setuptools.

henryiii commented 3 years ago

Yeah, but then you can't do editable installs for development 👎 , and you lose GitHub's dependency graph for Python projects, since it doesn't trigger as a Python project (as of about a year ago, maybe they've fixed that now).

henryiii commented 3 years ago

The first problem will be fixed in the next Pip release: https://github.com/pypa/pip/pull/9547 :) So I'd be more-or-less fine with it once there's a new pip. It does mean Python 2 and 3.5 development will be harder, but a) I don't do Python 2 development, I just fix CI issues when it fails, and b) these versions of Python will be dropped in the version after the "split-up" next version.

henryiii commented 3 years ago

The dependency graph is broken currently anyway, so losing setup.py won't be a big deal for that.

henryiii commented 3 years ago

Pip 21.1 is out. Will take a little while to show up in CI, and it will never support 2.7 and 3.5, so will likely wait till the next Plumbum version is out before merging. We need the editable mode for computing coverage, IIRC.

piotr-dobrogost commented 3 years ago

Are you aware of Remove support for setup.cfg only projects change in pip?

henryiii commented 3 years ago

That's poorly named. That only removes support for projects that have a setup.cfg but not a pyproject.toml, which was accidentally added in 21.1.2. We have a pyproject.toml.

And, yes, I was the one who caught the problem in 21.1.2 and asked for that PR, if you follow through the various discussions. :)

henryiii commented 2 years ago

I'm going to be very tempted to move to PyPA/flit with PEP 621 configuration instead of just deleting setup.py once we drop 2.7 & 3.5 support. The only thing we'd loose is the automatic versioning, which is admittedly a bummer. Thoughts? (By the time we do it, the PR to add PEP 621 to setuptools might be ready, but flit is still 10 faster...)

KOLANICH commented 2 years ago

The only thing we'd loose is the automatic versioning, which is admittedly a bummer.

If I remember right, poetry_core is capable to call setuptools plugins like setuptools_scm (and setuptools and poetry_core always call them, and the plugins check pyproject.toml for their configs themselves). Though I don't approve poetry tool itself (for it being adept of a cargo cult of virtualenvs and using them), poetry_core doesn't follow this approach (venvs are not mandatory) and so works pretty fine.

coveralls commented 2 years ago

Coverage Status

Coverage remained the same at 83.599% when pulling 23e4dcaaf23ff037bf899afb5777e4053d27d16d on KOLANICH-libs:remove_setup.py into 96e996aab720298e724afb420b1e5179b469c167 on tomerfiliba:master.

henryiii commented 2 years ago

I think PyPA/Hatch's hatchling is the right direction for Plumbum to rid itself of setup.py, FYI.

henryiii commented 2 years ago

FYI, after a little bit (to make sure there aren't regressions in 1.8.0), I'll drop 3.6 then merge the hatchling PR, which will remove setup.py. :)

KOLANICH commented 2 years ago

OK.