Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

scripts/pythondistdeps: Only print rich dep list when required to. #982

Merged

Conversation

gordonmessmer
Copy link
Contributor

No description provided.

@gordonmessmer
Copy link
Contributor Author

This should resolve #981

@gordonmessmer
Copy link
Contributor Author

[gordon@vagabond:~/git/rpm]$ find /home/gordon/git/molecule-root/ | python3 ~/git/rpm/scripts/pythondistdeps.py -R
python(abi) == 3.7
python3.7dist(ansible) >= 2.5
(python3.7dist(ansible-lint) >= 4.1.1a2 with python3.7dist(ansible-lint) < 5)
python3.7dist(cerberus) >= 1.3.1
python3.7dist(click) >= 7
python3.7dist(click-completion) >= 0.5.1
python3.7dist(colorama) >= 0.3.9
python3.7dist(cookiecutter) >= 1.6
python3.7dist(flake8) >= 3.6
python3.7dist(jinja2) >= 2.10.1
(python3.7dist(paramiko) < 3 with python3.7dist(paramiko) >= 2.5)
(python3.7dist(pexpect) >= 4.6 with python3.7dist(pexpect) < 5)
(python3.7dist(pluggy) >= 0.7.1 with python3.7dist(pluggy) < 1)
(python3.7dist(pre-commit) < 2 with python3.7dist(pre-commit) >= 1.17)
(python3.7dist(python-gilt) < 2 with python3.7dist(python-gilt) >= 1.2.1)
(python3.7dist(pyyaml) >= 5.1 with python3.7dist(pyyaml) < 6)
python3.7dist(setuptools)
python3.7dist(sh) >= 1.12.14
python3.7dist(six) >= 1.11
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(testinfra) < 4 with python3.7dist(testinfra) >= 3.0.6)
python3.7dist(tree-format) >= 0.1.2
(python3.7dist(yamllint) < 2 with python3.7dist(yamllint) >= 1.15)

[gordon@vagabond:~/git/rpm]$ find /home/gordon/git/molecule-root/ | python3 ~/git/rpm/scripts/pythondistdeps.py -P
python3.7dist(molecule) == 3.0a5.dev15+gec8c85e9.d20191124

@ignatenkobrain
Copy link
Contributor

python3.7dist(molecule) == 3.0a5.dev15+gec8c85e9.d20191124

It would be very cool if we could actually mangle this to a proper RPM notation, but this is definitely outside of the scope of this PR.

@Conan-Kudo
Copy link
Member

@gordonmessmer You beat me to it. Thanks for this! 👍

@gordonmessmer
Copy link
Contributor Author

@Conan-Kudo Seems only right that I fix what I broke. :)

@ignatenkobrain ignatenkobrain merged commit 3f58fc3 into rpm-software-management:master Dec 20, 2019
@gordonmessmer
Copy link
Contributor Author

@ignatenkobrain I started a repo to flesh out some of the requirement conversions from python dist tools to rpm. It doesn't mangle versions right now, but maybe you could open an issue there and describe what should happen?

https://github.com/gordonmessmer/pyreq2rpm/

@hroncok
Copy link
Contributor

hroncok commented Jan 3, 2020

Given pip~=19.3, this would generate:

python3.8dist(pip) >= 19.3
with
python3.8dist(pip) < 20

However, #996 fixes that.

jollaitbot pushed a commit to sailfishos-mirror/python-rpm-generators that referenced this pull request Apr 14, 2020
 - Handle version ending with ".*"
 - Handle compatible-release operator "~="
 - Use rich deps for semantically versioned dependencies
 - Match Python version if minor has multiple digits (e.g. 3.10)
 - Only add setuptools requirement for egg-info packages

rpm-software-management/rpm#951
rpm-software-management/rpm#973
rpm-software-management/rpm#982

Fixes https://bugzilla.redhat.com/show_bug.cgi?id=1758141
Fixes https://bugzilla.redhat.com/show_bug.cgi?id=1777382
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants