Skip to content

Conversation

freakboy3742
Copy link
Contributor

Ensure that if a test-sources configuration is provided, it's only copied on the first test pass.

If a macOS project provides a test-sources configuration, and that project is tested on universal architecture, there are 2 test passes. As currently configured, the second pass will fail beacuse the test-sources folder already exists.

Adds an explicit test of test-sources on macOS, in both universal and non-universal configurations.

Fixes #2283.

Copy link
Contributor

@joerick joerick left a comment

Choose a reason for hiding this comment

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

Thanks for catching this @freakboy3742 !

"CIBW_ARCHS": "universal2" if build_universal2 else "x86_64 arm64",
"CIBW_BUILD_VERBOSITY": "3",
},
add_env=dict(
Copy link
Contributor

Choose a reason for hiding this comment

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

Nit: I prefer {}, it's a bit faster (native syntax) and works in all cases (dict requires valid identifier keys), and ** still works.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

TIL - I didn't know ** syntax was legal inside {}. I've always fallen back to dict() when keyword expansion was needed. I'll push a cleanup.

@joerick joerick merged commit 4d37797 into pypa:main Feb 26, 2025
25 checks passed
@freakboy3742 freakboy3742 deleted the macos-universal-test-sources branch February 26, 2025 12:15
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.

macOS universal builds fail if test-sources contains a directory

3 participants