This change handles a number of additional quirks in converting python 
packaging requirement expressions to rpm, including handling .* in various 
operators and handling pre and post releases.

For example, comparing the output of "pythondistdeps.py -R" for 
molecule before and after this patch:

```
--- /tmp/molecule-requires.1    2020-01-21 20:23:13.996776548 -0800
+++ /tmp/molecule-requires.2    2020-01-21 20:23:45.722900097 -0800
@@ -1,6 +1,6 @@
-python(abi) == 3.7
+python(abi) = 3.7
 python3.7dist(ansible) >= 2.5
-(python3.7dist(ansible-lint) >= 4.1.1a2 with python3.7dist(ansible-lint) 
< 5)
+(python3.7dist(ansible-lint) < 5 with python3.7dist(ansible-lint) >= 
4.1.1~a2)
 python3.7dist(cerberus) >= 1.3.1
 python3.7dist(click) >= 7
 python3.7dist(click-completion) >= 0.5.1
@@ -20,7 +20,7 @@
 python3.7dist(tabulate) >= 0.8.4
 (python3.7dist(testbar) >= 2.1.2 with python3.7dist(testbar) < 2.2)
 (python3.7dist(testbaz) >= 3.2.1 with python3.7dist(testbaz) < 3.2.2)
-(python3.7dist(testfoo) < 1.0.1 or python3.7dist(testfoo) >= 1.0.1.0)
+(python3.7dist(testfoo) < 1.0.1 or python3.7dist(testfoo) > 1.0.1)
 (python3.7dist(testinfra) >= 3.0.6 with python3.7dist(testinfra) < 4)
 python3.7dist(tree-format) >= 0.1.2
 (python3.7dist(yamllint) >= 1.15 with python3.7dist(yamllint) < 2)
```
You can view, comment on, or merge this pull request online at:

  https://github.com/rpm-software-management/rpm/pull/1015

-- Commit Summary --

  * scripts/pythondistdeps: Improved python version and operator handling.

-- File Changes --

    M scripts/pythondistdeps.py (114)

-- Patch Links --

https://github.com/rpm-software-management/rpm/pull/1015.patch
https://github.com/rpm-software-management/rpm/pull/1015.diff

-- 
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/rpm-software-management/rpm/pull/1015
_______________________________________________
Rpm-maint mailing list
Rpm-maint@lists.rpm.org
http://lists.rpm.org/mailman/listinfo/rpm-maint

Reply via email to