diff options
author | CoprDistGit <infra@openeuler.org> | 2024-10-24 01:45:10 +0000 |
---|---|---|
committer | CoprDistGit <infra@openeuler.org> | 2024-10-24 01:45:10 +0000 |
commit | 0436ea5b193ef71299973a4ee8739c70589964d8 (patch) | |
tree | 6a996ce852cc8f6f57ded8b97ee1a279ec1a32ff | |
parent | 8baaf0fea2fb6bda8ff77272fbc3d4d8b0c014e3 (diff) |
automatic import of python-rpm-generators
-rw-r--r-- | python-rpm-generators.spec | 9 | ||||
-rw-r--r-- | pythonname.attr | 18 |
2 files changed, 23 insertions, 4 deletions
diff --git a/python-rpm-generators.spec b/python-rpm-generators.spec index fe699c2..94e645e 100644 --- a/python-rpm-generators.spec +++ b/python-rpm-generators.spec @@ -2,7 +2,7 @@ Name: python-rpm-generators Version: 14 -Release: 2 +Release: 1 Summary: Dependency generators for Python RPMs License: GPL-2.0-or-later AND LGPL-2.1-or-later AND (Public Domain OR LGPL-2.1-or-later OR GPL-2.0-or-later) @@ -10,11 +10,14 @@ URL: https://src.fedoraproject.org/rpms/python-rpm-generators Source0: https://raw.githubusercontent.com/rpm-software-management/rpm/102eab50b3d0d6546dfe082eac0ade21e6b3dbf1/COPYING Source1: python.attr Source2: pythondist.attr +# This was crafted in-place as a fork of python.attr, hence also GPL-2.0-or-later +Source3: pythonname.attr # This one is also originally from RPM, but it has its own license declaration: LGPL-2.1-or-later Source4: pythondistdeps.py # This was crafted in-place with the following license declaration: # Public-Domain OR CC0-1.0 OR LGPL-2.1-or-later OR GPL-2.0-or-later Source5: pythonbundles.py +Requires: python3dist(packaging) BuildArch: noarch @@ -43,13 +46,11 @@ install -Dpm0755 -t %{buildroot}%{_rpmconfigdir} *.py %license COPYING %{_fileattrsdir}/python.attr %{_fileattrsdir}/pythondist.attr +%{_fileattrsdir}/pythonname.attr %{_rpmconfigdir}/pythondistdeps.py %{_rpmconfigdir}/pythonbundles.py %changelog -* Wed Oct 23 2024 Funda Wang <fundawang@yeah.net> - 14-2 -- drop pythonname.attr as it requries fedora.srpm.python which is not available - * Sat Oct 19 2024 Funda Wang <fundawang@yeah.net> - 14-1 - update to latest upstream version diff --git a/pythonname.attr b/pythonname.attr new file mode 100644 index 0000000..bce0ac0 --- /dev/null +++ b/pythonname.attr @@ -0,0 +1,18 @@ +%__pythonname_provides() %{lua: + local python = require 'openEuler.srpm.python' + local name = rpm.expand('%{name}') + local evr = rpm.expand('%{?epoch:%{epoch}:}%{version}-%{release}') + local provides = python.python_altprovides_once(name, evr) + -- provides is either an array/table or nil + -- nil means the function was already called with the same arguments: + -- either with another file in %1 or manually via %py_provides + if provides then + for i, provide in ipairs(provides) do + print(provide .. ' ') + end + end +} + +%__pythonname_obsoletes() %{nil} + +%__pythonname_path ^/ |