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

python: Enter directory when creating venv #1339

Merged
merged 1 commit into from
Jul 24, 2024

Conversation

pinkwah
Copy link
Contributor

@pinkwah pinkwah commented Jul 22, 2024

This PR does several things in one go:

  1. Fixes libstdc++.so.6 issues due to poetry using unwrapped Python when used in combination with languages.python.directory. This was because the poetry env use wasn't given the source directory.

  2. Fixes poetry creating incorrect shebangs because languages.python.directory is a relative path. This is a known issue: poetry -C path/to/project add package installs package with relative path to python interpreter python-poetry/poetry#9415

  3. Cleans up the bash code by using pushd/popd.

I am a bit uncertain about the use of pushd/popd. It'd be nice to use them, but they can be replaced with a local variable.

@domenkozar
Copy link
Member

It seems like python-venv example is failing.

This commit does several things in one go:

1. Fixes `libstdc++.so.6` issues due to poetry using unwrapped Python
   when used in combination with `languages.python.directory`. This was
   because the `poetry env use` wasn't given the source directory.

2. Fixes poetry creating incorrect shebangs because
   `languages.python.directory` is a relative path. This is a known
   issue: python-poetry/poetry#9415

3. Cleans up the bash code by using pushd/popd.
@pinkwah
Copy link
Contributor Author

pinkwah commented Jul 24, 2024

Updated.

@domenkozar domenkozar merged commit 44bfc26 into cachix:main Jul 24, 2024
264 of 275 checks passed
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