Commit 2f5bbf81 authored by Zen Fu's avatar Zen Fu
Browse files

[weblate] Get deterministic output in dep update script

parent d5f93ec1
...@@ -15,18 +15,18 @@ class tails::weblate::python_modules () { ...@@ -15,18 +15,18 @@ class tails::weblate::python_modules () {
# Dependencies for Weblate 3.5.1 # Dependencies for Weblate 3.5.1
tails::pip_package_from_repo { 'amqp': tails::pip_package_from_repo { 'amqp':
version => '2.6.0', # <2.7,>=2.6.0 version => '2.6.0', # >=2.6.0, <2.7
url => 'http://github.com/celery/py-amqp', url => 'http://github.com/celery/py-amqp',
require => [Exec['pip_install_vine']], require => [Exec['pip_install_vine']],
} }
tails::pip_package_from_repo { 'asgiref': tails::pip_package_from_repo { 'asgiref':
version => '3.2.7', # ~=3.2 version => '3.2.8', # ~=3.2
url => 'http://github.com/django/asgiref/', url => 'https://github.com/django/asgiref/',
} }
tails::pip_package_from_repo { 'billiard': tails::pip_package_from_repo { 'billiard':
version => '3.6.3.0', # >=3.6.3.0,<4.0 version => '3.6.3.0', # >=3.6.3.0, <4.0
url => 'https://github.com/celery/billiard', url => 'https://github.com/celery/billiard',
} }
...@@ -34,7 +34,7 @@ class tails::weblate::python_modules () { ...@@ -34,7 +34,7 @@ class tails::weblate::python_modules () {
version => '4.4.5', # >=4.0 version => '4.4.5', # >=4.0
tag => 'v4.4.5', tag => 'v4.4.5',
url => 'https://github.com/celery/celery', url => 'https://github.com/celery/celery',
require => [Exec['pip_install_billiard'], Exec['pip_install_future'], Exec['pip_install_kombu'], Exec['pip_install_vine'], Exec['pip_install_redis']], require => [Exec['pip_install_billiard'], Exec['pip_install_future'], Exec['pip_install_kombu'], Exec['pip_install_redis'], Exec['pip_install_vine']],
} }
tails::pip_package_from_repo { 'celery-batches': tails::pip_package_from_repo { 'celery-batches':
...@@ -45,7 +45,7 @@ class tails::weblate::python_modules () { ...@@ -45,7 +45,7 @@ class tails::weblate::python_modules () {
} }
tails::pip_package_from_repo { 'django': tails::pip_package_from_repo { 'django':
version => '1.11.29', # <2.0,>=1.11 version => '1.11.29', # >=1.11, <2.0
url => 'https://github.com/django/django', url => 'https://github.com/django/django',
require => [Exec['pip_install_asgiref']], require => [Exec['pip_install_asgiref']],
} }
...@@ -99,7 +99,7 @@ class tails::weblate::python_modules () { ...@@ -99,7 +99,7 @@ class tails::weblate::python_modules () {
} }
tails::pip_package_from_repo { 'kombu': tails::pip_package_from_repo { 'kombu':
version => '4.6.10', # >=4.6.10,<4.7 version => '4.6.10', # >=4.6.10, <4.7
tag => 'v4.6.10', tag => 'v4.6.10',
url => 'http://github.com/celery/kombu', url => 'http://github.com/celery/kombu',
require => [Exec['pip_install_amqp'], Exec['pip_install_importlib-metadata'], Exec['pip_install_redis']], require => [Exec['pip_install_amqp'], Exec['pip_install_importlib-metadata'], Exec['pip_install_redis']],
...@@ -112,7 +112,7 @@ class tails::weblate::python_modules () { ...@@ -112,7 +112,7 @@ class tails::weblate::python_modules () {
} }
tails::pip_package_from_repo { 'openpyxl': tails::pip_package_from_repo { 'openpyxl':
version => '2.6.4', # >=2.5.0,<3.0 version => '2.6.4', # >=2.5.0, <3.0
url => 'https://bitbucket.org/openpyxl/openpyxl/src/default', url => 'https://bitbucket.org/openpyxl/openpyxl/src/default',
repo_type => 'hg', repo_type => 'hg',
} }
...@@ -140,7 +140,7 @@ class tails::weblate::python_modules () { ...@@ -140,7 +140,7 @@ class tails::weblate::python_modules () {
} }
tails::pip_package_from_repo { 'six': tails::pip_package_from_repo { 'six':
version => '1.15.0', # >=1.11.0,>=1.7.0 version => '1.15.0', # >=1.7.0, >=1.11.0
url => 'https://github.com/benjaminp/six', url => 'https://github.com/benjaminp/six',
} }
...@@ -153,7 +153,7 @@ class tails::weblate::python_modules () { ...@@ -153,7 +153,7 @@ class tails::weblate::python_modules () {
tails::pip_package_from_repo { 'social-auth-core': tails::pip_package_from_repo { 'social-auth-core':
version => '3.3.3', # >=3.1.0 version => '3.3.3', # >=3.1.0
url => 'https://github.com/python-social-auth/social-core', url => 'https://github.com/python-social-auth/social-core',
require => [Exec['pip_install_oauthlib'], Exec['pip_install_six'], Exec['pip_install_python3-openid']], require => [Exec['pip_install_oauthlib'], Exec['pip_install_python3-openid'], Exec['pip_install_six']],
} }
tails::pip_package_from_repo { 'translate-toolkit': tails::pip_package_from_repo { 'translate-toolkit':
......
...@@ -8,7 +8,7 @@ VENV = ~/tails/virtualenv ...@@ -8,7 +8,7 @@ VENV = ~/tails/virtualenv
deps: debian-deps python-deps deps: debian-deps python-deps
debian-deps: debian-deps:
sudo apt install virtualenv python3-apt python3-debian sudo apt install virtualenv python3-apt python3-debian python3-packaging
virtualenv: $(VENV) virtualenv: $(VENV)
......
...@@ -124,7 +124,7 @@ class Dependency: ...@@ -124,7 +124,7 @@ class Dependency:
strconstrains = [] strconstrains = []
for constrain in self.constrains: for constrain in self.constrains:
strconstrains.append(constrain[0]+constrain[1]) strconstrains.append(constrain[0]+constrain[1])
return ",".join(strconstrains) return ", ".join(sorted(strconstrains, key=lambda s: version.parse(re.sub('[<>=]', '', s))))
def __repr__(self): def __repr__(self):
if self.comment: if self.comment:
...@@ -233,7 +233,7 @@ class Dependency: ...@@ -233,7 +233,7 @@ class Dependency:
deps = list(map(lambda d: f"Exec['pip_install_{d.name}']", self.require(via_pip))) deps = list(map(lambda d: f"Exec['pip_install_{d.name}']", self.require(via_pip)))
if deps: if deps:
lines.append(f"require => [{', '.join(deps)}],") lines.append(f"require => [{', '.join(sorted(deps))}],")
inner = '\n '.join(lines) inner = '\n '.join(lines)
......
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