Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/checkpoint-restore/criu.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRadostin Stoyanov <rstoyanov@fedoraproject.org>2022-05-11 21:03:36 +0300
committerAndrei Vagin <avagin@gmail.com>2022-06-22 20:20:33 +0300
commitff927316908319ef52c3991960a98d5398d8da35 (patch)
treea6c8043e06eddb25884a46d0f08569a6759bd5fe
parentf522adec4a328393c3f5f77b9864ef7030f4f705 (diff)
crit: Use same version as criu
Name collision with an abandoned project named 'crit' in pypi causes pip to show crit (CRiu Image Tool) as outdated. This patch updates crit to use the same version and license as criu. Fixes #1878 Signed-off-by: Radostin Stoyanov <rstoyanov@fedoraproject.org>
-rw-r--r--Makefile1
-rw-r--r--scripts/crit-setup.py16
2 files changed, 16 insertions, 1 deletions
diff --git a/Makefile b/Makefile
index ad70800eb..436ebfd0d 100644
--- a/Makefile
+++ b/Makefile
@@ -418,6 +418,7 @@ lint:
flake8 --config=scripts/flake8.cfg test/others/rpc/config_file.py
flake8 --config=scripts/flake8.cfg lib/py/images/pb2dict.py
flake8 --config=scripts/flake8.cfg scripts/criu-ns
+ flake8 --config=scripts/flake8.cfg scripts/crit-setup.py
flake8 --config=scripts/flake8.cfg coredump/
shellcheck --version
shellcheck scripts/*.sh
diff --git a/scripts/crit-setup.py b/scripts/crit-setup.py
index 871e55921..13df03e3b 100644
--- a/scripts/crit-setup.py
+++ b/scripts/crit-setup.py
@@ -1,10 +1,24 @@
+import os
from distutils.core import setup
+criu_version = "0.0.1"
+env = os.environ
+
+if 'CRIU_VERSION_MAJOR' in env and 'CRIU_VERSION_MINOR' in env:
+ criu_version = '{}.{}'.format(
+ env['CRIU_VERSION_MAJOR'],
+ env['CRIU_VERSION_MINOR']
+ )
+
+ if 'CRIU_VERSION_SUBLEVEL' in env and env['CRIU_VERSION_SUBLEVEL']:
+ criu_version += '.' + env['CRIU_VERSION_SUBLEVEL']
+
setup(name="crit",
- version="0.0.1",
+ version=criu_version,
description="CRiu Image Tool",
author="CRIU team",
author_email="criu@openvz.org",
+ license="GPLv2",
url="https://github.com/checkpoint-restore/criu",
package_dir={'pycriu': 'lib/py'},
packages=["pycriu", "pycriu.images"],