@@ -165,226 +165,16 @@ def run_cmd(args, msg="", failOnError=True, cwd=None, env=None, quiet=False, **k
165
165
166
166
167
167
def known_packages ():
168
- @pip_package ()
169
- def pytest (** kwargs ):
170
- setuptools (** kwargs )
171
- wcwidth (** kwargs )
172
- pluggy (** kwargs )
173
- atomicwrites (** kwargs )
174
- more_itertools (** kwargs )
175
- attrs (** kwargs )
176
- packaging (** kwargs )
177
- py (** kwargs )
178
- install_from_pypi ("pytest==5.1.0" , ** kwargs )
179
-
180
- @pip_package ()
181
- def pytest_parallel (** kwargs ):
182
- pytest (** kwargs )
183
- install_from_pypi ("pytest-parallel==0.0.9" , ** kwargs )
184
-
185
- @pip_package ()
186
- def py (** kwargs ):
187
- install_from_pypi ("py==1.8.0" , ** kwargs )
188
-
189
- @pip_package ()
190
- def attrs (** kwargs ):
191
-
192
- install_from_pypi ("attrs==19.2.0" , ** kwargs )
193
-
194
- @pip_package ()
195
- def pyparsing (** kwargs ):
196
- install_from_pypi ("pyparsing==2.4.2" , ** kwargs )
197
-
198
- @pip_package ()
199
- def packaging (** kwargs ):
200
- six (** kwargs )
201
- pyparsing (** kwargs )
202
- install_from_pypi ("packaging==19.0" , ** kwargs )
203
-
204
- @pip_package ()
205
- def more_itertools (** kwargs ):
206
- install_from_pypi ("more-itertools==7.0.0" , ** kwargs )
207
-
208
- @pip_package ()
209
- def atomicwrites (** kwargs ):
210
- install_from_pypi ("atomicwrites==1.3.0" , ** kwargs )
211
-
212
- @pip_package ()
213
- def pluggy (** kwargs ):
214
- zipp (** kwargs )
215
- install_from_pypi ("pluggy==0.13.1" , ** kwargs )
216
-
217
- @pip_package ()
218
- def zipp (** kwargs ):
219
- setuptools_scm (** kwargs )
220
- install_from_pypi ("zipp==0.5.0" , ** kwargs )
221
-
222
- @pip_package ()
223
- def wcwidth (** kwargs ):
224
- six (** kwargs )
225
- install_from_pypi ("wcwidth==0.1.7" , ** kwargs )
226
-
227
- @pip_package ()
228
- def PyYAML (** kwargs ):
229
- install_from_pypi ("PyYAML==3.13" , ** kwargs )
230
-
231
- @pip_package ()
232
- def six (** kwargs ):
233
- install_from_pypi ("six==1.16.0" , ** kwargs )
234
-
235
- @pip_package ()
236
- def threadpoolctl (** kwargs ):
237
- install_with_pip ("threadpoolctl==2.2.0" , ** kwargs )
238
-
239
- @pip_package ()
240
- def joblib (** kwargs ):
241
- install_with_pip ("joblib==1.2.0" , ** kwargs )
242
-
243
- @pip_package ()
244
- def cppy (** kwargs ):
245
- setuptools_scm (** kwargs )
246
- install_from_pypi ("cppy==1.2.1" , ** kwargs )
247
-
248
- @pip_package ()
249
- def kiwisolver (** kwargs ):
250
- cppy (** kwargs )
251
- install_with_pip ("kiwisolver==1.4.4" , ** kwargs )
252
-
253
- @pip_package ()
254
- def python_dateutil (** kwargs ):
255
- install_with_pip ("python_dateutil==2.8.2" , ** kwargs )
256
-
257
- @pip_package ()
258
- def Cython (extra_opts = None , ** kwargs ):
259
- if extra_opts is None :
260
- extra_opts = []
261
- install_from_pypi ("Cython==0.29.32" , extra_opts = ['--no-cython-compile' ] + extra_opts , ** kwargs )
262
-
263
- @pip_package ()
264
- def pybind11 (** kwargs ):
265
- install_from_pypi ("pybind11==2.10.0" , ** kwargs )
266
-
267
- @pip_package ()
268
- def pythran (** kwargs ):
269
- install_from_pypi ("pythran==0.12.0" , ** kwargs )
270
-
271
- @pip_package ()
272
- def setuptools (** kwargs ):
273
- six (** kwargs )
274
- install_from_pypi ("setuptools==63.2.0" , ** kwargs )
275
-
276
- @pip_package ()
277
- def pkgconfig (** kwargs ):
278
- install_from_pypi ("pkgconfig==1.5.1" , ** kwargs )
279
-
280
- @pip_package ()
281
- def wheel (** kwargs ):
282
- install_from_pypi ("wheel==0.38.*" , ** kwargs )
283
-
284
- @pip_package ()
285
- def protobuf (** kwargs ):
286
- install_from_pypi ("protobuf==3.8.0" , ** kwargs )
287
-
288
- @pip_package ()
289
- def Keras_preprocessing (** kwargs ):
290
- install_from_pypi ("Keras-Preprocessing==1.0.5" , ** kwargs )
291
-
292
- @pip_package ()
293
- def gast (** kwargs ):
294
- install_from_pypi ("gast==0.2.2" , ** kwargs )
295
-
296
- @pip_package ()
297
- def astor (** kwargs ):
298
- install_from_pypi ("astor==0.8.0" , ** kwargs )
299
-
300
- @pip_package ()
301
- def absl_py (** kwargs ):
302
- install_from_pypi ("absl-py==0.7.1" , ** kwargs )
303
-
304
- @pip_package ()
305
- def mock (** kwargs ):
306
- install_from_pypi ("mock==3.0.5" , ** kwargs )
307
-
308
- @pip_package ()
309
- def Markdown (** kwargs ):
310
- install_from_pypi ("Markdown==3.1.1" , ** kwargs )
311
-
312
- @pip_package ()
313
- def Werkzeug (** kwargs ):
314
- install_from_pypi ("Werkzeug==0.15.4" , ** kwargs )
315
-
316
168
@pip_package ()
317
169
def h5py (** kwargs ):
318
- numpy (** kwargs )
319
- Cython (** kwargs )
170
+ install_with_pip ('numpy' )
320
171
install_from_pypi ("h5py==2.10.0" , ** kwargs )
321
172
322
- @pip_package ()
323
- def sortedcontainers (** kwargs ):
324
- install_from_pypi ("sortedcontainers==2.1.0" , ** kwargs )
325
-
326
- @pip_package ()
327
- def hypothesis (** kwargs ):
328
- setuptools (** kwargs )
329
- attrs (** kwargs )
330
- sortedcontainers (** kwargs )
331
- install_from_pypi ("hypothesis==5.41.1" , ** kwargs )
332
-
333
- @pip_package ()
334
- def setuptools_scm (** kwargs ):
335
- setuptools (** kwargs )
336
- install_with_pip ("setuptools_scm==7.1.0" , ** kwargs )
337
-
338
- @pip_package ()
339
- def numpy (** kwargs ):
340
- install_with_pip ("Cython" , ** kwargs )
341
- install_with_pip ("numpy" , ** kwargs )
342
-
343
- # print numpy configuration
344
- if sys .implementation .name != 'graalpy' or __graalpython__ .platform_id != 'managed' :
345
- info ("----------------------------[ numpy configuration ]----------------------------" )
346
- run_cmd ([sys .executable , "-c" , 'import numpy as np; print(np.__version__); print(np.show_config())' ])
347
- info ("-------------------------------------------------------------------------------" )
348
-
349
- @pip_package ()
350
- def dateutil (** kwargs ):
351
- setuptools_scm (** kwargs )
352
- install_from_pypi ("python-dateutil==2.7.5" , ** kwargs )
353
-
354
- @pip_package ()
355
- def certifi (** kwargs ):
356
- install_from_pypi ("certifi==2020.11.8" , ** kwargs )
357
-
358
- @pip_package ()
359
- def idna (** kwargs ):
360
- install_from_pypi ("idna==2.8" , ** kwargs )
361
-
362
- @pip_package ()
363
- def chardet (** kwargs ):
364
- install_from_pypi ("chardet==3.0.4" , ** kwargs )
365
-
366
- @pip_package ()
367
- def urllib3 (** kwargs ):
368
- install_from_pypi ("urllib3==1.25.6" , ** kwargs )
369
-
370
- @pip_package ()
371
- def requests (** kwargs ):
372
- idna (** kwargs )
373
- certifi (** kwargs )
374
- chardet (** kwargs )
375
- urllib3 (** kwargs )
376
- install_from_pypi ("requests==2.22" , ** kwargs )
377
-
378
173
@pip_package ()
379
174
def lightfm (** kwargs ):
380
- # pandas(**kwargs)
381
- requests (** kwargs )
175
+ install_with_pip ('requests' )
382
176
install_from_pypi ("lightfm==1.15" , ** kwargs )
383
177
384
- @pip_package ()
385
- def meson (** kwargs ):
386
- install_from_pypi ("meson==1.0.0" , ** kwargs )
387
-
388
178
@pip_package ()
389
179
def ninja (** kwargs ):
390
180
install_with_pip ("scikit-build==0.16.6" )
@@ -394,63 +184,11 @@ def ninja(**kwargs):
394
184
'CC' : 'gcc' ,
395
185
'CXX' : 'g++' ,
396
186
}
397
- install_from_pypi ("ninja==1.11.1" , env = ninja_build_env , ** kwargs )
398
-
399
- @pip_package ()
400
- def pytz (** kwargs ):
401
- install_from_pypi ("pytz==2022.2.1" , ** kwargs )
402
-
403
- @pip_package ()
404
- def pandas (** kwargs ):
405
- pytz (** kwargs )
406
- six (** kwargs )
407
- dateutil (** kwargs )
408
- numpy (** kwargs )
409
-
410
- install_from_pypi ("pandas==1.5.2" , ** kwargs )
411
-
412
- @pip_package ()
413
- def scipy (** kwargs ):
414
- install_with_pip ("scipy" , ** kwargs )
415
-
416
- @pip_package ()
417
- def scikit_learn (** kwargs ):
418
- # honor following selected env variables: BLAS, LAPACK, ATLAS
419
- scikit_learn_build_env = {}
420
- for key in ("BLAS" , "LAPACK" , "ATLAS" ):
421
- if key in os .environ :
422
- scikit_learn_build_env [key ] = os .environ [key ]
423
-
424
- if sys .implementation .name == "graalpy" :
425
- if not os .environ .get ("VIRTUAL_ENV" , None ):
426
- xit ("scikit-learn can only be installed within a venv." )
427
- from distutils .sysconfig import get_config_var
428
- scikit_learn_build_env ["LDFLAGS" ] = get_config_var ("LDFLAGS" )
429
-
430
- # install dependencies
431
- numpy (** kwargs )
432
- scipy (** kwargs )
433
- joblib (** kwargs )
434
- threadpoolctl (** kwargs )
435
-
436
- install_from_pypi ("scikit-learn==1.1.3" , env = scikit_learn_build_env , ** kwargs )
437
-
438
- @pip_package ()
439
- def cycler (** kwargs ):
440
- six (** kwargs )
441
- install_from_pypi ("cycler==0.11.0" , ** kwargs )
442
-
443
- @pip_package ()
444
- def tox (** kwargs ):
445
- install_from_pypi ("tox==3.24.5" , ** kwargs )
446
-
447
- @pip_package ()
448
- def cassowary (** kwargs ):
449
- install_from_pypi ("cassowary==0.5.2" , ** kwargs )
187
+ install_with_pip ("ninja==1.11.1" , env = ninja_build_env , ** kwargs )
450
188
451
189
@pip_package (name = "PIL" )
452
190
def Pillow (** kwargs ):
453
- setuptools ( ** kwargs )
191
+ install_with_pip ( 'setuptools' )
454
192
build_env = {"MAX_CONCURRENCY" : "0" }
455
193
build_cmd = ["build_ext" , "--disable-jpeg" ]
456
194
zlib_root = os .environ .get ("ZLIB_ROOT" , None )
@@ -462,15 +200,15 @@ def Pillow(**kwargs):
462
200
463
201
@pip_package ()
464
202
def matplotlib (** kwargs ):
465
- setuptools ( ** kwargs )
466
- certifi ( ** kwargs )
467
- cycler ( ** kwargs )
468
- cassowary ( ** kwargs )
469
- pyparsing ( ** kwargs )
470
- python_dateutil ( ** kwargs )
471
- numpy ( ** kwargs )
203
+ install_with_pip ( 'setuptools' )
204
+ install_with_pip ( 'certifi' )
205
+ install_with_pip ( 'cycler' )
206
+ install_with_pip ( 'cassowary' )
207
+ install_with_pip ( 'pyparsing' )
208
+ install_with_pip ( 'python_dateutil' )
209
+ install_with_pip ( 'numpy' )
472
210
Pillow (** kwargs )
473
- kiwisolver ( ** kwargs )
211
+ install_with_pip ( 'kiwisolver' )
474
212
475
213
def download_freetype (extracted_dir ):
476
214
target_dir = os .path .join (extracted_dir , "build" )
0 commit comments