Skip to content

Commit 502a89d

Browse files
committed
add a few more packages we can install
1 parent 441e2e0 commit 502a89d

File tree

1 file changed

+12
-3
lines changed

1 file changed

+12
-3
lines changed

graalpython/lib-graalpython/modules/ginstall.py

Lines changed: 12 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -54,8 +54,17 @@ def system(cmd, msg=""):
5454

5555

5656
def known_packages():
57+
def PyYAML():
58+
install_from_pypi("PyYAML==3.13")
59+
60+
def six():
61+
install_from_pypi("six==1.12.0")
62+
63+
def Cython():
64+
install_from_pypi("Cython==0.29.2", ['--no-cython-compile'])
65+
5766
def setuptools():
58-
install_from_pypi("setuptools")
67+
install_from_pypi("setuptools==40.6.3")
5968

6069
def numpy():
6170
try:
@@ -318,7 +327,7 @@ def xit(msg, status=-1):
318327
exit(-1)
319328

320329

321-
def install_from_pypi(package):
330+
def install_from_pypi(package, extra_opts=[]):
322331
if "==" in package:
323332
package, _, version = package.rpartition("==")
324333
url = "https://pypi.org/pypi/%s/%s/json" % (package, version)
@@ -353,7 +362,7 @@ def install_from_pypi(package):
353362
else:
354363
xit("Unknown file type: %s" % filename)
355364

356-
status = os.system("cd %s/%s; %s setup.py install --user" % (tempdir, dirname, sys.executable))
365+
status = os.system("cd %s/%s; %s setup.py install --user %s" % (tempdir, dirname, sys.executable, " ".join(extra_opts)))
357366
if status != 0:
358367
xit("An error occurred trying to run `setup.py install --user'")
359368
else:

0 commit comments

Comments
 (0)