Skip to content

Commit

Permalink
crit: Use same version as criu
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
rst0git authored and avagin committed May 13, 2022
1 parent 410db8d commit 25d666c
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 1 deletion.
1 change: 1 addition & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -428,6 +428,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
Expand Down
16 changes: 15 additions & 1 deletion scripts/crit-setup.py
Original file line number Diff line number Diff line change
@@ -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"],
Expand Down

0 comments on commit 25d666c

Please sign in to comment.