diff options
author | CoprDistGit <infra@openeuler.org> | 2023-07-09 07:10:39 +0000 |
---|---|---|
committer | CoprDistGit <infra@openeuler.org> | 2023-07-09 07:10:39 +0000 |
commit | c3b71cd0190ac161560ef8a2828ef73ffaa5056f (patch) | |
tree | f1ead9dabac6a486e9ea22cc6c1aaefe406c1e5b | |
parent | b0e529d9a17eaf6cc3ff98b78de743e401913baf (diff) |
automatic import of pyproject-rpm-macrosopeneuler23.03
-rw-r--r-- | .gitignore | 1 | ||||
-rw-r--r-- | pyproject-rpm-macros.spec | 89 | ||||
-rw-r--r-- | sources | 1 |
3 files changed, 91 insertions, 0 deletions
@@ -0,0 +1 @@ +/pyproject-rpm-macros-1.4.0.tar.gz diff --git a/pyproject-rpm-macros.spec b/pyproject-rpm-macros.spec new file mode 100644 index 0000000..be91e35 --- /dev/null +++ b/pyproject-rpm-macros.spec @@ -0,0 +1,89 @@ +Name: pyproject-rpm-macros +Summary: RPM macros for PEP 517 Python packages +License: MIT + +%bcond_without tests + +Version: 1.4.0 +Release: 1 + +Source0: %{name}-%{version}.tar.gz + + +URL: https://src.fedoraproject.org/rpms/pyproject-rpm-macros + +BuildArch: noarch + +%if %{with tests} +BuildRequires: python3dist(pytest) +BuildRequires: python3dist(pyyaml) +BuildRequires: python3dist(packaging) +BuildRequires: python3dist(pip) +BuildRequires: python3dist(setuptools) +BuildRequires: python3dist(wheel) +BuildRequires: (python3dist(toml) if python3-devel < 3.11) +%endif + +BuildRequires: python-rpm-macros +BuildRequires: python-srpm-macros +BuildRequires: python3-rpm-macros +Requires: python-rpm-macros +Requires: python-srpm-macros +Requires: python3-rpm-macros + +Requires: /usr/bin/find +Requires: /usr/bin/sed + +%description +These macros allow projects that follow the Python packaging specifications +to be packaged as RPMs. + +They work for: + +* traditional Setuptools-based projects that use the setup.py file, +* newer Setuptools-based projects that have a setup.cfg file, +* general Python projects that use the PEP 517 pyproject.toml file + (which allows using any build system, such as setuptools, flit or poetry). + +These macros replace %%py3_build and %%py3_install, +which only work with setup.py. + + +%prep +# Not strictly necessary but allows working on file names instead +# of source numbers in install section +%setup -q + +%build +# nothing to do, sources are not buildable + +%install +mkdir -p %{buildroot}%{_rpmmacrodir} +mkdir -p %{buildroot}%{_rpmconfigdir}/openEuler +install -pm 644 macros.pyproject %{buildroot}%{_rpmmacrodir}/ +install -pm 644 pyproject_buildrequires.py %{buildroot}%{_rpmconfigdir}/openEuler/ +install -pm 644 pyproject_convert.py %{buildroot}%{_rpmconfigdir}/openEuler/ +install -pm 644 pyproject_save_files.py %{buildroot}%{_rpmconfigdir}/openEuler/ +install -pm 644 pyproject_preprocess_record.py %{buildroot}%{_rpmconfigdir}/openEuler/ +install -pm 644 pyproject_construct_toxenv.py %{buildroot}%{_rpmconfigdir}/openEuler/ +install -pm 644 pyproject_requirements_txt.py %{buildroot}%{_rpmconfigdir}/openEuler/ +install -pm 644 pyproject_wheel.py %{buildroot}%{_rpmconfigdir}/openEuler/ + + + +%files +%{_rpmmacrodir}/macros.pyproject +%{_rpmconfigdir}/openEuler/pyproject_buildrequires.py +%{_rpmconfigdir}/openEuler/pyproject_convert.py +%{_rpmconfigdir}/openEuler/pyproject_save_files.py +%{_rpmconfigdir}/openEuler/pyproject_preprocess_record.py +%{_rpmconfigdir}/openEuler/pyproject_construct_toxenv.py +%{_rpmconfigdir}/openEuler/pyproject_requirements_txt.py +%{_rpmconfigdir}/openEuler/pyproject_wheel.py + +%doc README.md +%license LICENSE + +%changelog +* Tue Jan 03 2023 tanyulong <tanyulong@kylinos.cn> - 1.4.0-1 +- init package for openEuler @@ -0,0 +1 @@ +1890ddcd830cb0d3d121fa9c47d889d5 pyproject-rpm-macros-1.4.0.tar.gz |