cli icon indicating copy to clipboard operation
cli copied to clipboard

migrate setup.py to setup.cfg

Open deronnax opened this issue 2 years ago • 1 comments

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.

deronnax avatar Jan 23 '24 18:01 deronnax

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
@@            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.

codecov-commenter avatar Jan 23 '24 20:01 codecov-commenter

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

jkbrzt avatar Mar 04 '24 14:03 jkbrzt

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.

deronnax avatar Mar 05 '24 15:03 deronnax

@deronnax thanks!

jkbrzt avatar Mar 18 '24 15:03 jkbrzt

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

jkbrzt avatar Mar 18 '24 15:03 jkbrzt

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

deronnax avatar Mar 18 '24 16:03 deronnax