Skip to content

Feature: Generator for python environment - #5511

Merged
lasote merged 14 commits into
conan-io:developfrom
birgerbr:virtualenv_python
Sep 14, 2019
Merged

lasote merged 14 commits into
conan-io:developfrom
birgerbr:virtualenv_python

Conversation

@birgerbr

@birgerbr birgerbr commented Jul 18, 2019

Copy link
Copy Markdown
Contributor

Changelog: Feature: Virtual environment generator for gathering only the PYTHONPATH.
Docs: conan-io/docs#1369

This pull-request closes #5157

  • Refer to the issue that supports this Pull Request.
  • If the issue has missing info, explain the purpose/use case/pain/need that covers this Pull Request.
  • I've read the Contributing guide.
  • I've followed the PEP8 style guides for Python code.
  • I've opened another PR in the Conan docs repo to the develop branch, documenting this one.

Note: By default this PR will skip the slower tests and will use a limited set of python versions. Check here how to increase the testing level by writing some tags in the current PR body text.

@lasote lasote added this to the 1.18 milestone Jul 26, 2019

@lasote lasote left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We would need some tests. We can help with that, just tell us.


def _python_paths(deps_env_info):
result = set()
for dep in deps_env_info.deps:

@lasote lasote Jul 26, 2019

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not sure if we should access directly to the aggregated value of deps_env_info.get("PYTHONPATH"). Have you tried? (note: I don't remember if that works)

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

self.deps_env_info.vars.get("PYTHONPATH", []) works.

@lasote lasote modified the milestones: 1.18, 1.19 Jul 29, 2019
@birgerbr
birgerbr force-pushed the virtualenv_python branch from 41e4922 to aff68b8 Compare August 1, 2019 08:33
@birgerbr

birgerbr commented Aug 1, 2019

Copy link
Copy Markdown
Contributor Author

We would need some tests. We can help with that, just tell us.

Added a test now. The test currently only supports Linux and Windows. Not sure what the file-extension and delimiter should be on other systems. I guess that most should be handled like Linux.

@birgerbr

Copy link
Copy Markdown
Contributor Author

The tests use file-extension '.sh' and delimiter ':' for other platform systems.

@birgerbr

Copy link
Copy Markdown
Contributor Author

Anny comments @lasote ?

@lasote

lasote commented Sep 13, 2019

Copy link
Copy Markdown
Contributor

@birgerbr I opened a PR in your fork with some modifications. Sorry for the delay :(

@birgerbr

Copy link
Copy Markdown
Contributor Author

@birgerbr I opened a PR in your fork with some modifications. Sorry for the delay :(

Aight ✌️ I'll check it out.

@lasote lasote self-assigned this Sep 13, 2019
Comment thread conans/test/functional/generators/virtualenv_python_test.py Outdated
Co-Authored-By: Luis Martinez de Bartolome Izquierdo <lasote@gmail.com>
@lasote
lasote merged commit db8a8c7 into conan-io:develop Sep 14, 2019
@lasote lasote removed their assignment Sep 26, 2019
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.

[suggestion] Add PYTHONPATH to virtualrunenv

3 participants