Skip to content

Modernize packaging #157

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 4 commits into
base: master
Choose a base branch
from
Open

Modernize packaging #157

wants to merge 4 commits into from

Conversation

cdce8p
Copy link

@cdce8p cdce8p commented Apr 13, 2025

  • Move project metadata to pyproject.toml
  • Use SPDX license identifier for PEP 639 license expression support -> BSD-3-Clause
    https://spdx.org/licenses/BSD-3-Clause.html
  • Remove include_package_data=True -> it's the default for pyproject.toml configs

Metadata diff

 ...
-Author: Ian Bicking
-Author-email: [email protected]
+Author-email: Ian Bicking <[email protected]>
-Maintainer: Paul Tremberth
-Maintainer-email: [email protected]
+Maintainer-email: Paul Tremberth <[email protected]>
-License: BSD
+License-Expression: BSD-3-Clause
-Home-page: https://github.com/scrapy/cssselect
+Project-URL: Homepage, https://github.com/scrapy/cssselect
 ...
-Classifier: License :: OSI Approved :: BSD License
 ...
 License-File: LICENSE
 License-File: AUTHORS
 ...

Copy link

codecov bot commented Apr 13, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 96.08%. Comparing base (d05e34e) to head (fb04b83).

Additional details and impacted files
@@           Coverage Diff           @@
##           master     #157   +/-   ##
=======================================
  Coverage   96.08%   96.08%           
=======================================
  Files           3        3           
  Lines         894      894           
  Branches      141      141           
=======================================
  Hits          859      859           
  Misses         14       14           
  Partials       21       21           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@wRAR
Copy link
Member

wRAR commented Apr 17, 2025

I think we'd prefer moving from setuptools to hatchling while doing this, can you include that or should we do this separately?

@cdce8p
Copy link
Author

cdce8p commented Apr 17, 2025

I think we'd prefer moving from setuptools to hatchling while doing this, can you include that or should we do this separately?

I usually prefer setuptools for projects if they have an existing config already but sure that can be changed. See 19da367.

I've compared the sdist and wheel to the one generated with setuptools and it looks fine. Would be great if you could double check that.

@wRAR
Copy link
Member

wRAR commented Apr 18, 2025

Thanks, this looks good except that it packaged the tests subdirs from the virtualenvs that I have in the working copy (cssselect-1.3.0/.env/lib/python3.13/site-packages/colorama/tests/__init__.py etc.), should the include paths be anchored?

@cdce8p
Copy link
Author

cdce8p commented Apr 18, 2025

should the include paths be anchored?

Yes, they should be. Fixed in fb04b83. Would you mind checking it again?
https://hatch.pypa.io/1.9/config/build/#patterns

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants