Commit 80b217e2 authored by Xavier Thompson's avatar Xavier Thompson

WIP

parent ed691c82
......@@ -38,7 +38,7 @@ eggs =
# additional eggs
requests
astor
${matplotlib:egg}
# ${matplotlib:egg}
${scipy:egg}
${pandas:egg}
${scikit-learn:egg}
......
[buildout]
parts =
[macro.sub.buildout]
recipe = slapos.recipe.build
install =
import os
from zc.buildout.buildout import _isurl, urljoin
from slapos.rebootstrap.bootstrap import setup_script
base = options['_profile_base_location_']
if _isurl(base):
abspath = lambda path: urljoin(base + '/', path)
else:
abspath = lambda path: os.path.realpath(os.path.join(base, path))
keep_options = (
'eggs-directory'
'develop-eggs-directory',
'bin-directory',
'parts-directory',
'extends-cache',
'extensions',
'download-cache',
'newest',
'shared-part-list',
)
buildout = {}
buildout_section = self.buildout['buildout']
for option in keep_options:
try:
value = options.get.get(option, buildout_section[option])
buildout[option] = '\n ' + value.replace('\n', '\n ')
except KeyError:
pass
extends = '\n '.join(
abspath(path.strip())
for path in options.get('extends', '').splitlines()
if path.strip()
)
parts = options['parts'].replace('\n', '\n ')
versions = self.buildout.get(buildout_section['versions'])
buildout['versions'] = 'versions'
os.mkdir(location)
with open(os.path.join(location, 'buildout.cfg'), 'w') as buildout_conf:
buildout_conf.write(
options['template'] % {
'buildout': '\n'.join('%s = %s' % item for item in buildout.items()),
'extends': extends,
'contents': options.get('contents', ''),
'parts': options['parts'],
'versions': '\n'.join('%s = %s' % item for item in versions.items()),
}
)
buildout = os.path.join(location, 'bin', 'buildout')
os.mkdir(os.path.dirname(buildout))
setup_script(buildout, options['python'])
call((buildout, '-U'), cwd=location)
template =
[buildout]
%(buildout)s
extends =
%(extends)s
parts =
%(parts)s
extensions -= slapos.rebootstrap
%(contents)s
[versions]
%(versions)s
[buildout]
parts = numpy
[numpy-env]
BLAS=None
LAPACK=None
ATLAS=None
[numpy]
recipe = zc.recipe.egg:custom
egg = numpy
[versions]
numpy = 1.16.4
[buildout]
extends =
basic-numpy.cfg
../cython/buildout.cfg
../pygolang/buildout.cfg
parts = numpy
parts =
numpy
[python_for_numpy_build:sys.version_info >= (3,8)]
<= python-interpreter
interpreter = ${:_buildout_section_name_}
eggs =
${pygolang:egg}
${cython:egg}
executable = ${buildout:bin-directory}/${:interpreter}
[numpy-env]
BLAS=None
LAPACK=None
ATLAS=None
[numpy:sys.version_info >= (3,8)]
recipe = slapos.recipe.build
python = ${cython-interpreter:executable}
base = ${:_profile_base_location_}
install =
import os
from zc.buildout.buildout import _isurl, urljoin
from slapos.rebootstrap.bootstrap import setup_script
[numpy]
recipe = zc.recipe.egg:custom
executable = ${cython:interpreter}
egg =
numpy
base = options['base']
if _isurl(base):
extends = lambda path: urljoin(base + '/', path)
else:
extends = lambda path: os.path.realpath(os.path.join(base, path))
[numpy:sys.version_info >= (3,8)]
environment = numpy-env
setup-eggs = ${cython:egg}
buildout_extra = []
buildout_section = self.buildout['buildout']
for option_name in ('download-cache', 'newest', 'shared-part-list'):
option_value = buildout_section.get(option_name)
if option_value:
buildout_extra.append('%s = %s' % (option_name, option_value))
os.mkdir(location)
with open(os.path.join(location, 'buildout.cfg'), 'w') as buildout_conf:
buildout_conf.write(
options['template'] % {
'extends': '\n '.join(map(extends, (
'../../stack/slapos.cfg',
'basic-numpy.cfg',
))),
'buildout': '\n'.join(buildout_extra),
}
)
buildout = os.path.join(location, 'bin', 'buildout')
os.mkdir(os.path.dirname(buildout))
setup_script(buildout, options['python'])
call((buildout, '-U'), cwd=location)
template =
[buildout]
extends = %(extends)s
eggs-directory = ${buildout:eggs-directory}
develop-eggs-directory = ${buildout:develop-eggs-directory}
bin-directory = ${buildout:bin-directory}
extends-cache = ${buildout:extends-cache}
extensions -= slapos.rebootstrap
%(buildout)s
parts = numpy
[versions]
numpy = 1.16.4
[versions]
numpy = ${versions:numpy}
[versions:sys.version_info >= (3,8)]
numpy = 1.22.0
[buildout]
extends =
basic-numpy.cfg
../openblas/buildout.cfg
[numpy-env]
OPENBLAS = ${openblas:location}/lib/libopenblas.so
LAPACK = ${openblas:location}/lib/libopenblas.so
ATLAS = ${openblas:location}/lib/libopenblas.so
[numpy]
environment = numpy-env
rpath =
${openblas:location}/lib
[buildout]
extends =
buildout.cfg
../openblas/buildout.cfg
[numpy-env]
OPENBLAS = ${openblas:location}/lib/libopenblas.so
LAPACK = ${openblas:location}/lib/libopenblas.so
ATLAS = ${openblas:location}/lib/libopenblas.so
[numpy]
environment = numpy-env
rpath =
${openblas:location}/lib
openblas-numpy.cfg
../cython/buildout.cfg
../pygolang/buildout.cfg
parts =
numpy
[python_for_numpy_build:sys.version_info >= (3,8)]
<= python-interpreter
interpreter = ${:_buildout_section_name_}
eggs =
${pygolang:egg}
${cython:egg}
executable = ${buildout:bin-directory}/${:interpreter}
[numpy:sys.version_info >= (3,8)]
recipe = slapos.recipe.build
python = ${python_for_numpy_build:executable}
base = ${:_profile_base_location_}
install =
import os
from zc.buildout.buildout import _isurl, urljoin
from slapos.rebootstrap.bootstrap import setup_script
base = options['base']
if _isurl(base):
extends = lambda path: urljoin(base + '/', path)
else:
extends = lambda path: os.path.realpath(os.path.join(base, path))
buildout_extra = []
buildout_section = self.buildout['buildout']
for option_name in ('download-cache', 'newest', 'shared-part-list'):
option_value = buildout_section.get(option_name)
if option_value:
buildout_extra.append('%s = %s' % (option_name, option_value))
os.mkdir(location)
with open(os.path.join(location, 'buildout.cfg'), 'w') as buildout_conf:
buildout_conf.write(
options['template'] % {
'extends': '\n '.join(map(extends, (
'../../stack/slapos.cfg',
'openblas-numpy.cfg',
))),
'buildout': '\n'.join(buildout_extra),
}
)
buildout = os.path.join(location, 'bin', 'buildout')
os.mkdir(os.path.dirname(buildout))
setup_script(buildout, options['python'])
call((buildout, '-U'), cwd=location)
template =
[buildout]
extends = %(extends)s
eggs-directory = ${buildout:eggs-directory}
develop-eggs-directory = ${buildout:develop-eggs-directory}
bin-directory = ${buildout:bin-directory}
parts-directory = ${buildout:parts-directory}
extends-cache = ${buildout:extends-cache}
extensions -= slapos.rebootstrap
%(buildout)s
parts = numpy
[versions]
numpy = ${versions:numpy}
[versions:sys.version_info >= (3,8)]
numpy = 1.22.0
[buildout]
extends =
../cython/buildout.cfg
../numpy/buildout.cfg
parts =
......@@ -12,4 +13,15 @@ parts =
recipe = zc.recipe.egg:custom
egg = pandas
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]
extends =
scipy.cfg
# ../macros/macro.sub.buildout.cfg
../numpy/openblas.cfg
../pandas/buildout.cfg
# ../pygolang/buildout.cfg
parts =
scipy
[scipy-env]
<= numpy-env
[scipy-prerequisite]
recipe = slapos.recipe.build
depends = ${scipy-eggs:recipe}
install =
update =
from zc.buildout.easy_install import working_set
options = self.options
buildout = self.buildout['buildout']
scipy_eggs = self.buildout['scipy-eggs']
scipy_env = self.buildout['scipy-env']
eggs_directory = buildout['eggs-directory']
develop_eggs_directory = buildout['develop-eggs-directory']
setup_eggs = scipy_eggs['eggs'].splitlines()
setup_eggs = tuple(e.strip() for e in setup_eggs if e.strip())
dists = working_set(setup_eggs, [develop_eggs_directory, eggs_directory])
paths = ':'.join(dist.location for dist in dists)
scipy_env['PYTHONPATH'] = paths
[scipy]
recipe = zc.recipe.egg:custom
egg = scipy
environment = scipy-env
setup-eggs =
[scipy-eggs]
recipe = zc.recipe.egg
eggs =
${cython:egg}
${numpy:egg}
rpath = ${numpy:rpath}
${pandas:egg}
pythran
pybind11
[scipy:sys.version_info >= (3,8)]
setup-eggs +=
pandas
depends = ${scipy-prerequisite:recipe}
[python_for_scipy_build:False]
<= python-interpreter
interpreter = ${:_buildout_section_name_}
eggs =
${pygolang:egg}
${cython:egg}
${numpy:egg}
${pandas:egg}
pythran
pybind11
executable = ${buildout:bin-directory}/${:interpreter}
[versions]
scipy = 1.0.1
pandas = 0.25.3
[scipy:False]
<= macro.sub.buildout
python = ${python_for_scipy_build:executable}
extends =
scipy.cfg
parts =
scipy
[versions:sys.version_info >= (3,8)]
pybind11 = 2.9.2
......@@ -33,5 +66,4 @@ scipy = 1.8.1
beniget = 0.4.1
gast = 0.5.3
ply = 3.11
pandas = 1.4.0
pythran = 0.11.0:whl
[buildout]
extends =
../numpy/openblas.cfg
parts =
scipy
[scipy-env]
<= numpy-env
[scipy]
recipe = zc.recipe.egg:custom
egg = scipy
environment = scipy-env
setup-eggs =
${cython:egg}
${numpy:egg}
rpath = ${numpy:rpath}
[versions]
scipy = 1.0.1
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