httpie / cli

🥧 HTTPie CLI — modern, user-friendly command-line HTTP client for the API era. JSON support, colors, sessions, downloads, plugins & more.
https://httpie.io
BSD 3-Clause "New" or "Revised" License
32.67k stars 3.68k forks source link

migrate setup.py to setup.cfg #1553

Closed deronnax closed 3 months ago

deronnax commented 5 months ago

Setuptools recommends to use declarative setup.cfg over custom imperative setup.py (especially that this one grown some significant body hair) On the other hand, using data_files (that is used here for man pages) is deprecated and has no direct equivalent in declarative package definition, be it setup.cfg or pyproject.toml, so we might just not be able to replicate the thing.

codecov-commenter commented 5 months ago

Codecov Report

All modified and coverable lines are covered by tests :white_check_mark:

Project coverage is 94.22%. Comparing base (4d7d6b6) to head (bb13087). Report is 368 commits behind head on master.

:exclamation: Your organization needs to install the Codecov GitHub app to enable full functionality.

Additional details and impacted files ```diff @@ Coverage Diff @@ ## master #1553 +/- ## ========================================== - Coverage 97.28% 94.22% -3.07% ========================================== Files 67 113 +46 Lines 4235 7705 +3470 ========================================== + Hits 4120 7260 +3140 - Misses 115 445 +330 ```

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.

jkbrzt commented 3 months ago

@deronnax thanks for the PR! If we find a way to maintain full compatibility including data files, I’ll be happy to merge it.

deronnax commented 3 months ago

Sorry, I was wrong, it's actually doable. There you go. Don't forget to squash merge. Btw, it probably won't be doable with pyproject.toml, but that's a subject for another day.

jkbrzt commented 3 months ago

@deronnax thanks!

jkbrzt commented 3 months ago

It looks like the conditional Windows-only stuff like the colorama dependency has not been ported to the new setup.cfg. Tests pass because pytest depends on colorama as well I beliece.

https://github.com/httpie/cli/blob/3524ccf0baa9f2b3029368ab07ba5f64e62dcb1f/setup.py#L44-L63

deronnax commented 3 months ago

oops sorry. Actually that's tox that's depending colorama.