-
Notifications
You must be signed in to change notification settings - Fork 137
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
flit: improve the --python option #667
Conversation
Hello, this is my first PR for this project. I decided to adopt flit due to its simplicity. The PR does not include a test, but it seems that there are no tests for the |
Thanks for the contribution! I think this feature makes sense.
Not for passing |
Ok. I also noted that What about a test like: def test_env(tmp_path):
path = tmp_path / "venv"
venv.create(path)
executable = pathlib.Path(find_python_executable(path))
assert executable.parent.parent.name == "venv" ? The test needs to import the I would also like to add a test to ensure that a relative path to a venv is converted to an absolute path, but I'm not sure how to do it. A possible solution is to use |
That sounds reasonable, thanks.
Use pytest's monkeypatch fixture, and call |
pip --python option can take both the path to a Python executable or the path to a virtual environment, greatly improving the user experience. Teach flit to do the same.
d9adf5c
to
847d53e
Compare
I avoided importing the |
Thanks @perillo, nice first contribution. 🙂 |
@takluyver Thanks to you. |
pip --python option can take both the path to a Python executable or the path to a virtual environment, greatly improving the user experience.
Teach flit to do the same.