Commit 8583ace9 authored by Julien Muchembled's avatar Julien Muchembled

Do not harcode version of wanted Python

parent b5faeb30
......@@ -13,7 +13,7 @@ shared = true
url = http://downloads.sourceforge.net/sourceforge/boost/boost_1_67_0.tar.bz2
md5sum = ced776cb19428ab8488774e1415535ab
location = @@LOCATION@@
configure-command = ./bootstrap.sh --prefix=${:location} --with-python=${python2.7:location}/bin/python2.7 --without-icu
configure-command = ./bootstrap.sh --prefix=${:location} --without-icu
make-binary =
make-options =
make-targets = for a in $MAKEFLAGS; do case $a in -j*) j=$a; break;; esac; done;
......
[buildout]
extends =
python-2.7/buildout.cfg
python3/buildout.cfg
python = python
[python]
recipe = slapos.recipe.build
part = python2.7
init =
python = self.buildout[options['part']]
for x in 'location', 'executable', 'version':
options[x] = python[x]
update =
import os
path, os.environ['PYTHON'] = os.path.split(options['executable'])
PATH = os.environ['PATH']
if path not in PATH.split(os.pathsep):
os.environ['PATH'] = path + os.pathsep + PATH
......@@ -35,7 +35,6 @@ environment =
PATH=${autoconf:location}/bin:${automake:location}/bin:${pkgconfig:location}/bin:${libtool:location}/bin:${intltool:location}/bin:${gettext:location}/bin:${glib:location}/bin:${perl:location}/bin:%(PATH)s
CPPFLAGS=-I${gettext:location}/include
LDFLAGS=-L${gettext:location}/lib -Wl,-rpath=${gettext:location}/lib
PYTHON=${python2.7:location}/bin/python2.7
M4=${m4:location}/bin/m4
ACLOCAL_PATH=${pkgconfig:location}/share/aclocal:${gettext:location}/share/aclocal:${libtool:location}/share/aclocal:${glib:location}/share/aclocal:${intltool:location}/share/aclocal
FIREWALLD_DEVEL_ENV=${buildout:parts-directory}/${:_buildout_section_name_}/src
......@@ -49,14 +48,13 @@ md5sum = 7372a588c83a7232b4e08159bfd48fe5
python-egg = ${buildout:parts-directory}/${:_buildout_section_name_}/lib/python2.7/site-packages
environment =
PKG_CONFIG_PATH=${dbus:location}/lib/pkgconfig:${dbus-glib:location}/lib/pkgconfig:${glib:location}/lib/pkgconfig:${pcre:location}/lib/pkgconfig
PATH=${pkgconfig:location}/bin:${python2.7:location}/bin:%(PATH)s
PATH=${pkgconfig:location}/bin:%(PATH)s
DBUS_CFLAGS=-I${dbus:location}/include/dbus-1.0 -I${dbus:location}/lib/dbus-1.0/include
DBUS_LIBS=-L${dbus:location}/lib -ldbus-1
DBUS_GLIB_CFLAGS=-I${dbus-glib:location}/include/dbus-1.0
DBUS_GLIB_LIBS=-L${dbus-glib:location}/lib -ldbus-glib-1
CPPFLAGS=-I${glib:location}/include/glib-2.0 -I${glib:location}/lib/glib-2.0/include
LDFLAGS=-L${glib:location}/lib -Wl,-rpath=${glib:location}/lib
PYTHON=${python2.7:location}/bin/python2.7
PYTHON_INCLUDES=-I${python2.7:location}/include/python2.7
PYTHON_LIBS=-L${python2.7:location}/lib -lpython2.7 -lpthread -ldl -lutil -lm
......@@ -72,7 +70,6 @@ environment =
PKG_CONFIG_PATH=${glib:location}/lib/pkgconfig:${pcre:location}/lib/pkgconfig
CPPFLAGS=-I${glib:location}/include/glib-2.0 -I${glib:location}/lib/glib-2.0/include
LDFLAGS=-L${glib:location}/lib -Wl,-rpath=${glib:location}/lib -L${libffi:location}/lib -Wl,-rpath=${libffi:location}/lib -lffi
PYTHON=${python2.7:location}/bin/python2.7
GLIB_CFLAGS=-I${glib:location}/include/glib-2.0 -I${glib:location}/lib/glib-2.0/include
GLIB_LIBS=-L${glib:location}/lib -lglib-2.0 -lintl -lgobject-2.0
FFI_CFLAGS=-I${libffi:location}/include
......@@ -89,12 +86,10 @@ pre-configure =
configure-options =
--disable-static
--disable-cairo
--with-python=${python2.7:location}/bin/python2.7
environment =
PATH=${pkgconfig:location}/bin:${libtool:location}/bin:${glib:location}/bin:${xz-utils:location}/bin:%(PATH)s
PKG_CONFIG_PATH=${glib:location}/lib/pkgconfig:${gobject-introspection:location}/lib/pkgconfig:${pcre:location}/lib/pkgconfig
PYTHON=${python2.7:location}/bin/python2.7
FFI_CFLAGS=-I${libffi:location}/include
FFI_LIBS=-L${libffi:location}/lib -Wl,-rpath=${libffi:location}/lib -lffi
CPPFLAGS=-I${glib:location}/include/glib-2.0 -I${glib:location}/lib/glib-2.0/include -I${gettext:location}/include -I${libffi:location}/include
......@@ -115,7 +110,7 @@ md5sum = 893752ba2e93a1e96334dfee19f884ad
[firewalld-patch]
recipe = plone.recipe.command
python = ${buildout:directory}/bin/${firewalld-eggs:interpreter}
python = ${buildout:bin-directory}/${firewalld-eggs:interpreter}
command =
sed -i 's#/usr/bin/python -Es#${:python}#' ${firewalld:location}/bin/firewall-cmd
sed -i 's#/usr/bin/python -Es#${:python}#' ${firewalld:location}/sbin/firewalld
......
......@@ -6,18 +6,9 @@ extends =
../perl/buildout.cfg
../xz-utils/buildout.cfg
../zlib/buildout.cfg
../python-2.7/buildout.cfg
parts =
glib
# --with-python=${buildout:executable} is simpler but we may end up with
# scripts whose shebang exceeds the kernel limit.
# And ${buildout:executable}/.. is not a valid $PATH part.
[glib-python]
recipe = collective.recipe.shelloutput
commands =
bin-directory = dirname ${buildout:executable}
[glib]
recipe = slapos.recipe.cmmi
patches =
......@@ -27,7 +18,6 @@ shared = true
url = https://ftp.gnome.org/pub/gnome/sources/glib/2.56/glib-2.56.4.tar.xz
md5sum = 17c3dca43d99a4882384f1a7b530b80b
configure-options =
--with-python=python
--disable-libmount
--disable-static
--disable-selinux
......@@ -35,7 +25,7 @@ configure-options =
--disable-xattr
--disable-man
environment =
PATH=${glib-python:bin-directory}:${gettext:location}/bin:${perl:location}/bin:${xz-utils:location}/bin:%(PATH)s
PATH=${gettext:location}/bin:${perl:location}/bin:${xz-utils:location}/bin:%(PATH)s
CPPFLAGS=-I${gettext:location}/include -I${zlib:location}/include
LDFLAGS=-L${gettext:location}/lib -Wl,-rpath=${gettext:location}/lib -L${zlib:location}/lib -Wl,-rpath=${zlib:location}/lib
LIBFFI_CFLAGS=-I${libffi:location}/include
......
......@@ -107,7 +107,6 @@ shared = true
url = https://download.gnome.org/sources/atk/2.28/atk-2.28.1.tar.xz
md5sum = dfb5e7474220afa3f4ca7e45af9f3a11
configure-options =
--with-python=${python2.7:location}/bin/python2.7
--disable-gtk-doc-html
environment =
PATH=${gettext:location}/bin:${glib:location}/bin:${pkgconfig:location}/bin:${xz-utils:location}/bin:%(PATH)s
......
......@@ -4,7 +4,6 @@ extends =
../matplotlib/buildout.cfg
../ipython/buildout.cfg
../python-pyzmq/buildout.cfg
../python-2.7/buildout.cfg
../scipy/buildout.cfg
../scikit-learn/buildout.cfg
../pandas/buildout.cfg
......
[buildout]
extends =
extends =
../automake/buildout.cfg
../libtool/buildout.cfg
../pkgconfig/buildout.cfg
../python-2.7/buildout.cfg
parts =
nghttp2
......@@ -18,4 +17,4 @@ pre-configure =
automake
autoconf
environment =
PATH=${autoconf:location}/bin:${automake:location}/bin:${libtool:location}/bin:${m4:location}/bin:${python2.7:location}/bin:%(PATH)s
PATH=${autoconf:location}/bin:${automake:location}/bin:${libtool:location}/bin:${m4:location}/bin:%(PATH)s
......@@ -57,7 +57,7 @@ configure-options =
--shared-openssl-libpath=${:openssl_location}/lib
environment =
HOME=@@LOCATION@@
PATH=${gcc:location}/bin:${pkgconfig:location}/bin:${python2.7:location}/bin/:%(PATH)s
PATH=${gcc:location}/bin:${pkgconfig:location}/bin:%(PATH)s
PKG_CONFIG_PATH=${:openssl_location}/lib/pkgconfig/
CPPFLAGS=-I${zlib:location}/include
LDFLAGS=-Wl,-rpath=${gcc:location}/lib -Wl,-rpath=${gcc:location}/lib64 -Wl,-rpath=${:openssl_location}/lib -L${zlib:location}/lib -Wl,-rpath=${zlib:location}/lib
......
......@@ -54,6 +54,7 @@ environment =
[python3.6]
<= python3-common
version = 3.6
package_version = 3.6.10
md5sum = 986078f11b39074be22a199e56491d98
......@@ -62,6 +63,7 @@ md5sum = 986078f11b39074be22a199e56491d98
# I think gcc 5 may meet the requirement, use gcc 8 all in one step
[python3.7]
<= python3-common
version = 3.7
package_version = 3.7.2
md5sum = df6ec36011808205beda239c72f947cb
patch-options =
......
......@@ -50,7 +50,7 @@ location = ${buildout:parts-directory}/${:_buildout_section_name_}
recipe = slapos.recipe.build
egg = ${:_buildout_section_name_}
workdir = ${pytorch-repository:location}
egg-name = ${:egg}-${versions:torch}-py2.7-linux-x86_64.egg
egg-name = ${:egg}-${versions:torch}-py${python:version}-linux-x86_64.egg
location = ${buildout:eggs-directory}/${:egg-name}
python-bin = ${buildout:bin-directory}/${pytorch-build-interpreter:interpreter}
no-cuda = 0
......
[buildout]
extends =
../defaults.cfg
../babeld/buildout.cfg
../geoip2/buildout.cfg
../openvpn/buildout.cfg
......@@ -22,4 +23,4 @@ eggs =
initialization =
import os
os.environ['GEOIP2_MMDB'] = "${geolite2-country:location}/GeoLite2-Country.mmdb"
os.environ['PATH'] = "${openvpn:location}/sbin:${babeld:location}/bin:${openssl:location}/bin:${python2.7:location}/bin:" + os.environ.get('PATH', '/usr/sbin:/usr/bin:/sbin:/bin')
os.environ['PATH'] = "${openvpn:location}/sbin:${babeld:location}/bin:${openssl:location}/bin:${python:location}/bin:" + os.environ.get('PATH', '/usr/sbin:/usr/bin:/sbin:/bin')
......@@ -24,13 +24,13 @@ command =
recipe = slapos.recipe.build
egg = ${:_buildout_section_name_}
workdir = ${tensorboard-repository:location}
egg-name = ${:egg}-${versions:tensorflow-tensorboard}-py2.7.egg
egg-name = ${:egg}-${versions:tensorflow-tensorboard}-py${python:version}.egg
location = ${buildout:eggs-directory}/${:egg-name}
gcc-bin = ${gcc:location}/bin
gcc-lib = ${gcc:location}/lib
gcc-lib64 = ${gcc:location}/lib64
numpy-python-command = ${buildout:bin-directory}/${numpy-egg:interpreter}
python27-lib = ${python2.7:location}/lib
python-lib = ${python:location}/lib
java_home_bin = ${bazel:java_home}/bin
bazel-bin = ${bazel:location}/bin
install =
......@@ -47,7 +47,7 @@ install =
options['gcc-lib64'],
os.environ.get('LIBRARY_PATH') or '']),
'PYTHON_BIN_PATH':options['numpy-python-command'],
'PYTHON_LIB_PATH':options['python27-lib'],
'PYTHON_LIB_PATH':options['python-lib'],
}
env['LD_LIBRARY_PATH'] = env['LIBRARY_PATH']
bazel_command = ['bazel', 'build', '--spawn_strategy=standalone', '--verbose_failures', '--sandbox_debug', '//tensorboard/pip_package:build_pip_package']
......
......@@ -45,13 +45,13 @@ cudnn_install_path = /usr/local/cuda
recipe = slapos.recipe.build
egg = ${:_buildout_section_name_}
workdir = ${tensorflow-repository:location}
egg-name = ${:egg}-${versions:tensorflow}-py2.7-linux-x86_64.egg
egg-name = ${:egg}-${versions:tensorflow}-py${python:version}-linux-x86_64.egg
location = ${buildout:eggs-directory}/${:egg-name}
gcc-bin = ${gcc:location}/bin
gcc-lib = ${gcc:location}/lib
gcc-lib64 = ${gcc:location}/lib64
numpy-python-command = ${buildout:bin-directory}/${numpy-egg:interpreter}
python27-lib = ${python2.7:location}/lib
python-lib = ${python:location}/lib
java_home_bin = ${bazel:java_home}/bin
bazel_bin = ${bazel:location}/bin
need_cuda = ${cuda:cuda_toolkit_path}
......@@ -72,7 +72,7 @@ install =
options['gcc-lib64'],
os.environ.get('LIBRARY_PATH') or '']),
'PYTHON_BIN_PATH':options['numpy-python-command'],
'PYTHON_LIB_PATH':options['python27-lib'],
'PYTHON_LIB_PATH':options['python-lib'],
'CC_OPT_FLAGS':'-march=native',
'TF_NEED_JEMALLOC':'1',
'TF_ENABLE_XLA':'0',
......
......@@ -26,6 +26,10 @@ configure-options =
--with-zlib-lib=${zlib:location}
environment =
# Python 3 is used for things we don't need. This is an optional dependency,
# unless PYTHON is set (previously set by [python]): wget complains (rightly)
# if it points to Python 2.7 (which we may still use).
PYTHON=
PATH=${gettext:location}/bin:${lunzip:location}/bin:${patch:location}/bin:${perl:location}/bin:${pkgconfig:location}/bin:%(PATH)s
PKG_CONFIG_PATH=${openssl:location}/lib/pkgconfig
LDFLAGS=-L${zlib:location}/lib -Wl,-rpath=${zlib:location}/lib -L${openssl:location}/lib -L${pcre:location}/lib -Wl,-rpath=${pcre:location}/lib -Wl,-rpath=${openssl:location}/lib
......
......@@ -8,7 +8,6 @@ extends =
../../component/dcron/buildout.cfg
../../component/logrotate/buildout.cfg
../../component/lxml-python/buildout.cfg
../../component/python-2.7/buildout.cfg
../../component/gzip/buildout.cfg
parts =
......@@ -24,7 +23,6 @@ module = davstorage
[instance-recipe-egg]
recipe = zc.recipe.egg
python = python2.7
eggs = ${instance-recipe:egg}
[application]
......
......@@ -11,7 +11,6 @@ extends =
../../component/dcron/buildout.cfg
../../component/logrotate/buildout.cfg
../../component/lxml-python/buildout.cfg
../../component/python-2.7/buildout.cfg
../../component/gzip/buildout.cfg
../../component/git/buildout.cfg
../../component/nodejs/buildout.cfg
......
......@@ -11,7 +11,6 @@ extends =
../../component/python-kerberos/buildout.cfg
../../component/gateone/buildout.cfg
../../component/dtach/buildout.cfg
../../component/python-2.7/buildout.cfg
../../component/nginx/buildout.cfg
../../stack/slapos.cfg
......
......@@ -32,7 +32,7 @@ return =
[proxy]
recipe = slapos.cookbook:wrapper
command-line = {{ python_location }}/bin/python2.7 {{ rina_proxy }} ${server:instance-guid} ${:ipv6} ${:port}
command-line = {{ python_executable }} {{ rina_proxy }} ${server:instance-guid} ${:ipv6} ${:port}
wrapper-path = ${directory:service}/proxy
environment =
PATH={{ rina_tools_location }}/bin:%(PATH)s
......
......@@ -28,7 +28,7 @@ template = {{ instance_root }}
extra-context =
import urlparse urlparse
key ipv6 slap-configuration:ipv6-random
raw python_location {{ python_location }}
raw python_executable {{ python_executable }}
raw rina_proxy {{ rina_proxy }}
[server]
......
......@@ -9,13 +9,13 @@ parts =
[template]
recipe = slapos.recipe.template:jinja2
template = ${:_profile_base_location_}/instance.cfg.in
md5sum = e513082329961dfbbcec94e817f1e3bc
md5sum = f6c61225990986d94d0017b07b873aa7
# XXX: "template.cfg" is hardcoded in instanciation recipe
rendered = ${buildout:directory}/template.cfg
context =
key develop_eggs_directory buildout:develop-eggs-directory
key eggs_directory buildout:eggs-directory
key python_location python2.7:location
key python_executable python:executable
key rina_tools_location rina-tools:location
key instance_root instance-root:target
key instance_server instance-server:target
......@@ -29,7 +29,7 @@ mode = 644
[instance-root]
<= download-base
md5sum = 8ba6905c430e69a14db1be386f932c0f
md5sum = f647054be67998f9eece174f106c4464
[instance-server]
<= download-base
......
[buildout]
extends =
../../component/python3/buildout.cfg
software.cfg
python = python3
# Ignore these for now
common-parts -=
rdiff-backup
[python]
part = python3
......@@ -8,8 +8,6 @@ extends =
../../stack/slapos.cfg
../../component/python3/buildout.cfg
python = python3
parts =
slapos-cookbook
network-bench-cfg
......@@ -19,6 +17,9 @@ parts =
template-monitor
monitor-collect-csv-dump
[python]
part = python3
[template]
recipe = slapos.recipe.template
url = ${:_profile_base_location_}/${:filename}
......
......@@ -14,7 +14,7 @@
# not need these here).
[neotest-env.sh]
filename = neotest-env.sh.in
md5sum = 595eebbbcb56b6a8464d48833cfae57b
md5sum = bd46e95f1cea62c3b0082fe8c0c9c90b
[neotest]
filename = neotest.in
......
......@@ -9,7 +9,7 @@ PATH="${ioping:location}/bin:$PATH"
PATH="${lmbench:location}/bin:$PATH"
PATH="${mariadb:location}/bin:$PATH"
PATH="${mariadb:location}/scripts:$PATH"
PATH="${python2.7:location}/bin:$PATH"
PATH="${python:location}/bin:$PATH"
# add all eggs and develop-eggs to py path
#
......
......@@ -2,7 +2,6 @@
extends =
buildout.hash.cfg
../../component/redis/buildout.cfg
../../component/python3/buildout.cfg
../../stack/lamp/buildout.cfg
[nc-download-base]
......
[buildout]
extends =
../../component/python3/buildout.cfg
software.cfg
python = python3
[python]
part = python3
[eggs]
eggs -=
......
[buildout]
extends =
../../component/python3/buildout.cfg
software.cfg
python = python3
[nghttp2]
environment =
PATH=${autoconf:location}/bin:${automake:location}/bin:${libtool:location}/bin:${m4:location}/bin:${python3:location}/bin:%(PATH)s
[python]
part = python3
[supervisor-repository]
<= git-clone-repository
......
......@@ -18,7 +18,7 @@ md5sum = ec70348dd71b319590a5c5837f3d2e45
[template-runner]
filename = instance-runner.cfg
md5sum = f342daca2e87f8fa44fd7b6a2a1c22f8
md5sum = 7100c6678576c285322f1445029cd4f2
[template-runner-import-script]
filename = template/runner-import.sh.jinja2
......
......@@ -692,7 +692,7 @@ hash-existing-files = $${buildout:directory}/software_release/buildout.cfg
[shell-environment]
shell = ${bash:location}/bin/bash
path = ${nano:location}/bin:${vim:location}/bin:${screen:location}/bin:${tmux:location}/bin:${git:location}/bin:${curl:location}/bin:${python2.7:location}/bin:${tig:location}/bin:${zip:location}/bin:${mosh:location}/bin:${bash:location}/bin:${fish-shell:location}/bin:$${directory:bin}:/usr/bin:/bin/
path = ${nano:location}/bin:${vim:location}/bin:${screen:location}/bin:${tmux:location}/bin:${git:location}/bin:${curl:location}/bin:${python:location}/bin:${tig:location}/bin:${zip:location}/bin:${mosh:location}/bin:${bash:location}/bin:${fish-shell:location}/bin:$${directory:bin}:/usr/bin:/bin/
[prepare-software]
recipe = slapos.cookbook:wrapper
......
[buildout]
extends =
../../component/python3/buildout.cfg
software.cfg
python = python3
# Ignore these for now
common-parts -=
rdiff-backup
[python]
part = python3
[python-with-eggs]
eggs -=
# futures is a backport of Py3's concurrent.futures module
......
......@@ -18,7 +18,6 @@ extends =
../../component/mosh/buildout.cfg
../../component/rsync/buildout.cfg
../../component/pycurl/buildout.cfg
../../component/python-2.7/buildout.cfg
../../component/screen/buildout.cfg
../../component/shellinabox/buildout.cfg
../../component/vim/buildout.cfg
......
[buildout]
extends =
../../component/python3/buildout.cfg
../../component/python-2.7/buildout.cfg
../../component/nodejs/buildout.cfg
../../component/caddy/buildout.cfg
../../component/git/buildout.cfg
......@@ -56,7 +54,7 @@ mode = 0644
[theia]
recipe = plone.recipe.command
command = ${bash:location}/bin/bash -c "
export TMPDIR=${:location}/tmp PATH=${nodejs:location}/bin/:${python2.7:location}/bin/:$PATH &&
export TMPDIR=${:location}/tmp PATH=${nodejs:location}/bin:$PATH &&
mkdir -p ${:location} && \
mkdir -p \$TMPDIR && \
mkdir -p ${:THEIA_DEFAULT_PLUGINS} && \
......
......@@ -8,7 +8,6 @@ extends =
../../component/gzip/buildout.cfg
../../component/logrotate/buildout.cfg
../../component/pycurl/buildout.cfg
../../component/python-2.7/buildout.cfg
../../component/stunnel/buildout.cfg
../../component/varnish/buildout.cfg
../../component/wget/buildout.cfg
......
......@@ -23,7 +23,6 @@ extends =
../component/mesa/buildout.cfg
../component/onlyoffice-core/buildout.cfg
../component/poppler/buildout.cfg
../component/python-2.7/buildout.cfg
../component/rdiff-backup/buildout.cfg
../component/xorg/buildout.cfg
......
......@@ -2,8 +2,6 @@
# Software Releases or Stacks can safely extend this stack.
[buildout]
python = python2.7
# Developers need to add explicitely this part in their software profile
# parts = slapos-cookbook
# Note that if you want a develop version of slapos-cookbook from a git
......@@ -22,9 +20,9 @@ allow-picked-versions = false
# Use shacache and lxml
extends =
../component/defaults.cfg
../component/git/buildout.cfg
../component/lxml-python/buildout.cfg
../component/python-2.7/buildout.cfg
../component/python-cffi/buildout.cfg
../component/python-cliff/buildout.cfg
../component/python-cachecontrol/buildout.cfg
......
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