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

Enable universal wheel build on CI #883

Closed
wants to merge 4 commits into from

Conversation

jku
Copy link

@jku jku commented Sep 14, 2023

What do these changes do?

Enable building of universal (pure python) build on the CD release pipeline.

Are there changes in behavior for the user?

A universal wheel will be available on PyPI.

Related issue number

Fixes #881

Checklist

  • I think the code is well written
  • Unit tests for the changes exist
  • Documentation reflects the changes
  • Add a new news fragment into the CHANGES folder

Details

The PR has not been tested yet: running the workflow in a fork does not work so I'll have to rely on the test results here in the PR...

@psf-chronographer psf-chronographer bot added the bot:chronographer:provided There is a change note present in this PR label Sep 14, 2023
@jku jku marked this pull request as ready for review September 14, 2023 07:26
@jku
Copy link
Author

jku commented Sep 18, 2023

[2023-09-14T13:15:25.468Z] ['info'] Pinging Codecov: https://codecov.io/upload/v4?package=github-action-2.1.0-uploader-0.6.2&token=*******&branch=enable-universal-wheel&build=6182260616&build_url=https%3A%2F%2Fgithub.com%2Faio-libs%2Fmultidict%2Factions%2Fruns%2F6182260616&commit=ec77ff325aa74f62399ac5d0af7c592e493c5953&job=CI&pr=883&service=github-actions&slug=aio-libs%2Fmultidict&name=&tag=&flags=&parent=
[2023-09-14T13:15:25.730Z] ['error'] There was an error running the uploader: Error uploading to [https://codecov.io:](https://codecov.io/) Error: There was an error fetching the storage URL during POST: 404 - {'detail': ErrorDetail(string='Unable to locate build via Github Actions API. Please upload with the Codecov repository upload token to resolve issue.', code='not_found')}
Error: Codecov: Failed to properly upload: The process '/home/runner/work/_actions/codecov/codecov-action/v2.1.0/dist/codecov' failed with exit code 255

aio-libs/upload-coverage fails like that. I don't think this is related to my changes but it does mean the changes are still not tested.

# Split ubuntu job for the sake of speed-up
# Add a pure python build and qemu builds
- os: ubuntu
noextensions: '1'
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is not the right places to add it. It would essentially run the same wheel creation under each Python version + waste a CI job. It can be done together with the sdist. Although, that should also be updated as it still invokes setup.py.

I'm doing a round of maintenance updates across the repos, including packaging and CI changes. frozenlist and yarl are updated, multidict is next on my list. So I'll take care of this in a standardized way.

@@ -7,7 +7,7 @@ Changelog
file is managed by towncrier. You *may* edit previous change logs to
fix problems like typo corrections or such.
To add a new change log entry, please see
https://pip.pypa.io/en/latest/development/#adding-a-news-entry
https://pip.pypa.io/en/latest/development/contributing/#news-entries
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This update could be useful as a separate PR.

@@ -0,0 +1 @@
Enable publishing a universal (pure Python) wheel on PyPI
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The change notes should use the past tense with the end-users as the target audience in mind. They should include full sentences with periods et al.
Also, "universal" is an incorrect term — conventionally, wheels tagged as py2.py3 used to be called universal. But we should only have py3 in the tag.

@@ -1,7 +1,7 @@
import os
import platform

NO_EXTENSIONS = bool(os.environ.get("MULTIDICT_NO_EXTENSIONS"))
NO_EXTENSIONS = os.environ.get("MULTIDICT_NO_EXTENSIONS", "0") == "1"
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is a semantic change that isn't even mentioned in the changelog. It's undesired at this point. But if we were to change it, this would mean a feature PR, made with more care.

@@ -6,7 +6,7 @@

from setuptools import Extension, setup

NO_EXTENSIONS = bool(os.environ.get("MULTIDICT_NO_EXTENSIONS"))
NO_EXTENSIONS = os.environ.get("MULTIDICT_NO_EXTENSIONS", "0") == "1"
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Same as the previous comment. Although, it doesn't matter much now, since I'll align the packaging with frozenlist and yarl soon.

@webknjaz webknjaz self-assigned this Dec 17, 2023
Previously providing values 0 and 1 had the same result: extensions
were disabled. Fix this so that MULTIDICT_NO_EXTENSIONS=0 leads to
enabled extensions.

Signed-off-by: Jussi Kukkonen <jkukkonen@google.com>
The build system already supports this, the CD job just needs to
do one build with MULTIDICT_NO_EXTENSIONS=1

Signed-off-by: Jussi Kukkonen <jkukkonen@google.com>
Signed-off-by: Jussi Kukkonen <jkukkonen@google.com>
Signed-off-by: Jussi Kukkonen <jkukkonen@google.com>
Copy link

codecov bot commented Dec 27, 2023

Codecov Report

All modified and coverable lines are covered by tests ✅

Comparison is base (38cbef7) 93.65% compared to head (8e244e2) 93.25%.

Additional details and impacted files
@@            Coverage Diff             @@
##           master     #883      +/-   ##
==========================================
- Coverage   93.65%   93.25%   -0.40%     
==========================================
  Files           5        5              
  Lines         504      504              
==========================================
- Hits          472      470       -2     
- Misses         32       34       +2     

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

@webknjaz
Copy link
Member

webknjaz commented Jan 2, 2024

Implemented in 7ba0e72.

@webknjaz webknjaz closed this Jan 2, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
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.

publish purepython/universal wheel?
2 participants