Commit 7c75ecf7 authored by Thomas Leymonerie's avatar Thomas Leymonerie

sauvegarde de test-r, django, test-recipe

parent 49dbfac4
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
[instance]
filename = instance.cfg.in
md5sum = 16c31e51084f195f5a10afb530f55475
md5sum = e8cb73e18d2ca8246bf73fbc56cc95da
......@@ -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}]
......@@ -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
......
[instance]
filename = instance.cfg.in
md5sum = ed701a06948e749b3e5ad312c8989e93
md5sum = 747aed81b934be7d551c0dcbbcca412d
......@@ -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>
......@@ -30,4 +30,3 @@ sqlparse = 0.4.2
asgiref = 3.5.0
typing-extensions = 3.7.2
django-cors-headers = 3.11.0
......@@ -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.53
slapos.recipe.build = 0.54+tleymone1
slapos.recipe.cmmi = 0.19
slapos.recipe.template = 5.0
slapos.toolbox = 0.126
......
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