Skip to content

Fix for PYTHONPATH on Homebrew#30

Closed
derekbekoe wants to merge 3 commits intomicrosoft:masterfrom
derekbekoe:az-homebrew-fix
Closed

Fix for PYTHONPATH on Homebrew#30
derekbekoe wants to merge 3 commits intomicrosoft:masterfrom
derekbekoe:az-homebrew-fix

Conversation

@derekbekoe
Copy link
Contributor

Closes #25

@derekbekoe
Copy link
Contributor Author

I will look at addressing the TODO as well but this should fix it for the extension.

@chrmarti chrmarti added this to the March 2018 milestone Mar 7, 2018
Copy link
Contributor

@chrmarti chrmarti left a comment

Choose a reason for hiding this comment

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

Thanks @derekbekoe! I have add a few changes in #31.

const process = spawn(join(__dirname, `../../service/az-service${isWindows ? '.bat' : ''}`), [pythonLocation]);
private getSpawnProcessOptions(pythonLocation: string, cliVersion: string) {
if (process.platform == 'darwin' &&
pythonLocation.startsWith('/usr/local/opt/python3/bin/')) {
Copy link
Contributor

Choose a reason for hiding this comment

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

On my machine that is /usr/local/opt/python/bin/python3.6.

pythonLocation.startsWith('/usr/local/opt/python3/bin/')) {
let posPythonVersions = ['3.7', '3.6', '3.5', '3.4'];
for (let pyVer of posPythonVersions) {
let homebrew_cellar = `/usr/local/Cellar/azure-cli/${cliVersion}/libexec/lib/python${pyVer}/site-packages`;
Copy link
Contributor

Choose a reason for hiding this comment

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

On my machine the CLI version is 2.0.28 and the path segment is named 2.0.28_2.

@derekbekoe derekbekoe closed this Mar 7, 2018
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.

3 participants