Skip to content

feat: added support for pkg-config #2958

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

Draft
wants to merge 18 commits into
base: main
Choose a base branch
from

Conversation

esafak
Copy link
Contributor

@esafak esafak commented Aug 14, 2025

To do this, I modified the activation scripts for all supported shells. Now, when you activate a virtual environment, the lib/pkgconfig directory will be prepended to the PKG_CONFIG_PATH environment variable. The original value is restored upon deactivation.

I also added unit tests for each shell to verify that the activation scripts are generated correctly and that PKG_CONFIG_PATH is set and unset as expected.

  • ran the linter to address style issues (tox -e fix)
  • wrote descriptive pull request text
  • ensured there are test(s) validating the fix
  • added news fragment in docs/changelog folder
  • updated/extended the documentation

esafak added 2 commits August 14, 2025 00:09
To do this, I modified the activation scripts for all supported shells. Now, when you activate a virtual environment, the `lib/pkgconfig` directory will be prepended to the `PKG_CONFIG_PATH` environment variable. The original value is restored upon deactivation.

I also added unit tests for each shell to verify that the activation scripts are generated correctly and that `PKG_CONFIG_PATH` is set and unset as expected.

Signed-off-by: Emre Şafak <3928300+esafak@users.noreply.github.com>
Signed-off-by: Emre Şafak <3928300+esafak@users.noreply.github.com>
@gaborbernat gaborbernat marked this pull request as draft August 14, 2025 05:39
esafak and others added 16 commits August 14, 2025 09:57
Signed-off-by: Emre Şafak <3928300+esafak@users.noreply.github.com>
* Escapes the '&' character within the VIRTUAL_ENV_PROMPT variable in the batch activator. This prevents issues with batch scripts interpreting '&' as a command separator.
* Removes an unnecessary '&' escaping from the test helper function `quote`, as the main logic now handles this correctly.

Signed-off-by: Emre Şafak <3928300+esafak@users.noreply.github.com>
Signed-off-by: Emre Şafak <3928300+esafak@users.noreply.github.com>
# Conflicts:
#	src/virtualenv/activation/via_template.py
Signed-off-by: Emre Şafak <3928300+esafak@users.noreply.github.com>
Signed-off-by: Emre Şafak <3928300+esafak@users.noreply.github.com>
Signed-off-by: Emre Şafak <3928300+esafak@users.noreply.github.com>
Signed-off-by: Emre Şafak <3928300+esafak@users.noreply.github.com>
Signed-off-by: Emre Şafak <3928300+esafak@users.noreply.github.com>
Signed-off-by: Emre Şafak <3928300+esafak@users.noreply.github.com>
Signed-off-by: Emre Şafak <3928300+esafak@users.noreply.github.com>
Signed-off-by: Emre Şafak <3928300+esafak@users.noreply.github.com>
Signed-off-by: Emre Şafak <3928300+esafak@users.noreply.github.com>
Signed-off-by: Emre Şafak <3928300+esafak@users.noreply.github.com>
Signed-off-by: Emre Şafak <3928300+esafak@users.noreply.github.com>
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.

1 participant