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

build: fix location of multiple exec artifacts #283

Merged
merged 1 commit into from
Aug 11, 2022

Conversation

davidhewitt
Copy link
Member

Closes #281

The call to _find_cargo_artifacts returned a generator, and then we searched this in a loop, causing unreliable results (e.g. the generator can be empty on the second turn of the loop). Changed _find_cargo_artifacts to return a list.

@davidhewitt
Copy link
Member Author

davidhewitt commented Aug 11, 2022

The line which searched the artefacts was below, but it's called in a loop, which is why the generator was a problem.

artifact_path = next(
artifact
for artifact in artifacts
if Path(artifact).with_suffix("").name == name
)

Copy link
Member

@messense messense left a comment

Choose a reason for hiding this comment

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

Looks good to me!

@messense messense merged commit 13fa941 into PyO3:main Aug 11, 2022
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.

Locating executable does not work properly
2 participants