Skip to content

Commit 2f4651f

Browse files
committed
fix ginstall
1 parent ce71588 commit 2f4651f

File tree

1 file changed

+51
-51
lines changed

1 file changed

+51
-51
lines changed

graalpython/lib-graalpython/modules/ginstall.py

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

5555

5656
def known_packages():
57-
def PyYAML(*args):
58-
install_from_pypi("PyYAML==3.13", args)
57+
def PyYAML(**kwargs):
58+
install_from_pypi("PyYAML==3.13", **kwargs)
5959

60-
def six(*args):
61-
install_from_pypi("six==1.12.0", args)
60+
def six(**kwargs):
61+
install_from_pypi("six==1.12.0", **kwargs)
6262

63-
def Cython(*args):
64-
install_from_pypi("Cython==0.29.2", ('--no-cython-compile',) + args)
63+
def Cython(extra_opts=[], **kwargs):
64+
install_from_pypi("Cython==0.29.2", extra_opts=(['--no-cython-compile'] + extra_opts), **kwargs)
6565

66-
def setuptools(*args):
67-
install_from_pypi("setuptools==41.0.1", args)
66+
def setuptools(**kwargs):
67+
install_from_pypi("setuptools==41.0.1", **kwargs)
6868

69-
def pkgconfig(*args):
70-
install_from_pypi("pkgconfig==1.5.1", args)
69+
def pkgconfig(**kwargs):
70+
install_from_pypi("pkgconfig==1.5.1", **kwargs)
7171

72-
def wheel(*args):
73-
install_from_pypi("wheel==0.33.4", args)
72+
def wheel(**kwargs):
73+
install_from_pypi("wheel==0.33.4", **kwargs)
7474

75-
def protobuf(*args):
76-
install_from_pypi("protobuf==3.8.0", args)
75+
def protobuf(**kwargs):
76+
install_from_pypi("protobuf==3.8.0", **kwargs)
7777

78-
def Keras_preprocessing(*args):
79-
install_from_pypi("Keras-Preprocessing==1.0.5", args)
78+
def Keras_preprocessing(**kwargs):
79+
install_from_pypi("Keras-Preprocessing==1.0.5", **kwargs)
8080

81-
def gast(*args):
82-
install_from_pypi("gast==0.2.2", args)
81+
def gast(**kwargs):
82+
install_from_pypi("gast==0.2.2", **kwargs)
8383

84-
def astor(*args):
85-
install_from_pypi("astor==0.8.0", args)
84+
def astor(**kwargs):
85+
install_from_pypi("astor==0.8.0", **kwargs)
8686

87-
def absl_py(*args):
88-
install_from_pypi("absl-py==0.7.1", args)
87+
def absl_py(**kwargs):
88+
install_from_pypi("absl-py==0.7.1", **kwargs)
8989

90-
def mock(*args):
91-
install_from_pypi("mock==3.0.5", args)
90+
def mock(**kwargs):
91+
install_from_pypi("mock==3.0.5", **kwargs)
9292

93-
def Markdown(*args):
94-
install_from_pypi("Markdown==3.1.1", args)
93+
def Markdown(**kwargs):
94+
install_from_pypi("Markdown==3.1.1", **kwargs)
9595

96-
def Werkzeug(*args):
97-
install_from_pypi("Werkzeug==0.15.4", args)
96+
def Werkzeug(**kwargs):
97+
install_from_pypi("Werkzeug==0.15.4", **kwargs)
9898

9999
# Does not yet work
100-
# def h5py(*args):
100+
# def h5py(**kwargs):
101101
# try:
102102
# import pkgconfig
103103
# except ImportError:
104104
# print("Installing required dependency: pkgconfig")
105-
# pkgconfig(*args)
106-
# install_from_pypi("h5py==2.9.0", args)
105+
# pkgconfig(**kwargs)
106+
# install_from_pypi("h5py==2.9.0", **kwargs)
107107

