Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
S
slapos
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
5
Merge Requests
5
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Jérome Perrin
slapos
Commits
7b27f510
Commit
7b27f510
authored
May 07, 2024
by
Jérome Perrin
1
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'y/zope4py3+gpy' of
https://lab.nexedi.com/kirr/slapos
into zope4py3
parents
8c52d438
77d1bbdb
Pipeline
#34392
failed with stage
in 0 seconds
Changes
2
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
51 additions
and
17 deletions
+51
-17
component/pygolang/buildout.cfg
component/pygolang/buildout.cfg
+28
-14
stack/erp5/buildout.cfg
stack/erp5/buildout.cfg
+23
-3
No files found.
component/pygolang/buildout.cfg
View file @
7b27f510
...
@@ -8,7 +8,7 @@ extends =
...
@@ -8,7 +8,7 @@ extends =
parts =
parts =
pygolang
pygolang
gpython
gpython
-interpreter
# pygolang is installed from git checkout
# pygolang is installed from git checkout
...
@@ -21,19 +21,11 @@ setup-eggs =
...
@@ -21,19 +21,11 @@ setup-eggs =
setuptools-dso
setuptools-dso
gevent
gevent
# gpython program
[gpython]
recipe = zc.recipe.egg:scripts
eggs = ${pygolang:egg}
scripts = gpython
# convenience for gpython users
exe = ${buildout:bin-directory}/gpython
[pygolang-repository]
[pygolang-repository]
recipe = slapos.recipe.build:gitclone
recipe = slapos.recipe.build:gitclone
repository = https://lab.nexedi.com/
nexedi
/pygolang.git
repository = https://lab.nexedi.com/
kirr
/pygolang.git
branch =
maste
r
branch =
y/bstr+x/gpyst
r
revision = pygolang-0.1-69-g044deb35
#
revision = pygolang-0.1-69-g044deb35
location = ${buildout:parts-directory}/pygolang
location = ${buildout:parts-directory}/pygolang
git-executable = ${git:location}/bin/git
git-executable = ${git:location}/bin/git
...
@@ -49,7 +41,9 @@ eggs = ${pygolang:egg}
...
@@ -49,7 +41,9 @@ eggs = ${pygolang:egg}
interpreter = python
interpreter = python
# interpreter code that buildout generates cannot process `-m pytest --<pytest-option>`
# interpreter code that buildout generates cannot process `-m pytest --<pytest-option>`
# -> use pymain from gpython to workaround that.
# -> use pymain from gpython to workaround that.
pre-initialization =
initialization =
initialization =
${:pre-initialization}
# tail to pymain
# tail to pymain
from gpython import pymain
from gpython import pymain
pymain(sys.argv)
pymain(sys.argv)
...
@@ -63,6 +57,17 @@ scripts = ${:interpreter}
...
@@ -63,6 +57,17 @@ scripts = ${:interpreter}
exe = ${buildout:bin-directory}/${:interpreter}
exe = ${buildout:bin-directory}/${:interpreter}
# gpython-interpreter is like python-interpreter, but runs gpython instead of standard python.
[gpython-interpreter]
<= python-interpreter
interpreter = gpython
initialization =
${:pre-initialization}
from gpython import main
main()
sys.exit(0)
# pyprog provides macro recipe to build python programs.
# pyprog provides macro recipe to build python programs.
#
#
# Contrary to zc.recipe.egg:scripts it generates scripts that are run with
# Contrary to zc.recipe.egg:scripts it generates scripts that are run with
...
@@ -77,6 +82,13 @@ exe = ${buildout:bin-directory}/${:interpreter}
...
@@ -77,6 +82,13 @@ exe = ${buildout:bin-directory}/${:interpreter}
# exe = ${buildout:bin-directory}/myprog
# exe = ${buildout:bin-directory}/myprog
# entry = my.py.mod:main
# entry = my.py.mod:main
# eggs = ...
# eggs = ...
#
# By default python interpreter defined in [python-interpreter] section is used
# to run the program. The default can be adjusted as illustrated below:
#
# [myprog]
# <= pyprog
# python-interpreter = gpython-interpreter # set to name of the section that defines the interpreter
[pyprog]
[pyprog]
recipe = slapos.recipe.build
recipe = slapos.recipe.build
initialization =
initialization =
...
@@ -88,6 +100,7 @@ init =
...
@@ -88,6 +100,7 @@ init =
entry = options['entry']
entry = options['entry']
eggs = options['eggs']
eggs = options['eggs']
pyinit = options['initialization']
pyinit = options['initialization']
pyinterpreter = options.get('python-interpreter', 'python-interpreter')
options['depends'] += '$${.%s.pyprog:recipe}' % name
options['depends'] += '$${.%s.pyprog:recipe}' % name
...
@@ -97,6 +110,7 @@ init =
...
@@ -97,6 +110,7 @@ init =
# indent pyinit with ' '
# indent pyinit with ' '
__pyinit = '\n'.join([' '+_ for _ in pyinit.splitlines()])
__pyinit = '\n'.join([' '+_ for _ in pyinit.splitlines()])
__eggs = '\n'.join([' '+_ for _ in eggs.splitlines()])
self.buildout.parse("""
self.buildout.parse("""
# .X.pyprog is python program to start and run entry
# .X.pyprog is python program to start and run entry
...
@@ -113,7 +127,7 @@ init =
...
@@ -113,7 +127,7 @@ init =
# .X.pyexe is python interpreter used by .X.pyprog
# .X.pyexe is python interpreter used by .X.pyprog
[.%(name)s.pyexe]
[.%(name)s.pyexe]
<=
python-interpreter
<=
%(pyinterpreter)s
eggs += %(eggs)s
eggs += %(
__
eggs)s
interpreter = $${:_buildout_section_name_}
interpreter = $${:_buildout_section_name_}
""" % locals())
""" % locals())
stack/erp5/buildout.cfg
View file @
7b27f510
...
@@ -88,6 +88,7 @@ parts +=
...
@@ -88,6 +88,7 @@ parts +=
# some additional utils
# some additional utils
zodbpack
zodbpack
runwsgi
# Create instance template
# Create instance template
template
template
...
@@ -505,12 +506,28 @@ initialization =
...
@@ -505,12 +506,28 @@ initialization =
sys.path[0:0] = ['/'.join(['''${buildout:parts-directory}''', x]) for x in repository_id_list]
sys.path[0:0] = ['/'.join(['''${buildout:parts-directory}''', x]) for x in repository_id_list]
[erp5-python-interpreter]
[erp5-python-interpreter]
<= python-interpreter
# a python interpreter with all eggs available, usable for the software release but also
# a python interpreter with all eggs available, usable for the software release but also
# for external tools (such as python extension in theia).
# for external tools (such as python extension in theia).
# we also want to use bstr/ustr from gpython as builtin string types, but keep
# the program named as just `python`.
<= gpython-interpreter
interpreter = python
pre-initialization +=
import os
os.environ.setdefault('GPYTHON_STRINGS', 'bstr+ustr')
os.environ.setdefault('GPYTHON_RUNTIME', 'threads')
eggs += ${eggs:eggs}
eggs += ${eggs:eggs}
extra-paths += ${eggs:extra-paths}
extra-paths += ${eggs:extra-paths}
# erp5-pyprog is similar to pyprog macro and should be used by python-based
# programs instantiated in ERP5 software-release.
[erp5-pyprog]
<= pyprog
exe = ${buildout:bin-directory}/${:_buildout_section_name_}
python-interpreter = erp5-python-interpreter
# by default no need for extra eggs in addition to eggs provided by interpreter
eggs =
[erp5-python-interpreter-jupyter]
[erp5-python-interpreter-jupyter]
<= erp5-python-interpreter
<= erp5-python-interpreter
interpreter = pythonwitheggs_jupyter
interpreter = pythonwitheggs_jupyter
...
@@ -662,11 +679,9 @@ eggs =
...
@@ -662,11 +679,9 @@ eggs =
Zope
Zope
entry-points =
entry-points =
runwsgi=Products.ERP5.bin.zopewsgi:runwsgi
scripts =
scripts =
apachedex
apachedex
performance_tester_erp5
performance_tester_erp5
runwsgi
runzeo
runzeo
tidstoraged
tidstoraged
tidstorage_repozo
tidstorage_repozo
...
@@ -783,6 +798,11 @@ scripts =
...
@@ -783,6 +798,11 @@ scripts =
depends =
depends =
${slapos-toolbox-dependencies:eggs}
${slapos-toolbox-dependencies:eggs}
[runwsgi]
<= erp5-pyprog
entry = Products.ERP5.bin.zopewsgi:runwsgi
[versions]
[versions]
# See ../../software/neoppod/software-common.cfg for versions common with NEO:
# See ../../software/neoppod/software-common.cfg for versions common with NEO:
# neoppod, mysqlclient, slapos.recipe.template
# neoppod, mysqlclient, slapos.recipe.template
...
...
Jérome Perrin
@jerome
mentioned in merge request
nexedi/slapos!1575
·
May 07, 2024
mentioned in merge request
nexedi/slapos!1575
mentioned in merge request nexedi/slapos!1575
Toggle commit list
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment