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

Use sys.executable rather than "python" to invoke pytest #167

Merged
merged 1 commit into from
Jan 2, 2025

Conversation

musicinmybrain
Copy link
Contributor

This supports environments where the Python interpreter is not named "python". For example, in Fedora it is "python3" unless the python-unversioned-command package is installed.

@15r10nk
Copy link
Owner

15r10nk commented Dec 22, 2024

Thank you. The reason for the build failures is probably on my side. I had the brilliant/stupid idea to use UV inside pytest to test different dependency versions for specific tests. I think I will revert this change because it causes more problems than it solves.

@musicinmybrain
Copy link
Contributor Author

Ok! Thanks for following up. For now, this PR is working for me in Fedora.

As the primary maintainer of the python-inline-snapshot package in Fedora, please let me know if there’s anything specific (testing, commentary on distribution packaging practices, etc.) that you need from me.

This supports environments where the Python interpreter is not named
"python". For example, in Fedora it is "python3" unless the
python-unversioned-command package is installed.
@15r10nk 15r10nk merged commit 8031edd into 15r10nk:main Jan 2, 2025
58 checks passed
@15r10nk
Copy link
Owner

15r10nk commented Jan 2, 2025

I reverted my changes in #168, your patch works now also for me.

This is my first project which gets packaged. Let me know if I can do something which makes it easier for people to add inline-snapshot packages into distributions.

Are there any common guidelines which I can follow?

@musicinmybrain
Copy link
Contributor Author

Overall, things are pretty good with respect to downstream packaging!

The migration to dependency groups for “dev” dependencies is actually really nice, because – while I do have to filter out coverage-analysis and linting dependencies – this puts all the testing dependencies in one place that I can use to generate RPM BuildRequires for running the package’s tests.

It would be even nicer if there were one place I could get a list of all test dependencies without linting and coverage dependencies, but the situation is already much better than it was when the complete list of test dependencies was scattered around various hatch-specific configurations.

In case you’re curious, python-inline-snapshot is packaged in Fedora as a test dependency for python-fastapi, python-pydantic-core, and python-rich-toolkit. I expect it will also soon find its way into EPEL10 along with python-pydantic/python-pydantic-core.

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.

2 participants