Skip to content

Commit

Permalink
Remove dependency on pip.main, use subprocess.call instead. Fix #12.
Browse files Browse the repository at this point in the history
  • Loading branch information
pilcru committed Jul 2, 2019
1 parent 1df3447 commit 9f5e050
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions ghpythonremote/_configure_ironpython_installation.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import sys
import os
import pip
import logging
import subprocess
from shutil import copy, rmtree
from .helpers import get_rhino_ironpython_path

Expand All @@ -16,13 +16,14 @@

# Install the package to Rhino IronPython Users lib
package_name = 'gh-python-remote'
pip_cmd = ['install', '--upgrade', '--target=' + rhino_ironpython_path,
pip_cmd = [sys.executable, '-m', 'pip', 'install', '--upgrade',
'--target=' + rhino_ironpython_path,
'--no-binary=:all:', '--no-compile', '--ignore-requires-python',
'--process-dependency-links',
package_name, ]
print('\n\nThis will install ghpythonremote in Rhino IronPython with the command:')
print('pip ' + ' '.join(pip_cmd))
pip.main(pip_cmd)
print(' '.join(pip_cmd))
subprocess.call(pip_cmd)

# Get the Grasshopper libraries base dir
gh_userobjects_path = os.path.join(os.getenv('APPDATA', ''), 'Grasshopper', 'UserObjects')
Expand Down

0 comments on commit 9f5e050

Please sign in to comment.