Skip to content
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

Fix sdist make #10366

Merged
merged 4 commits into from
Jan 29, 2025
Merged

Fix sdist make #10366

merged 4 commits into from
Jan 29, 2025

Conversation

mgorny
Copy link
Contributor

@mgorny mgorny commented Jan 29, 2025

What do these changes do?

Three fixes related to use of source distribution to build aiohttp:

  1. Add missing tools directory to sdist, as it is required by the Makefile targets.
  2. Fix tools/gen.py to work outside a git checkout, by looking for pyproject.toml rather than .git.
  3. Add a cythonize-nodeps target that can be used by downstream packagers to perform cythonization without calling pip.

Are there changes in behavior for the user?

This fixes the ability to call make when working in an unpacked source distribution (currently it would fail due to missing tools/gen.py).

Is it a substantial burden for the maintainers to support this?

Don't think so. Worst case, the extra Makefile rule would go out of sync.

Related issue number

n/a

Checklist

  • I think the code is well written
  • Unit tests for the changes exist
  • Documentation reflects the changes
  • If you provide code modification, please add yourself to CONTRIBUTORS.txt
  • Add a new news fragment into the CHANGES/ folder

Include the `tools` directory in source distribution, as at least
`tools/gen.py` and `tools/check_sum.py` are expected by the `Makefile`
targets.
Modify `tools/gen.py` to determine the top project directory
by the presence of `pyproject.toml` rather than `.git`, in order to make
it work correctly outside a git checkout.  This is needed to make
the `Makefile` targets work.
Add a `cythonize-nodeps` target that can be used by downstreams
who wish to re-Cythonize files and have provided the necessary
dependencies externally.  Calling `pip` is undesirable, as it causes
sandbox violations.
@psf-chronographer psf-chronographer bot added the bot:chronographer:provided There is a change note present in this PR label Jan 29, 2025
@mgorny mgorny marked this pull request as ready for review January 29, 2025 14:43
@bdraco bdraco added backport-3.11 Trigger automatic backporting to the 3.11 release branch by Patchback robot backport-3.12 Trigger automatic backporting to the 3.12 release branch by Patchback robot labels Jan 29, 2025
Copy link

codecov bot commented Jan 29, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 98.77%. Comparing base (b1fd346) to head (f1afe62).
Report is 2 commits behind head on master.

Additional details and impacted files
@@            Coverage Diff             @@
##           master   #10366      +/-   ##
==========================================
- Coverage   98.78%   98.77%   -0.01%     
==========================================
  Files         122      122              
  Lines       37038    37038              
  Branches     2041     2041              
==========================================
- Hits        36588    36585       -3     
- Misses        311      314       +3     
  Partials      139      139              
Flag Coverage Δ
CI-GHA 98.66% <ø> (-0.01%) ⬇️
OS-Linux 98.35% <ø> (-0.01%) ⬇️
OS-Windows 96.26% <ø> (ø)
OS-macOS 97.46% <ø> (-0.01%) ⬇️
Py-3.10.11 97.36% <ø> (-0.01%) ⬇️
Py-3.10.16 97.92% <ø> (ø)
Py-3.11.11 98.01% <ø> (-0.01%) ⬇️
Py-3.11.9 97.44% <ø> (+<0.01%) ⬆️
Py-3.12.8 98.44% <ø> (ø)
Py-3.13.1 98.43% <ø> (ø)
Py-3.9.13 97.25% <ø> (-0.01%) ⬇️
Py-3.9.21 97.80% <ø> (ø)
Py-pypy7.3.16 97.39% <ø> (-0.01%) ⬇️
VM-macos 97.46% <ø> (-0.01%) ⬇️
VM-ubuntu 98.35% <ø> (-0.01%) ⬇️
VM-windows 96.26% <ø> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.

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

Copy link

codspeed-hq bot commented Jan 29, 2025

CodSpeed Performance Report

Merging #10366 will not alter performance

Comparing mgorny:fix-sdist-make (f1afe62) with master (f667a40)

Summary

✅ 47 untouched benchmarks

@Dreamsorcerer Dreamsorcerer merged commit 3fb2c8d into aio-libs:master Jan 29, 2025
40 checks passed
Copy link
Contributor

patchback bot commented Jan 29, 2025

Backport to 3.11: 💚 backport PR created

✅ Backport PR branch: patchback/backports/3.11/3fb2c8dfcc8f52089cb48a1136d3e569d1ac73ff/pr-10366

Backported as #10367

🤖 @patchback
I'm built with octomachinery and
my source is open — https://github.com/sanitizers/patchback-github-app.

patchback bot pushed a commit that referenced this pull request Jan 29, 2025
(cherry picked from commit 3fb2c8d)
Copy link
Contributor

patchback bot commented Jan 29, 2025

Backport to 3.12: 💚 backport PR created

✅ Backport PR branch: patchback/backports/3.12/3fb2c8dfcc8f52089cb48a1136d3e569d1ac73ff/pr-10366

Backported as #10368

🤖 @patchback
I'm built with octomachinery and
my source is open — https://github.com/sanitizers/patchback-github-app.

patchback bot pushed a commit that referenced this pull request Jan 29, 2025
(cherry picked from commit 3fb2c8d)
@mgorny
Copy link
Contributor Author

mgorny commented Jan 29, 2025

Thanks a lot!

@mgorny mgorny deleted the fix-sdist-make branch January 29, 2025 16:12
Dreamsorcerer pushed a commit that referenced this pull request Jan 29, 2025
**This is a backport of PR #10366 as merged into master
(3fb2c8d).**

Co-authored-by: Michał Górny <[email protected]>
@webknjaz
Copy link
Member

@mgorny thanks! Eventually we'll migrate to something similar to what yarl and others do. But for now, this is good to have.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
backport-3.11 Trigger automatic backporting to the 3.11 release branch by Patchback robot backport-3.12 Trigger automatic backporting to the 3.12 release branch by Patchback robot bot:chronographer:provided There is a change note present in this PR
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants