Commit 3010d872 authored by Léo-Paul Géneau's avatar Léo-Paul Géneau 👾

component/re6stnet: add pim-dm dependency

parent a9c94bac
......@@ -5,6 +5,8 @@ extends =
../geoip2/buildout.cfg
../openvpn/buildout.cfg
../python-cryptography/buildout.cfg
../python-PyYAML/buildout.cfg
../python-pim-dm/buildout.cfg
parts =
re6stnet
......@@ -18,6 +20,7 @@ eggs =
${maxminddb-python:egg}
${python-cffi:egg}
${python-cryptography:egg}
${python-PyYAML:egg}
pyOpenSSL
re6stnet[geoip]
......@@ -26,4 +29,54 @@ 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:" + os.environ.get('PATH', '/usr/sbin:/usr/bin:/sbin:/bin')
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 =
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