Commit 9b6049fb authored by Xavier Thompson's avatar Xavier Thompson

component/{numpy,scipy}: Version up for Python3.9

Introduce macro.pythonpath.egg to compute during install the PYTHONPATH
of setup eggs required to install other eggs, and insert the PYTHONPATH
into the environment section such as used by zc.recipe.egg:custom.

Both numpy and scipy use a Python subprocess to call Cython in their
setup.py, therefore the setup-eggs option of zc.recipe.egg:custom
does not work because sys.path is not propagated to the subprocess.
parent 8447a52b
[buildout]
parts =
[macro.pythonpath.eggs]
recipe = slapos.recipe.build
_name_ = ${:_buildout_section_name_}
init =
prerequisite = """
[.%(_name_)s.prerequisite]
recipe = slapos.recipe.build
init =
section = self.buildout['%(_name_)s']
self.eggs = [e.strip() for e in section['eggs'].splitlines() if e.strip()]
update =
from zc.buildout.easy_install import working_set
buildout = self.buildout['buildout']
eggs_directory = buildout['eggs-directory']
develop_eggs_directory = buildout['develop-eggs-directory']
dists = working_set(self.eggs, [develop_eggs_directory, eggs_directory])
paths = ':'.join(dist.location for dist in dists)
self.buildout['%(environment)s']['PYTHONPATH'] = paths
print("PYTHONPATH=" + paths)
""" % options
self.buildout.parse(prerequisite)
[buildout] [buildout]
extends =
../cython/buildout.cfg
../macros/macro.pythonpath.eggs.cfg
parts = numpy parts = numpy
[numpy-env]
BLAS=None
LAPACK=None
ATLAS=None
[numpy] [numpy]
recipe = zc.recipe.egg:custom recipe = zc.recipe.egg:custom
egg = numpy egg = numpy
environment = numpy-env
[versions] [versions]
numpy = 1.16.4 numpy = 1.16.4
[numpy:sys.version_info >= (3,8)]
depends = ${numpy-pythonpath:recipe}
[numpy-pythonpath]
<= macro.pythonpath.eggs
environment = numpy-env
eggs = ${cython:egg}
[versions:sys.version_info >= (3,8)]
numpy = 1.22.0
...@@ -2,6 +2,7 @@ ...@@ -2,6 +2,7 @@
extends = extends =
buildout.cfg buildout.cfg
../openblas/buildout.cfg ../openblas/buildout.cfg
parts = numpy
[numpy-env] [numpy-env]
OPENBLAS = ${openblas:location}/lib/libopenblas.so OPENBLAS = ${openblas:location}/lib/libopenblas.so
...@@ -10,5 +11,4 @@ ATLAS = ${openblas:location}/lib/libopenblas.so ...@@ -10,5 +11,4 @@ ATLAS = ${openblas:location}/lib/libopenblas.so
[numpy] [numpy]
environment = numpy-env environment = numpy-env
rpath = rpath = ${openblas:location}/lib
${openblas:location}/lib
[buildout] [buildout]
extends = extends =
../cython/buildout.cfg
../numpy/buildout.cfg ../numpy/buildout.cfg
parts = parts =
...@@ -12,4 +13,15 @@ parts = ...@@ -12,4 +13,15 @@ parts =
recipe = zc.recipe.egg:custom recipe = zc.recipe.egg:custom
egg = pandas egg = pandas
environment = pandas-env environment = pandas-env
setup-eggs = ${numpy:egg} setup-eggs =
${numpy:egg}
[pandas:sys.version_info >= (3,8)]
setup-eggs +=
${cython:egg}
[versions]
pandas = 0.25.3
[versions:sys.version_info >= (3,8)]
pandas = 1.4.0
[buildout] [buildout]
extends = extends =
../numpy/openblas.cfg ../numpy/openblas.cfg
../pandas/buildout.cfg
parts = parts = scipy
scipy
[scipy-env] [scipy-env]
<= numpy-env <= numpy-env
...@@ -14,3 +13,31 @@ egg = scipy ...@@ -14,3 +13,31 @@ egg = scipy
environment = scipy-env environment = scipy-env
setup-eggs = ${numpy:egg} setup-eggs = ${numpy:egg}
rpath = ${numpy:rpath} rpath = ${numpy:rpath}
[versions]
scipy = 1.0.1
[scipy:sys.version_info >= (3,8)]
depends = ${scipy-pythonpath:recipe}
[scipy-pythonpath]
<= macro.pythonpath.eggs
environment = scipy-env
eggs = ${scipy-setup-eggs:eggs}
[scipy-setup-eggs]
recipe = zc.recipe.egg
eggs =
${cython:egg}
${numpy:egg}
${pandas:egg}
pythran
pybind11
[versions:sys.version_info >= (3,8)]
pybind11 = 2.9.2
scipy = 1.8.1
beniget = 0.4.1
gast = 0.5.3
ply = 3.11
pythran = 0.11.0:whl
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment