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

Improve environment to replace inline activate virtualenv #3276

Closed
wants to merge 2 commits into from

Conversation

frostming
Copy link
Contributor

The fix

I am not confident with the windows CI, let's see.

The checklist

  • Associated issue
  • A news fragment in the news/ directory to describe this fix with the extension .bugfix, .feature, .behavior, .doc. .vendor. or .trivial (this will appear in the release changelog). Use semantic line breaks and name the file after the issue number or the PR #.

Signed-off-by: Frost Ming <mianghong@gmail.com>
extra_dists = list(self.extra_dists) + extra_dists
for extra_dist in extra_dists:
if extra_dist not in self.get_working_set():
extra_dist.activate(self.sys_path)
# Move the added paths to the front
new_paths = []
for item in list(sys.path):
Copy link
Member

Choose a reason for hiding this comment

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

You'll need to do some normalization here, also I'm not totally sure you need to put things at the front. You can probably just do sys.path = list(set(sys.path) | set(original_path)) (why is this necessary though?)

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Oh, it is just taken from activate_this.py, where I think virtualenv paths should always take priority to other paths.

@frostming
Copy link
Contributor Author

Close this for now as discussed.

@frostming frostming closed this Nov 22, 2018
@techalchemy
Copy link
Member

well you don't need to close -- just want to hold off merging until after the bugfix release since i want to keep back any changes that aren't specifically fixing things

@frostming
Copy link
Contributor Author

It doesn't matter, I will keep that branch.

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.

pipenv installs into python installation and not virtualenv
2 participants