108108
# Does not yet work
109-
# def keras_applications(*args):
109+
# def keras_applications(**kwargs):
110110
# try:
111111
# import h5py
112112
# except ImportError:
113113
# print("Installing required dependency: h5py")
114-
# h5py(*args)
115-
# install_from_pypi("Keras-Applications==1.0.6", args)
114+
# h5py(**kwargs)
115+
# install_from_pypi("Keras-Applications==1.0.6", **kwargs)
116116

117-
def setuptools_scm(*args):
118-
install_from_pypi("setuptools_scm==1.15.0rc1", extra_opts=args)
117+
def setuptools_scm(**kwargs):
118+
install_from_pypi("setuptools_scm==1.15.0rc1", **kwargs)
119119

120-
def numpy(*args):
120+
def numpy(**kwargs):
121121
try:
122122
import setuptools as st
123123
except ImportError:
124124
print("Installing required dependency: setuptools")
125-
setuptools(*args)
125+
setuptools(**kwargs)
126126

127127
patch = """
128128
diff --git a/setup.py 2018-02-28 17:03:26.000000000 +0100
@@ -370,47 +370,47 @@ def get_lapack_lite_sources(ext, build_dir):
370370
2.14.1
371371
372372
"""
373-
install_from_pypi("numpy==1.14.3", patch=patch, extra_opts=args)
373+
install_from_pypi("numpy==1.14.3", patch=patch, **kwargs)
374374

375375

376-
def dateutil(*args):
376+
def dateutil(**kwargs):
377377
try:
378378
import setuptools_scm as st_scm
379379
except ImportError:
380380
print("Installing required dependency: setuptools_scm")
381-
setuptools_scm(*args)
382-
install_from_pypi("python-dateutil==2.7.5", extra_opts=args)
381+
setuptools_scm(**kwargs)
382+
install_from_pypi("python-dateutil==2.7.5", **kwargs)
383383

384384

385-
def pytz(*args):
386-
install_from_pypi("pytz==2018.7", extra_opts=args)
385+
def pytz(**kwargs):
386+
install_from_pypi("pytz==2018.7", **kwargs)
387387

388388

389-
def pandas(*args):
389+
def pandas(**kwargs):
390390
try:
391391
import numpy as np
392392
except ImportError:
393393
print("Installing required dependency: numpy")
394-
numpy(*args)
394+
numpy(**kwargs)
395395

396396

397397
try:
398398
import pytz as _dummy_pytz
399399
except ImportError:
400400
print("Installing required dependency: pytz")
401-
pytz(*args)
401+
pytz(**kwargs)
402402

403403
try:
404404
import six as _dummy_six
405405
except ImportError:
406406
print("Installing required dependency: six")
407-
six(*args)
407+
six(**kwargs)
408408

409409
try:
410410
import dateutil as __dummy_dateutil
411411
except ImportError:
412412
print("Installing required dependency: dateutil")
413-
dateutil(*args)
413+
dateutil(**kwargs)
414414

415415
# download pandas-0.20.3
416416
patch = """diff --git a/pandas/_libs/src/period_helper.c b/pandas/_libs/src/period_helper.c
@@ -474,7 +474,7 @@ def pandas(*args):
474474
475475
"""
476476
cflags = "-allowcpp" if sys.implementation.name == "graalpython" else ""
477-
install_from_pypi("pandas==0.20.3", patch=patch, extra_opts=args, add_cflags=cflags)
477+
install_from_pypi("pandas==0.20.3", patch=patch, add_cflags=cflags, **kwargs)
478478

479479
return locals()
480480

@@ -643,7 +643,7 @@ def main(argv):
643643
xit("Unknown package: '%s'" % pkg)
644644
else:
645645
if args.prefix:
646-
KNOWN_PACKAGES[pkg]("--prefix", args.prefix)
646+
KNOWN_PACKAGES[pkg](extra_opts=["--prefix", args.prefix])
647647
else:
648648
KNOWN_PACKAGES[pkg]()
649649
elif args.command == "pypi":

0 commit comments

Comments
 (0)