Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Find module path at runtime #89

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

Merged
merged 2 commits into from
Feb 8, 2025
Merged

Conversation

iyanmv
Copy link
Contributor

@iyanmv iyanmv commented Feb 2, 2025

Currently, test_if_compiled() only passes if you run the test while being in the source repository. Trying to run the test after installing the generated wheel package in a different directory will fail because "./constraint" may not exist, or worse, give a false failure since the shared libraries might exist in the wheel package but not in the source directory.

Instead, let's get the get the path of constraint at runtime so that the test can be run in both scenarios.

(I'm not sure if this will work as-it-is with current GitHub Actions, so opening this PR to figure it out)

Currently, this test only passes if you run the test while being in the
source repository. Trying to run the test after installing the generated
wheel package in a different directory will fail because "./constraint" may
not exist, or worse, give a false failure since the shared libraries
might exist in the wheel package but not in the source directory.
@coveralls
Copy link

Coverage Status

coverage: 87.109%. remained the same
when pulling 5285a06 on iyanmv:path-test
into 97f4cd6 on python-constraint:main.

@fjwillemsen fjwillemsen merged commit 5a42848 into python-constraint:main Feb 8, 2025
1 check passed
@fjwillemsen
Copy link
Member

@iyanmv thank you for contributing another fix! It will be included in the next release. If you need it sooner than that, let me know and I'll release an intermediate version.

@iyanmv
Copy link
Contributor Author

iyanmv commented Feb 8, 2025

@iyanmv thank you for contributing another fix! It will be included in the next release. If you need it sooner than that, let me know and I'll release an intermediate version.

No, no need for an early release ;)

@fjwillemsen
Copy link
Member

I've just released this in 2.0.3. Thank you again!

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.

3 participants