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
Pipeline #12396 failed with stage
in 0 seconds
...@@ -14,7 +14,7 @@ ...@@ -14,7 +14,7 @@
# not need these here). # not need these here).
[neotest-env.sh] [neotest-env.sh]
filename = neotest-env.sh.in filename = neotest-env.sh.in
md5sum = bd46e95f1cea62c3b0082fe8c0c9c90b md5sum = dd41bd736561b7d59b5ec7e0ab7cde98
[neotest] [neotest]
filename = neotest.in filename = neotest.in
......
...@@ -9,24 +9,7 @@ PATH="${ioping:location}/bin:$PATH" ...@@ -9,24 +9,7 @@ PATH="${ioping:location}/bin:$PATH"
PATH="${lmbench:location}/bin:$PATH" PATH="${lmbench:location}/bin:$PATH"
PATH="${mariadb:location}/bin:$PATH" PATH="${mariadb:location}/bin:$PATH"
PATH="${mariadb:location}/scripts:$PATH" PATH="${mariadb:location}/scripts:$PATH"
PATH="${python:location}/bin:$PATH" PATH="${buildout:bin-directory}/:$PATH" # for python with eggs
# 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
export PATH export PATH
export PYTHONPATH
export PS1="(neotest-`basename ${buildout:directory}`) $PS1" export PS1="(neotest-`basename ${buildout:directory}`) $PS1"
...@@ -18,7 +18,6 @@ extends = ...@@ -18,7 +18,6 @@ extends =
../../component/coreutils/buildout.cfg ../../component/coreutils/buildout.cfg
../../component/util-linux/buildout.cfg ../../component/util-linux/buildout.cfg
../../component/pygolang/buildout.cfg ../../component/pygolang/buildout.cfg
../../component/numpy/buildout.cfg
../../stack/nxdtest.cfg ../../stack/nxdtest.cfg
...@@ -36,8 +35,12 @@ parts = ...@@ -36,8 +35,12 @@ parts =
neoppod-develop neoppod-develop
neoppod neoppod
wendelin.core-dev wendelin.core-dev
eggs scripts
# for ZEO scripts (runzeo)
ZEO/scripts
neotest-python
neotest-env.sh neotest-env.sh
neotest neotest
...@@ -100,23 +103,21 @@ template = inline: ...@@ -100,23 +103,21 @@ template = inline:
# eggs: # bin/python is preinstalled with sys.path to wendelin.core & friends.
[eggs] [neotest-python]
recipe = zc.recipe.egg <= python-interpreter
eggs = eggs +=
# wendelin.core still requires ZODB3 but having ZODB4 or 5 installed satisfies latest ZODB3 ${wendelin.core-dev:egg}
ZODB3 ${neoppod:eggs}
# 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}
# for instance # for instance
plone.recipe.command 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: latest not yet released
[wendelin.core-repository] [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