Add a script to generate Python bundled provides

See https://src.fedoraproject.org/rpms/python-setuptools/pull-request/40

Strictly speaking, this is not an RPM generator, but:

 - it generates provides
 - it is tighly coupled with pythondistdeps.py

Usage:

 1. Run `$ /usr/lib/rpm/pythonbundles.py .../vendored.txt`

 2. Copy the output into the spec as a macro definition:

    %global bundled %{expand:
    Provides: bundled(python3dist(appdirs)) = 1.4.3
    Provides: bundled(python3dist(packaging)) = 16.8
    Provides: bundled(python3dist(pyparsing)) = 2.2.1
    Provides: bundled(python3dist(six)) = 1.15
    }

 3. Use the macro to expand the provides
 4. Verify the macro contents in %check:

    %check
    ...
    %{_rpmconfigdir}/pythonbundles.py src/_vendor/vendored.txt --compare-with '%{bundled}'
This commit is contained in:
Miro Hrončok 2020-06-26 12:57:41 +02:00
commit 48c0de39d9
10 changed files with 368 additions and 3 deletions

View file

@ -0,0 +1,24 @@
appdirs==1.4.3
CacheControl==0.12.6
colorama==0.4.3
contextlib2==0.6.0.post1
distlib==0.3.0
distro==1.5.0
html5lib==1.0.1
ipaddress==1.0.23 # Only needed on 2.6 and 2.7
msgpack==1.0.0
packaging==20.3
pep517==0.8.2
progress==1.5
pyparsing==2.4.7
requests==2.23.0
certifi==2020.04.05.1
chardet==3.0.4
idna==2.9
urllib3==1.25.8
resolvelib==0.3.0
retrying==1.3.3
setuptools==44.0.0
six==1.14.0
toml==0.10.0
webencodings==0.5.1

View file

@ -0,0 +1,24 @@
Provides: bundled(python3dist(appdirs)) = 1.4.3
Provides: bundled(python3dist(cachecontrol)) = 0.12.6
Provides: bundled(python3dist(certifi)) = 2020.4.5.1
Provides: bundled(python3dist(chardet)) = 3.0.4
Provides: bundled(python3dist(colorama)) = 0.4.3
Provides: bundled(python3dist(contextlib2)) = 0.6^post1
Provides: bundled(python3dist(distlib)) = 0.3
Provides: bundled(python3dist(distro)) = 1.5
Provides: bundled(python3dist(html5lib)) = 1.0.1
Provides: bundled(python3dist(idna)) = 2.9
Provides: bundled(python3dist(ipaddress)) = 1.0.23
Provides: bundled(python3dist(msgpack)) = 1
Provides: bundled(python3dist(packaging)) = 20.3
Provides: bundled(python3dist(pep517)) = 0.8.2
Provides: bundled(python3dist(progress)) = 1.5
Provides: bundled(python3dist(pyparsing)) = 2.4.7
Provides: bundled(python3dist(requests)) = 2.23
Provides: bundled(python3dist(resolvelib)) = 0.3
Provides: bundled(python3dist(retrying)) = 1.3.3
Provides: bundled(python3dist(setuptools)) = 44
Provides: bundled(python3dist(six)) = 1.14
Provides: bundled(python3dist(toml)) = 0.10
Provides: bundled(python3dist(urllib3)) = 1.25.8
Provides: bundled(python3dist(webencodings)) = 0.5.1

View file

@ -0,0 +1,59 @@
appdirs==1.4.4
backports.shutil_get_terminal_size==1.0.0
backports.weakref==1.0.post1
click==7.1.2
click-completion==0.5.2
click-didyoumean==0.0.3
colorama==0.4.3
delegator.py==0.1.1
pexpect==4.8.0
ptyprocess==0.6.0
python-dotenv==0.10.3
first==2.0.1
iso8601==0.1.12
jinja2==2.11.2
markupsafe==1.1.1
parse==1.15.0
pathlib2==2.3.5
scandir==1.10
pipdeptree==0.13.2
pipreqs==0.4.10
docopt==0.6.2
yarg==0.1.9
pythonfinder==1.2.4
requests==2.23.0
chardet==3.0.4
idna==2.9
urllib3==1.25.9
certifi==2020.4.5.1
requirementslib==1.5.11
attrs==19.3.0
distlib==0.3.0
packaging==20.3
pyparsing==2.4.7
plette==0.2.3
tomlkit==0.5.11
shellingham==1.3.2
six==1.14.0
semver==2.9.0
toml==0.10.1
cached-property==1.5.1
vistir==0.5.2
pip-shims==0.5.2
contextlib2==0.6.0.post1
funcsigs==1.0.2
enum34==1.1.10
# yaspin==0.15.0
yaspin==0.14.3
cerberus==1.3.2
resolvelib==0.3.0
backports.functools_lru_cache==1.6.1
pep517==0.8.2
zipp==0.6.0
importlib_metadata==1.6.0
importlib-resources==1.5.0
more-itertools==5.0.0
git+https://github.com/sarugaku/passa.git@master#egg=passa
orderedmultidict==1.0.1
dparse==0.5.0
python-dateutil==2.8.1

View file

@ -0,0 +1,58 @@
Provides: bundled(python3dist(appdirs)) = 1.4.4
Provides: bundled(python3dist(attrs)) = 19.3
Provides: bundled(python3dist(backports-functools-lru-cache)) = 1.6.1
Provides: bundled(python3dist(backports-shutil-get-terminal-size)) = 1
Provides: bundled(python3dist(backports-weakref)) = 1^post1
Provides: bundled(python3dist(cached-property)) = 1.5.1
Provides: bundled(python3dist(cerberus)) = 1.3.2
Provides: bundled(python3dist(certifi)) = 2020.4.5.1
Provides: bundled(python3dist(chardet)) = 3.0.4
Provides: bundled(python3dist(click)) = 7.1.2
Provides: bundled(python3dist(click-completion)) = 0.5.2
Provides: bundled(python3dist(click-didyoumean)) = 0.0.3
Provides: bundled(python3dist(colorama)) = 0.4.3
Provides: bundled(python3dist(contextlib2)) = 0.6^post1
Provides: bundled(python3dist(delegator-py)) = 0.1.1
Provides: bundled(python3dist(distlib)) = 0.3
Provides: bundled(python3dist(docopt)) = 0.6.2
Provides: bundled(python3dist(dparse)) = 0.5
Provides: bundled(python3dist(enum34)) = 1.1.10
Provides: bundled(python3dist(first)) = 2.0.1
Provides: bundled(python3dist(funcsigs)) = 1.0.2
Provides: bundled(python3dist(idna)) = 2.9
Provides: bundled(python3dist(importlib-metadata)) = 1.6
Provides: bundled(python3dist(importlib-resources)) = 1.5
Provides: bundled(python3dist(iso8601)) = 0.1.12
Provides: bundled(python3dist(jinja2)) = 2.11.2
Provides: bundled(python3dist(markupsafe)) = 1.1.1
Provides: bundled(python3dist(more-itertools)) = 5
Provides: bundled(python3dist(orderedmultidict)) = 1.0.1
Provides: bundled(python3dist(packaging)) = 20.3
Provides: bundled(python3dist(parse)) = 1.15
Provides: bundled(python3dist(passa))
Provides: bundled(python3dist(pathlib2)) = 2.3.5
Provides: bundled(python3dist(pep517)) = 0.8.2
Provides: bundled(python3dist(pexpect)) = 4.8
Provides: bundled(python3dist(pip-shims)) = 0.5.2
Provides: bundled(python3dist(pipdeptree)) = 0.13.2
Provides: bundled(python3dist(pipreqs)) = 0.4.10
Provides: bundled(python3dist(plette)) = 0.2.3
Provides: bundled(python3dist(ptyprocess)) = 0.6
Provides: bundled(python3dist(pyparsing)) = 2.4.7
Provides: bundled(python3dist(python-dateutil)) = 2.8.1
Provides: bundled(python3dist(python-dotenv)) = 0.10.3
Provides: bundled(python3dist(pythonfinder)) = 1.2.4
Provides: bundled(python3dist(requests)) = 2.23
Provides: bundled(python3dist(requirementslib)) = 1.5.11
Provides: bundled(python3dist(resolvelib)) = 0.3
Provides: bundled(python3dist(scandir)) = 1.10
Provides: bundled(python3dist(semver)) = 2.9
Provides: bundled(python3dist(shellingham)) = 1.3.2
Provides: bundled(python3dist(six)) = 1.14
Provides: bundled(python3dist(toml)) = 0.10.1
Provides: bundled(python3dist(tomlkit)) = 0.5.11
Provides: bundled(python3dist(urllib3)) = 1.25.9
Provides: bundled(python3dist(vistir)) = 0.5.2
Provides: bundled(python3dist(yarg)) = 0.1.9
Provides: bundled(python3dist(yaspin)) = 0.14.3
Provides: bundled(python3dist(zipp)) = 0.6

View file

@ -0,0 +1,4 @@
packaging==16.8
pyparsing==2.2.1
six==1.10.0
appdirs==1.4.3

View file

@ -0,0 +1,4 @@
Provides: bundled(python3dist(appdirs)) = 1.4.3
Provides: bundled(python3dist(packaging)) = 16.8
Provides: bundled(python3dist(pyparsing)) = 2.2.1
Provides: bundled(python3dist(six)) = 1.10