From 79790d12af902a39ab354c7ac806a91d598dbe38 Mon Sep 17 00:00:00 2001 From: Tomas Orsava Date: Thu, 23 Apr 2020 20:41:13 +0200 Subject: [PATCH] scripts/pythondistdeps: Modify handling of dev versions --- pythondistdeps.py | 2 +- .../requires.txt | 7 +++++++ .../scripts_pythondistdeps/test-data.yaml | 19 +++++++++++++++++++ .../scripts_pythondistdeps/test-requires.yaml | 3 +++ 4 files changed, 30 insertions(+), 1 deletion(-) diff --git a/pythondistdeps.py b/pythondistdeps.py index 76ae93b..ee67e6f 100755 --- a/pythondistdeps.py +++ b/pythondistdeps.py @@ -55,7 +55,7 @@ class RpmVersion(): if self.pre: rpm_suffix = '~{}'.format(''.join(str(x) for x in self.pre)) elif self.dev: - rpm_suffix = '~{}'.format(''.join(str(x) for x in self.dev)) + rpm_suffix = '~~{}'.format(''.join(str(x) for x in self.dev)) elif self.post: rpm_suffix = '^post{}'.format(self.post[1]) else: diff --git a/tests/data/scripts_pythondistdeps/pyreq2rpm.tests-2020.04.07.024dab0-py3.9.egg-info/requires.txt b/tests/data/scripts_pythondistdeps/pyreq2rpm.tests-2020.04.07.024dab0-py3.9.egg-info/requires.txt index ec10bc6..09279fb 100644 --- a/tests/data/scripts_pythondistdeps/pyreq2rpm.tests-2020.04.07.024dab0-py3.9.egg-info/requires.txt +++ b/tests/data/scripts_pythondistdeps/pyreq2rpm.tests-2020.04.07.024dab0-py3.9.egg-info/requires.txt @@ -93,3 +93,10 @@ babel>=1.3,!=2.0 # Tests for breakages in Fedora fedora-python-nb2plots==0+unknown + +# Other tests +hugo1==1.0.0.dev7 +hugo2<=8a4 +hugo3!=11.1.1b14 +hugo4>11rc0 +hugo5===11.1.0.post3 diff --git a/tests/data/scripts_pythondistdeps/test-data.yaml b/tests/data/scripts_pythondistdeps/test-data.yaml index d396254..9722688 100644 --- a/tests/data/scripts_pythondistdeps/test-data.yaml +++ b/tests/data/scripts_pythondistdeps/test-data.yaml @@ -89,8 +89,19 @@ python3.9dist(foobar86) > 2.4.8^post1 python3.9dist(foobar87) > 2^post1 (python3.9dist(foobar9) >= 2.4.8^post1 with python3.9dist(foobar9) < 2.5) + python3.9dist(hugo1) = 1~~dev7 + python3.9dist(hugo2) <= 8~a4 + (python3.9dist(hugo3) < 11.1.1~b14 or python3.9dist(hugo3) > 11.1.1~b14) + python3.9dist(hugo4) > 11~rc0 + python3.9dist(hugo5) = 11.1^post3 python3.9dist(pyparsing0) ((python3.9dist(pyparsing1) < 2.0.4 or python3.9dist(pyparsing1) > 2.0.4) with (python3.9dist(pyparsing1) < 2.1.2 or python3.9dist(pyparsing1) > 2.1.2) with (python3.9dist(pyparsing1) < 2.1.6 or python3.9dist(pyparsing1) > 2.1.6) with python3.9dist(pyparsing1) >= 2.0.1) + usr/lib/python3.9/site-packages/taskotron_python_versions-0.1.dev6.dist-info: + provides: python3.9dist(taskotron-python-versions) = 0.1~~dev6 + requires: |- + python(abi) = 3.9 + python3.9dist(libarchive-c) + python3.9dist(python-bugzilla) --provides --majorver-provides: usr/lib/python2.7/site-packages/attrs-19.1.0-py2.7.egg-info: provides: |- @@ -331,6 +342,14 @@ python3.9dist(six) = 1.12 python3dist(six) = 1.12 requires: python(abi) = 3.9 + usr/lib/python3.9/site-packages/taskotron_python_versions-0.1.dev6.dist-info: + provides: |- + python3.9dist(taskotron-python-versions) = 0.1~~dev6 + python3dist(taskotron-python-versions) = 0.1~~dev6 + requires: |- + python(abi) = 3.9 + python3.9dist(libarchive-c) + python3.9dist(python-bugzilla) usr/lib/python3.9/site-packages/tox-3.14.0.dist-info: provides: |- python3.9dist(tox) = 3.14 diff --git a/tests/data/scripts_pythondistdeps/test-requires.yaml b/tests/data/scripts_pythondistdeps/test-requires.yaml index af79a28..c06d6c0 100644 --- a/tests/data/scripts_pythondistdeps/test-requires.yaml +++ b/tests/data/scripts_pythondistdeps/test-requires.yaml @@ -92,3 +92,6 @@ kubernetes: fsleyes: wheel: '0.32.3': ['3.9'] +taskotron-python-versions: + wheel: + '0.1.dev6': ['3.9']