Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
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
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Thomas Leymonerie
slapos
Commits
7c75ecf7
Commit
7c75ecf7
authored
Feb 22, 2022
by
Thomas Leymonerie
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
sauvegarde de test-r, django, test-recipe
parent
49dbfac4
Changes
8
Hide whitespace changes
Inline
Side-by-side
Showing
8 changed files
with
34 additions
and
70 deletions
+34
-70
slapos/recipe/test_recipe.py
slapos/recipe/test_recipe.py
+21
-32
software/django/buildout.hash.cfg
software/django/buildout.hash.cfg
+1
-1
software/django/instance.cfg.in
software/django/instance.cfg.in
+4
-23
software/django/software.cfg
software/django/software.cfg
+2
-3
software/test-r/buildout.hash.cfg
software/test-r/buildout.hash.cfg
+1
-1
software/test-r/instance.cfg.in
software/test-r/instance.cfg.in
+2
-7
software/test-r/software.cfg
software/test-r/software.cfg
+0
-1
stack/slapos.cfg
stack/slapos.cfg
+3
-2
No files found.
slapos/recipe/test_recipe.py
View file @
7c75ecf7
import
os
from
slapos.recipe.librecipe
import
GenericBaseRecipe
import
zc.buildout.easy_install
from
zc.buildout.easy_install
import
working_set
class
Recipe
(
GenericBaseRecipe
):
def
__init__
(
self
,
buildout
,
name
,
options
):
options
[
'path'
]
=
os
.
path
.
join
(
buildout
[
'buildout'
][
'parts-directory'
],
name
,
)
self
.
options
=
options
self
.
buildout
=
buildout
buildout_section
=
buildout
[
'buildout'
]
options
[
'eggs-directory'
]
=
buildout_section
[
'eggs-directory'
]
options
[
'develop-eggs-directory'
]
=
buildout_section
[
'develop-eggs-directory'
]
def
__init__
(
self
,
buildout
,
name
,
options
):
self
.
options
=
options
buildout_section
=
buildout
[
'buildout'
]
eggs_dir
=
buildout_section
[
'eggs-directory'
]
develop_eggs_dir
=
buildout_section
[
'develop-eggs-directory'
]
eggs
=
tuple
(
egg
.
strip
()
for
egg
in
options
[
'eggs'
].
splitlines
()
if
egg
.
strip
()
)
eggs_set
=
working_set
(
eggs
,
[
develop_eggs_dir
,
eggs_dir
]
)
def
install
(
self
):
develop_eggs_dir
=
self
.
options
[
'develop-eggs-directory'
]
eggs_dir
=
self
.
options
[
'eggs-directory'
]
egg_list
=
tuple
(
egg
.
strip
()
for
egg
in
self
.
options
[
'eggs'
].
splitlines
()
if
egg
.
strip
()
)
if
develop_eggs_dir
and
eggs_dir
:
working_set
=
zc
.
buildout
.
easy_install
.
working_set
(
egg_list
,
[
develop_eggs_dir
,
eggs_dir
]
)
else
:
working_set
=
set
()
python_path
=
":"
.
join
(
tuple
(
dist
.
location
for
dist
in
working_set
))
self
.
options
[
'python_path'
]
=
python_path
update
=
install
\ No newline at end of file
python_path
=
":"
.
join
(
tuple
(
dist
.
location
for
dist
in
eggs_set
))
options
[
'pythonpath'
]
=
python_path
def
install
(
self
):
pass
update
=
install
\ No newline at end of file
software/django/buildout.hash.cfg
View file @
7c75ecf7
[instance]
filename = instance.cfg.in
md5sum =
16c31e51084f195f5a10afb530f55475
md5sum =
e8cb73e18d2ca8246bf73fbc56cc95da
software/django/instance.cfg.in
View file @
7c75ecf7
...
...
@@ -5,13 +5,9 @@ parts =
eggs-directory = {{ buildout['eggs-directory'] }}
develop-eggs-directory = {{ buildout['develop-eggs-directory'] }}
[slap-configuration]
recipe = slapos.cookbook:slapconfiguration
computer = ${slap-connection:computer-id}
partition = ${slap-connection:partition-id}
url = ${slap-connection:server-url}
key = ${slap-connection:key-file}
cert = ${slap-connection:cert-file}
[python-path]
recipe = slapos.recipe.build:egg
eggs = {{ django['eggs'] }}
[setup-script]
recipe = slapos.recipe.template:jinja2
...
...
@@ -19,23 +15,8 @@ rendered = ${buildout:directory}/setup-script
template =
inline:#!/bin/sh
export PATH={{ buildout['bin-directory'] }}:$PATH
export PYTHONSTARTUP={{ django_interpreter }}
export PYTHONPATH=`${setup-django:rendered}`:{{ buildout['bin-directory'] }}:$PYTHONPATH
[setup-django]
recipe = slapos.recipe.template:jinja2
rendered = ${buildout:directory}/setup-django.py
template =
inline:#!{{ django_interpreter }}
import sys
import os
path = []
for p in sys.path:
if not os.path.relpath(p, start='{{ buildout['eggs-directory'] }}').startswith(os.pardir):
path.append(p)
print(":".join(path))
export PYTHONPATH=${python-path:pythonpath}:$PYTHONPATH
[publish-connection-information]
recipe = slapos.cookbook:publish
setup-script = ${setup-script:rendered}
ipv6 = [${slap-configuration:ipv6-random}]
software/django/software.cfg
View file @
7c75ecf7
...
...
@@ -23,11 +23,10 @@ rendered = ${buildout:directory}/template.cfg
template = ${:_profile_base_location_}/${:filename}
context =
section buildout buildout
raw django_interpreter ${buildout:bin-directory}/${django:interpreter}
section django django
[versions]
#Django = 3.2.12
Django = 3.2.3
Django = 3.2.12
sqlparse = 0.4.2
asgiref = 3.5.0
typing-extensions = 3.7.2
...
...
software/test-r/buildout.hash.cfg
View file @
7c75ecf7
[instance]
filename = instance.cfg.in
md5sum =
ed701a06948e749b3e5ad312c8989e93
md5sum =
747aed81b934be7d551c0dcbbcca412d
software/test-r/instance.cfg.in
View file @
7c75ecf7
...
...
@@ -7,11 +7,6 @@ develop-eggs-directory = {{ buildout['develop-eggs-directory'] }}
[test_recipe]
recipe = slapos.cookbook:test_recipe
port = 8080
eggs = {{ django['eggs'] }}
contents =
<zeo>
address ${:port}
</zeo>
<mappingstorage>
</mappingstorage>
software/test-r/software.cfg
View file @
7c75ecf7
...
...
@@ -30,4 +30,3 @@ sqlparse = 0.4.2
asgiref = 3.5.0
typing-extensions = 3.7.2
django-cors-headers = 3.11.0
stack/slapos.cfg
View file @
7c75ecf7
...
...
@@ -40,6 +40,7 @@ find-links +=
http://www.nexedi.org/static/packages/source/
http://www.nexedi.org/static/packages/source/slapos.buildout/
/srv/slapgrid/slappart28/srv/project/slapos/dist/
/srv/slapgrid/slappart28/srv/project/slapos.recipe.build/dist/
# Use only quite well working sites.
allow-hosts +=
...
...
@@ -190,13 +191,13 @@ setproctitle = 1.1.10
setuptools-dso = 1.7
rubygemsrecipe = 0.4.3
six = 1.12.0
slapos.cookbook = 1.0.226
+tleymone2
slapos.cookbook = 1.0.226
slapos.core = 1.7.2
slapos.extension.strip = 0.4
slapos.extension.shared = 1.0
slapos.libnetworkcache = 0.22
slapos.rebootstrap = 4.5
slapos.recipe.build = 0.5
3
slapos.recipe.build = 0.5
4+tleymone1
slapos.recipe.cmmi = 0.19
slapos.recipe.template = 5.0
slapos.toolbox = 0.126
...
...
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