Skip to content

Commit c795d3b

Browse files
committed
GR-45385: ginstall - remove most of the legacy supported packages
1 parent 794f8ff commit c795d3b

File tree

1 file changed

+12
-243
lines changed

1 file changed

+12
-243
lines changed

graalpython/lib-graalpython/modules/ginstall.py

Lines changed: 12 additions & 243 deletions
Original file line numberDiff line numberDiff line change
@@ -165,218 +165,16 @@ def run_cmd(args, msg="", failOnError=True, cwd=None, env=None, quiet=False, **k
165165

166166

167167
def known_packages():
168-
@pip_package()
169-
def pytest(**kwargs):
170-
install_with_pip("pytest", **kwargs)
171-
172-
@pip_package()
173-
def pytest_parallel(**kwargs):
174-
pytest(**kwargs)
175-
install_from_pypi("pytest-parallel==0.0.9", **kwargs)
176-
177-
@pip_package()
178-
def py(**kwargs):
179-
install_from_pypi("py==1.8.0", **kwargs)
180-
181-
@pip_package()
182-
def attrs(**kwargs):
183-
184-
install_from_pypi("attrs==19.2.0", **kwargs)
185-
186-
@pip_package()
187-
def pyparsing(**kwargs):
188-
install_from_pypi("pyparsing==2.4.2", **kwargs)
189-
190-
@pip_package()
191-
def packaging(**kwargs):
192-
six(**kwargs)
193-
pyparsing(**kwargs)
194-
install_from_pypi("packaging==19.0", **kwargs)
195-
196-
@pip_package()
197-
def more_itertools(**kwargs):
198-
install_from_pypi("more-itertools==7.0.0", **kwargs)
199-
200-
@pip_package()
201-
def atomicwrites(**kwargs):
202-
install_from_pypi("atomicwrites==1.3.0", **kwargs)
203-
204-
@pip_package()
205-
def pluggy(**kwargs):
206-
zipp(**kwargs)
207-
install_from_pypi("pluggy==0.13.1", **kwargs)
208-
209-
@pip_package()
210-
def zipp(**kwargs):
211-
setuptools_scm(**kwargs)
212-
install_from_pypi("zipp==0.5.0", **kwargs)
213-
214-
@pip_package()
215-
def wcwidth(**kwargs):
216-
six(**kwargs)
217-
install_from_pypi("wcwidth==0.1.7", **kwargs)
218-
219-
@pip_package()
220-
def PyYAML(**kwargs):
221-
install_from_pypi("PyYAML==3.13", **kwargs)
222-
223-
@pip_package()
224-
def six(**kwargs):
225-
install_from_pypi("six==1.16.0", **kwargs)
226-
227-
@pip_package()
228-
def threadpoolctl(**kwargs):
229-
install_with_pip("threadpoolctl==2.2.0", **kwargs)
230-
231-
@pip_package()
232-
def joblib(**kwargs):
233-
install_with_pip("joblib==1.2.0", **kwargs)
234-
235-
@pip_package()
236-
def cppy(**kwargs):
237-
setuptools_scm(**kwargs)
238-
install_from_pypi("cppy==1.2.1", **kwargs)
239-
240-
@pip_package()
241-
def kiwisolver(**kwargs):
242-
cppy(**kwargs)
243-
install_with_pip("kiwisolver==1.4.4", **kwargs)
244-
245-
@pip_package()
246-
def python_dateutil(**kwargs):
247-
install_with_pip("python_dateutil==2.8.2", **kwargs)
248-
249-
@pip_package()
250-
def Cython(extra_opts=None, **kwargs):
251-
if extra_opts is None:
252-
extra_opts = []
253-
install_from_pypi("Cython==0.29.32", extra_opts=['--no-cython-compile'] + extra_opts, **kwargs)
254-
255-
@pip_package()
256-
def pybind11(**kwargs):
257-
install_from_pypi("pybind11==2.10.0", **kwargs)
258-
259-
@pip_package()
260-
def pythran(**kwargs):
261-
install_from_pypi("pythran==0.12.0", **kwargs)
262-
263-
@pip_package()
264-
def setuptools(**kwargs):
265-
six(**kwargs)
266-
install_from_pypi("setuptools==63.2.0", **kwargs)
267-
268-
@pip_package()
269-
def pkgconfig(**kwargs):
270-
install_from_pypi("pkgconfig==1.5.1", **kwargs)
271-
272-
@pip_package()
273-
def wheel(**kwargs):
274-
install_from_pypi("wheel==0.38.*", **kwargs)
275-
276-
@pip_package()
277-
def protobuf(**kwargs):
278-
install_from_pypi("protobuf==3.8.0", **kwargs)
279-
280-
@pip_package()
281-
def Keras_preprocessing(**kwargs):
282-
install_from_pypi("Keras-Preprocessing==1.0.5", **kwargs)
283-
284-
@pip_package()
285-
def gast(**kwargs):
286-
install_from_pypi("gast==0.2.2", **kwargs)
287-
288-
@pip_package()
289-
def astor(**kwargs):
290-
install_from_pypi("astor==0.8.0", **kwargs)
291-
292-
@pip_package()
293-
def absl_py(**kwargs):
294-
install_from_pypi("absl-py==0.7.1", **kwargs)
295-
296-
@pip_package()
297-
def mock(**kwargs):
298-
install_from_pypi("mock==3.0.5", **kwargs)
299-
300-
@pip_package()
301-
def Markdown(**kwargs):
302-
install_from_pypi("Markdown==3.1.1", **kwargs)
303-
304-
@pip_package()
305-
def Werkzeug(**kwargs):
306-
install_from_pypi("Werkzeug==0.15.4", **kwargs)
307-
308168
@pip_package()
309169
def h5py(**kwargs):
310-
numpy(**kwargs)
311-
Cython(**kwargs)
170+
install_with_pip('numpy')
312171
install_from_pypi("h5py==2.10.0", **kwargs)
313172

314-
@pip_package()
315-
def sortedcontainers(**kwargs):
316-
install_from_pypi("sortedcontainers==2.1.0", **kwargs)
317-
318-
@pip_package()
319-
def hypothesis(**kwargs):
320-
setuptools(**kwargs)
321-
attrs(**kwargs)
322-
sortedcontainers(**kwargs)
323-
install_from_pypi("hypothesis==5.41.1", **kwargs)
324-
325-
@pip_package()
326-
def setuptools_scm(**kwargs):
327-
setuptools(**kwargs)
328-
install_with_pip("setuptools_scm==7.1.0", **kwargs)
329-
330-
@pip_package()
331-
def numpy(**kwargs):
332-
install_with_pip("Cython", **kwargs)
333-
install_with_pip("numpy", **kwargs)
334-
335-
# print numpy configuration
336-
if sys.implementation.name != 'graalpy' or __graalpython__.platform_id != 'managed':
337-
info("----------------------------[ numpy configuration ]----------------------------")
338-
run_cmd([sys.executable, "-c", 'import numpy as np; print(np.__version__); print(np.show_config())'])
339-
info("-------------------------------------------------------------------------------")
340-
341-
@pip_package()
342-
def dateutil(**kwargs):
343-
setuptools_scm(**kwargs)
344-
install_from_pypi("python-dateutil==2.7.5", **kwargs)
345-
346-
@pip_package()
347-
def certifi(**kwargs):
348-
install_from_pypi("certifi==2020.11.8", **kwargs)
349-
350-
@pip_package()
351-
def idna(**kwargs):
352-
install_from_pypi("idna==2.8", **kwargs)
353-
354-
@pip_package()
355-
def chardet(**kwargs):
356-
install_from_pypi("chardet==3.0.4", **kwargs)
357-
358-
@pip_package()
359-
def urllib3(**kwargs):
360-
install_from_pypi("urllib3==1.25.6", **kwargs)
361-
362-
@pip_package()
363-
def requests(**kwargs):
364-
idna(**kwargs)
365-
certifi(**kwargs)
366-
chardet(**kwargs)
367-
urllib3(**kwargs)
368-
install_from_pypi("requests==2.22", **kwargs)
369-
370173
@pip_package()
371174
def lightfm(**kwargs):
372-
# pandas(**kwargs)
373-
requests(**kwargs)
175+
install_with_pip('requests')
374176
install_from_pypi("lightfm==1.15", **kwargs)
375177

376-
@pip_package()
377-
def meson(**kwargs):
378-
install_from_pypi("meson==1.0.0", **kwargs)
379-
380178
@pip_package()
381179
def ninja(**kwargs):
382180
install_with_pip("scikit-build==0.16.6")
@@ -386,40 +184,11 @@ def ninja(**kwargs):
386184
'CC': 'gcc',
387185
'CXX': 'g++',
388186
}
389-
install_from_pypi("ninja==1.11.1", env=ninja_build_env, **kwargs)
390-
391-
@pip_package()
392-
def pytz(**kwargs):
393-
install_with_pip("pytz", **kwargs)
394-
395-
@pip_package()
396-
def pandas(**kwargs):
397-
install_with_pip("pandas", **kwargs)
398-
399-
@pip_package()
400-
def scipy(**kwargs):
401-
install_with_pip("scipy", **kwargs)
402-
403-
@pip_package()
404-
def scikit_learn(**kwargs):
405-
install_with_pip("scikit-learn", **kwargs)
406-
407-
@pip_package()
408-
def cycler(**kwargs):
409-
six(**kwargs)
410-
install_from_pypi("cycler==0.11.0", **kwargs)
411-
412-
@pip_package()
413-
def tox(**kwargs):
414-
install_from_pypi("tox==3.24.5", **kwargs)
415-
416-
@pip_package()
417-
def cassowary(**kwargs):
418-
install_from_pypi("cassowary==0.5.2", **kwargs)
187+
install_with_pip("ninja==1.11.1", env=ninja_build_env, **kwargs)
419188

420189
@pip_package(name="PIL")
421190
def Pillow(**kwargs):
422-
setuptools(**kwargs)
191+
install_with_pip('setuptools')
423192
build_env = {"MAX_CONCURRENCY": "0"}
424193
build_cmd = ["build_ext", "--disable-jpeg"]
425194
zlib_root = os.environ.get("ZLIB_ROOT", None)
@@ -431,15 +200,15 @@ def Pillow(**kwargs):
431200

432201
@pip_package()
433202
def matplotlib(**kwargs):
434-
setuptools(**kwargs)
435-
certifi(**kwargs)
436-
cycler(**kwargs)
437-
cassowary(**kwargs)
438-
pyparsing(**kwargs)
439-
python_dateutil(**kwargs)
440-
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')
441210
Pillow(**kwargs)
442-
kiwisolver(**kwargs)
211+
install_with_pip('kiwisolver')
443212

444213
def download_freetype(extracted_dir):
445214
target_dir = os.path.join(extracted_dir, "build")

0 commit comments

Comments
 (0)