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

Conditionally expand list-like environment variables in virtualenv generator #4396

Merged
merged 13 commits into from Jan 29, 2019

Conversation

Projects
None yet
4 participants
@danimtb
Copy link
Member

commented Jan 28, 2019

Changelog: Fix: Conditionally expand list-like environment variables in virtualenv generator
Docs: omit

  • Refer to the issue that supports this Pull Request: closes #3911
  • 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.

@danimtb danimtb added this to the 1.12 milestone Jan 28, 2019

@ghost ghost assigned danimtb Jan 28, 2019

@ghost ghost added the stage: review label Jan 28, 2019

@danimtb danimtb changed the title WIP: fix virtualenv prepend WIP: Conditionally expand list environment variables in virtualenv generator Jan 28, 2019

@danimtb danimtb changed the title WIP: Conditionally expand list environment variables in virtualenv generator WIP: Conditionally expand list-like environment variables in virtualenv generator Jan 28, 2019

danimtb added some commits Jan 28, 2019

@danimtb danimtb changed the title WIP: Conditionally expand list-like environment variables in virtualenv generator Conditionally expand list-like environment variables in virtualenv generator Jan 28, 2019

@danimtb danimtb assigned lasote and unassigned danimtb Jan 28, 2019

@danimtb danimtb requested a review from lasote Jan 28, 2019

@lasote

lasote approved these changes Jan 28, 2019

Copy link
Contributor

left a comment

I see no objections but it smells like a burger paying pull request...

@ghost ghost assigned danimtb Jan 28, 2019

@danimtb danimtb removed their assignment Jan 28, 2019

@@ -169,3 +174,22 @@ def environment_test(self):
"BCKW_SLASH": "old_BCKW_SLASH"}
with tools.environment_append(env):
self.basic_test(posix_empty_vars=False)

@unittest.skipIf(platform.system() == "Windows", "Needs bash terminal")

This comment has been minimized.

Copy link
@SSE4

SSE4 Jan 29, 2019

Contributor

bash is neither terminal nor terminal emulator, it's shell

This comment has been minimized.

Copy link
@SSE4

SSE4 Jan 29, 2019

Contributor

also, probably more correct check would be tools.which("bash") is not None, as it's possible to have bash on Windows (MSYS, Cygwin), as well as there are Unix systems with other shells besides bash.

client.run("install . -g virtualenv")
activate = load(os.path.join(client.current_folder, "activate.sh"))
self.assertIn("PREPEND_VAR=\"1\":\"2\":\"three\"${PREPEND_VAR+:$PREPEND_VAR}", activate)
client.runner("bash -c 'source \"%s/activate.sh\" && env'" % client.current_folder)

This comment has been minimized.

Copy link
@SSE4

SSE4 Jan 29, 2019

Contributor

this probably should use tools.bash_path in order to favor CONAN_BASH_PATH

@ghost ghost assigned danimtb Jan 29, 2019

@danimtb danimtb removed their assignment Jan 29, 2019

@ghost ghost assigned danimtb Jan 29, 2019

@danimtb danimtb removed their assignment Jan 29, 2019

@lasote lasote merged commit 1ee23e2 into conan-io:develop Jan 29, 2019

2 checks passed

continuous-integration/jenkins/pr-head This commit looks good
Details
license/cla Contributor License Agreement is signed.
Details

@ghost ghost removed the stage: review label Jan 29, 2019

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.