Commit cb071230 authored by Kirill Smelkov's avatar Kirill Smelkov

neotest: Don't rely on globbing to build $PYTHONPATH

Globbing can be unreliable after incremental profile update and rebuild because
buildout does not remove old eggs. Also it is much more clean to be precise.

-> Use [python-interpreter] to build bin/python with sys.path to wendelin.core
and other needed eggs.
parent e9305ccd
......@@ -14,7 +14,7 @@
# not need these here).
[neotest-env.sh]
filename = neotest-env.sh.in
md5sum = bd46e95f1cea62c3b0082fe8c0c9c90b
md5sum = dd41bd736561b7d59b5ec7e0ab7cde98
[neotest]
filename = neotest.in
......
......@@ -9,24 +9,7 @@ PATH="${ioping:location}/bin:$PATH"
PATH="${lmbench:location}/bin:$PATH"
PATH="${mariadb:location}/bin:$PATH"
PATH="${mariadb:location}/scripts:$PATH"
PATH="${python:location}/bin:$PATH"
# add all eggs and develop-eggs to py path
#
# XXX better leverage something like zc.recipe.egg to generate eggs path buildout way
# XXX see e.g. https://lab.nexedi.com/nexedi/slapos/merge_requests/242#note_49644 for why
# TODO(kirr) try doing so
PYTHONPATH=${buildout:develop-eggs-directory}:$PYTHONPATH # for .egg-link to be found by setuptools
for egglink in ${buildout:develop-eggs-directory}/*.egg-link; do
PYTHONPATH=`cat $egglink |head -1`:$PYTHONPATH
done
for egg in ${buildout:develop-eggs-directory}/*.egg ${buildout:eggs-directory}/*.egg; do
export PYTHONPATH=$egg:$PYTHONPATH
done
PATH="${buildout:bin-directory}/:$PATH" # for python with eggs
export PATH
export PYTHONPATH
export PS1="(neotest-`basename ${buildout:directory}`) $PS1"
......@@ -18,7 +18,6 @@ extends =
../../component/coreutils/buildout.cfg
../../component/util-linux/buildout.cfg
../../component/pygolang/buildout.cfg
../../component/numpy/buildout.cfg
../../stack/nxdtest.cfg
......@@ -36,8 +35,12 @@ parts =
neoppod-develop
neoppod
wendelin.core-dev
eggs
scripts
# for ZEO scripts (runzeo)
ZEO/scripts
neotest-python
neotest-env.sh
neotest
......@@ -100,23 +103,21 @@ template = inline:
# eggs:
[eggs]
recipe = zc.recipe.egg
eggs =
# wendelin.core still requires ZODB3 but having ZODB4 or 5 installed satisfies latest ZODB3
ZODB3
# also for wc
${numpy:egg}
# to install not only wendelin.core modules but also scripts
wendelin.core
# for ZEO scripts (runzeo)
${ZEO:egg}
# for e.g. tcpu.py
${pygolang:egg}
# bin/python is preinstalled with sys.path to wendelin.core & friends.
[neotest-python]
<= python-interpreter
eggs +=
${wendelin.core-dev:egg}
${neoppod:eggs}
# for instance
plone.recipe.command
[scripts]
recipe = zc.recipe.egg:scripts
eggs =
# to install not only wendelin.core modules but also scripts
${wendelin.core-dev:egg}
# wendelin.core: latest not yet released
[wendelin.core-repository]
......
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