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

Refactor build rs #1350

Merged
merged 4 commits into from Jan 1, 2021
Merged

Refactor build rs #1350

merged 4 commits into from Jan 1, 2021

Conversation

davidhewitt
Copy link
Member

This PR makes some simplifications to build.rs, based on #1337:

  • Removes unicode flags
  • Support "default" windows cross-compile without PYO3_CROSS_INCLUDE_DIR header parsing
  • Some other cleanups/simplifications which seemed reasonable at the same time.

Copy link
Member

@kngwyu kngwyu left a comment

Choose a reason for hiding this comment

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

Nice, thank you!
Also, thanks @ravenexp for researching.

build.rs Outdated
static SYSCONFIG_FLAGS: [&str; 7] = [
"Py_USING_UNICODE",
"Py_UNICODE_WIDE",
type BuildFlag = &'static str;
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 really so meaningful?
I think maybe struct BuildFlags(HashSet<&'static str>) would be a better abstraction.
Then we can move BUILD_FLAGS into impl BuildFlags block.

build.rs Show resolved Hide resolved
@davidhewitt
Copy link
Member Author

Pushed a commit to use struct BuildFlags; will merge shortly so I can rebase #1347 on this.

@davidhewitt davidhewitt merged commit 42ca48a into PyO3:master Jan 1, 2021
@davidhewitt davidhewitt deleted the refactor-build-rs branch January 1, 2021 08:04
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.

None yet

2 participants