@@ -54,75 +54,75 @@ def system(cmd, msg=""):
54
54
55
55
56
56
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 )
59
59
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 )
62
62
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 )
65
65
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 )
68
68
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 )
71
71
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 )
74
74
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 )
77
77
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 )
80
80
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 )
83
83
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 )
86
86
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 )
89
89
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 )
92
92
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 )
95
95
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 )
98
98
99
99
# Does not yet work
100
- # def h5py(*args ):
100
+ # def h5py(**kwargs ):
101
101
# try:
102
102
# import pkgconfig
103
103
# except ImportError:
104
104
# 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 )
107
107
108
108
# Does not yet work
109
- # def keras_applications(*args ):
109
+ # def keras_applications(**kwargs ):
110
110
# try:
111
111
# import h5py
112
112
# except ImportError:
113
113
# 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 )
116
116
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 )
119
119
120
- def numpy (* args ):
120
+ def numpy (** kwargs ):
121
121
try :
122
122
import setuptools as st
123
123
except ImportError :
124
124
print ("Installing required dependency: setuptools" )
125
- setuptools (* args )
125
+ setuptools (** kwargs )
126
126
127
127
patch = """
128
128
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):
370
370
2.14.1
371
371
372
372
"""
373
- install_from_pypi ("numpy==1.14.3" , patch = patch , extra_opts = args )
373
+ install_from_pypi ("numpy==1.14.3" , patch = patch , ** kwargs )
374
374
375
375
376
- def dateutil (* args ):
376
+ def dateutil (** kwargs ):
377
377
try :
378
378
import setuptools_scm as st_scm
379
379
except ImportError :
380
380
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 )
383
383
384
384
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 )
387
387
388
388
389
- def pandas (* args ):
389
+ def pandas (** kwargs ):
390
390
try :
391
391
import numpy as np
392
392
except ImportError :
393
393
print ("Installing required dependency: numpy" )
394
- numpy (* args )
394
+ numpy (** kwargs )
395
395
396
396
397
397
try :
398
398
import pytz as _dummy_pytz
399
399
except ImportError :
400
400
print ("Installing required dependency: pytz" )
401
- pytz (* args )
401
+ pytz (** kwargs )
402
402
403
403
try :
404
404
import six as _dummy_six
405
405
except ImportError :
406
406
print ("Installing required dependency: six" )
407
- six (* args )
407
+ six (** kwargs )
408
408
409
409
try :
410
410
import dateutil as __dummy_dateutil
411
411
except ImportError :
412
412
print ("Installing required dependency: dateutil" )
413
- dateutil (* args )
413
+ dateutil (** kwargs )
414
414
415
415
# download pandas-0.20.3
416
416
patch = """diff --git a/pandas/_libs/src/period_helper.c b/pandas/_libs/src/period_helper.c
@@ -474,7 +474,7 @@ def pandas(*args):
474
474
475
475
"""
476
476
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 )
478
478
479
479
return locals ()
480
480
@@ -643,7 +643,7 @@ def main(argv):
643
643
xit ("Unknown package: '%s'" % pkg )
644
644
else :
645
645
if args .prefix :
646
- KNOWN_PACKAGES [pkg ]("--prefix" , args .prefix )
646
+ KNOWN_PACKAGES [pkg ](extra_opts = [ "--prefix" , args .prefix ] )
647
647
else :
648
648
KNOWN_PACKAGES [pkg ]()
649
649
elif args .command == "pypi" :
0 commit comments