Skip to content

Conversation

@mxschmitt
Copy link
Contributor

@mxschmitt mxschmitt commented Nov 12, 2024

Similar to microsoft/playwright-pytest#254 - a little bit more complex here, because we previously were generating multiple wheels out of a single setup.py invocation. This is not supported with their new build infrastructure. To workaround this, I manage the loop from the outside which seems to work as well.

This addresses #2124 (comment).

@mxschmitt mxschmitt force-pushed the convert-to-build branch 4 times, most recently from 12de833 to 8a652e7 Compare November 12, 2024 00:38


class PlaywrightBDistWheelCommand(BDistWheelCommand):
user_options = BDistWheelCommand.user_options + [
Copy link
Contributor Author

@mxschmitt mxschmitt Nov 12, 2024

Choose a reason for hiding this comment

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

Env var seems simpler, since option passing via build is not fully working anyways: pypa/setuptools#2491. Changed it from --all to explicitly passing the output wheel name.

print(bundle["wheel"])
exit(0)

from setuptools import setup # noqa: E402
Copy link
Contributor Author

Choose a reason for hiding this comment

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

The order here is non-common because we have the dependencies available only in non-build environments since I removed the deps from local-requirements.txt.

json: typing.Optional[typing.Any] = None,
path: typing.Optional[typing.Union[str, pathlib.Path]] = None,
content_type: typing.Optional[str] = None,
response: typing.Optional["APIResponse"] = None
Copy link
Contributor Author

Choose a reason for hiding this comment

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

I'll extract them into a separate PR tomorrow.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Extracted into #2646.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Its hard to split the changes, since black starts reading [project.requires-python] from the pyproject.toml. Lets land together.


wheels = base_wheel_bundles
if not self.all:
# Limit to 1, since for MacOS e.g. we have multiple wheels for the same platform and architecture and Conda expects 1.
Copy link
Member

Choose a reason for hiding this comment

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

is this comment still relevant? if so restore?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Not anymore since we always output a single wheel now instead of multiple like before.

@mxschmitt mxschmitt requested a review from yury-s November 12, 2024 01:25
@mxschmitt mxschmitt merged commit 4fd5de0 into main Nov 12, 2024
39 of 40 checks passed
@mxschmitt mxschmitt deleted the convert-to-build branch November 12, 2024 10:41
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