Commit 8cc2f9d7 authored by Julien Muchembled's avatar Julien Muchembled

fixup! component/systemd: Update MarkupSafe version

The version of MarkupSafe must be chosen depending on the version of
Python that runs the 'pip' subprocess, and not the current 'buildout'
process.

This makes a difference when e.g. buildout runs with Python 2, because
[python3] defaults to Python 3.8+ and we want to install the recent
MarkupSafe version (even if Python 2 can only install the old one).
parent 028fae15
......@@ -12,36 +12,19 @@ extends =
../ninja/buildout.cfg
../meson/buildout.cfg
[systemd-markupsafe-download]
recipe = slapos.recipe.build:download
shared = true
url = https://files.pythonhosted.org/packages/bf/10/ff66fea6d1788c458663a84d88787bae15d45daa16f6b3ef33322a51fc7e/${:filename}
filename = MarkupSafe-2.0.1.tar.gz
md5sum = 892e0fefa3c488387e5cc0cad2daa523
[systemd-markupsafe-download:sys.version_info < (3,8)]
url = https://files.pythonhosted.org/packages/4d/de/32d741db316d8fdb7680822dd37001ef7a448255de9699ab4bfcbdf4172b/${:filename}
filename = MarkupSafe-1.0.tar.gz
md5sum = 2fcedc9284d50e577b5192e8e3578355
[systemd-jinja2-download]
recipe = slapos.recipe.build:download
shared = true
url = https://files.pythonhosted.org/packages/4f/e7/65300e6b32e69768ded990494809106f87da1d436418d5f1367ed3966fd7/${:filename}
filename = Jinja2-2.11.3.tar.gz
md5sum = 231dc00d34afb2672c497713fa9cdaaa
[systemd-python]
recipe = slapos.recipe.build
shared = true
markupsafe = ${systemd-markupsafe-download:target}
jinja2 = ${systemd-jinja2-download:target}
eggs =
Jinja2 ==2.11.3
MarkupSafe ==2.0.1; python_version>='3.8'
MarkupSafe ==1.0; python_version<'3.8'
install =
import os
call([options['python'], '-m', 'venv', '--clear', location])
pip = os.path.join(location, 'bin', 'pip')
call([pip, 'install', '--no-index', options['markupsafe'], options['jinja2']])
call([pip, 'install'] + options['eggs'].splitlines())
call([pip, 'uninstall', '-y', 'pip', 'setuptools'])
# selftest
python = os.path.join(location, 'bin', 'python3')
......
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