Commit 547a4322 authored by Thomas Gambier's avatar Thomas Gambier 🚴🏼

software/re6stnet: move to python3

parent a3e15fc4
......@@ -12,11 +12,8 @@ extends =
parts =
re6stnet
[python]
part = python2.7
[openssl]
<= openssl-1.1
[python3]
<= python3.11
[gcc]
min_version = 0
......@@ -28,6 +25,7 @@ eggs =
${python-cffi:egg}
${python-cryptography:egg}
${python-PyYAML:egg}
${python-pim-dm:egg}
pyOpenSSL
re6stnet[geoip]
......@@ -36,54 +34,4 @@ eggs =
initialization =
import os
os.environ['GEOIP2_MMDB'] = "${geolite2-country:location}/GeoLite2-Country.mmdb"
os.environ['PATH'] = "${openvpn:location}/sbin:${babeld:location}/bin:${openssl:location}/bin:${python:location}/bin:${pim-dm-buildout:location}/bin:" + os.environ.get('PATH', '/usr/sbin:/usr/bin:/sbin:/bin')
[pim-dm-buildout]
recipe = slapos.recipe.build
base = ${:_profile_base_location_}
python = ${python3:executable}
install =
import os
from zc.buildout.buildout import _isurl, urljoin
from slapos.rebootstrap.bootstrap import setup_script
base = options['base']
if _isurl(base):
extends = lambda path: urljoin(base + '/', path)
else:
extends = lambda path: os.path.realpath(os.path.join(base, path))
buildout_extra = []
buildout_section = self.buildout['buildout']
for option_name in ('download-cache', 'newest', 'shared-part-list'):
option_value = buildout_section.get(option_name)
if option_value:
buildout_extra.append('%s = %s' % (option_name, option_value))
os.mkdir(location)
with open(os.path.join(location, 'buildout.cfg'), 'w') as buildout_conf:
buildout_conf.write(
options['template'] % {
'extends': '\n '.join(map(extends, (
'../../stack/slapos.cfg',
'../python-pim-dm/buildout.cfg',
))),
'buildout': '\n'.join(buildout_extra),
}
)
buildout = os.path.join(location, 'bin', 'buildout')
os.mkdir(os.path.dirname(buildout))
setup_script(buildout, options['python'])
call((buildout, '-U'), cwd=location)
template =
[buildout]
extends = %(extends)s
extends-cache = ${buildout:extends-cache}
extensions -= slapos.rebootstrap
%(buildout)s
[libpcap]
recipe =
location = ${libpcap:location}
environment =
[libyaml]
recipe =
location = ${libyaml:location}
pre-configure =
os.environ['PATH'] = "${openvpn:location}/sbin:${babeld:location}/bin:${openssl:location}/bin:${python:location}/bin:" + os.environ.get('PATH', '/usr/sbin:/usr/bin:/sbin:/bin')
......@@ -13,13 +13,13 @@ extends =
# Monitoring stack (keep on bottom)
../../stack/monitor/buildout.cfg
# Python2 versions for buildout (keep bottom-most)
../../stack/slapos-py2.cfg
parts +=
slapos-cookbook
template
[python3]
<= python3.11
[re6stnet-repository]
recipe = slapos.recipe.build:gitclone
repository = https://lab.nexedi.com/nexedi/re6stnet.git
......@@ -103,6 +103,3 @@ context =
[template-re6st-registry-conf]
< = download-base
[versions]
miniupnpc = 1.9
......@@ -281,7 +281,6 @@ testfixtures = 6.11.0
pyflakes = 2.0.0
zope.testing = 4.6.2
iniparse = 0.5
miniupnpc = 1.9
nemu = 0.3.1
nemu3 = 0.4
multiping = 1.1.2
......
......@@ -271,6 +271,7 @@ MarkupSafe = 2.1.3
matplotlib = 2.1.2
matplotlib-inline = 0.1.6:whl
meld3 = 1.0.2
miniupnpc = 2.2.8
mistune = 0.8.4
mock = 3.0.5
more-itertools = 5.0.0
......@@ -298,7 +299,7 @@ patsy = 0.5.3
pbr = 5.9.0
pexpect = 4.8.0
pickleshare = 0.7.4
pim-dm = 1.4.0nxd002
pim-dm = 1.4.0+nxd002
pkgconfig = 1.5.1:whl
pkgutil-resolve-name = 1.3.10:whl
platformdirs = 4.2.0:whl
......@@ -332,7 +333,7 @@ pytest-runner = 5.2:whl
python-dateutil = 2.8.2:whl
python-json-logger = 2.0.7
pytz = 2022.2.1
PyYAML = 5.4.1
PyYAML = 6.0.2
pyzmq = 24.0.1
qtconsole = 5.5.1
qtpy = 2.4.1:whl
......@@ -353,7 +354,7 @@ sgmllib3k = 1.0.0
simplegeneric = 0.8.1
singledispatch = 3.4.0.3
six = 1.16.0
slapos.cookbook = 1.0.367
slapos.cookbook = 1.0.369
slapos.core = 1.13.0
slapos.extension.shared = 1.0
slapos.libnetworkcache = 0.25
......@@ -428,6 +429,7 @@ importlib-metadata = 6.7.0:whl
itsdangerous = 0.24
Jinja2 = 2.11.3
MarkupSafe = 2.0.1
PyYAML = 5.4.1
typing-extensions = 4.7.1:whl
Werkzeug = 2.0.2
......
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