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

2.6.0: Use sorted(glob()) in example setup.py #2561

Merged
merged 1 commit into from
Oct 8, 2020

Conversation

jbarlow83
Copy link
Contributor

I suggest changing the example setup.py as follows below, to use a sorted glob instead of naming one source file.

This strategy eliminates errors from forgetting to enumerate source files one by one when a new .cpp is added. Using sorted(glob()) also ensures the build will be reproducible on file systems that do not enumerate files in sorted order (most Linux filesystems).

I also added a missing code-block directive.

Copy link
Collaborator

@henryiii henryiii left a comment

Choose a reason for hiding this comment

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

I think this looks like a good idea. Was trying to keep simple, but this doesn't add too much, and keeps the sorted detail present.

@henryiii henryiii added this to the v2.6.0 milestone Oct 8, 2020
@henryiii henryiii added the docs Docs or GitHub info label Oct 8, 2020
@henryiii henryiii merged commit 49cdb70 into pybind:master Oct 8, 2020
@github-actions github-actions bot added the needs changelog Possibly needs a changelog entry label Oct 8, 2020
@henryiii henryiii removed the needs changelog Possibly needs a changelog entry label Oct 9, 2020
@jbarlow83 jbarlow83 deleted the pr-sorted-glob branch December 9, 2020 20:17
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
docs Docs or GitHub info
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants