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:
parent
e78c420523
commit
48c0de39d9
10 changed files with 368 additions and 3 deletions
|
|
@ -12,6 +12,7 @@ Source1: python.attr
|
|||
Source2: pythondist.attr
|
||||
Source3: pythonname.attr
|
||||
Source4: pythondistdeps.py
|
||||
Source5: pythonbundles.py
|
||||
|
||||
BuildArch: noarch
|
||||
|
||||
|
|
@ -35,7 +36,7 @@ cp -a %{sources} .
|
|||
|
||||
%install
|
||||
install -Dpm0644 -t %{buildroot}%{_fileattrsdir} *.attr
|
||||
install -Dpm0755 -t %{buildroot}%{_rpmconfigdir} pythondistdeps.py
|
||||
install -Dpm0755 -t %{buildroot}%{_rpmconfigdir} *.py
|
||||
|
||||
%files -n python3-rpm-generators
|
||||
%license COPYING
|
||||
|
|
@ -43,10 +44,12 @@ install -Dpm0755 -t %{buildroot}%{_rpmconfigdir} pythondistdeps.py
|
|||
%{_fileattrsdir}/pythondist.attr
|
||||
%{_fileattrsdir}/pythonname.attr
|
||||
%{_rpmconfigdir}/pythondistdeps.py
|
||||
%{_rpmconfigdir}/pythonbundles.py
|
||||
|
||||
%changelog
|
||||
* Wed Jun 17 2020 Miro Hrončok <mhroncok@redhat.com> - 11-8
|
||||
* Fri Jun 26 2020 Miro Hrončok <mhroncok@redhat.com> - 11-8
|
||||
- Fix python(abi) requires generator, it picked files from almost good directories
|
||||
- Add a script to generate Python bundled provides
|
||||
|
||||
* Thu May 21 2020 Miro Hrončok <mhroncok@redhat.com> - 11-7
|
||||
- Use PEP 503 names for requires
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue