From 6bd0dfb0a315b887499377bb5224890e2c12004f Mon Sep 17 00:00:00 2001
From: CoprDistGit <infra@openeuler.org>
Date: Mon, 17 Feb 2025 08:26:40 +0000
Subject: automatic import of pyproject-rpm-macros

---
 .gitignore                |  1 +
 pyproject-rpm-macros.spec | 89 +++++++++++++++++++++++++++++++++++++++++++++++
 sources                   |  1 +
 3 files changed, 91 insertions(+)
 create mode 100644 pyproject-rpm-macros.spec
 create mode 100644 sources

diff --git a/.gitignore b/.gitignore
index e69de29..100b2f8 100644
--- a/.gitignore
+++ b/.gitignore
@@ -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
diff --git a/sources b/sources
new file mode 100644
index 0000000..129b6a0
--- /dev/null
+++ b/sources
@@ -0,0 +1 @@
+1890ddcd830cb0d3d121fa9c47d889d5  pyproject-rpm-macros-1.4.0.tar.gz
-- 
cgit v1.2.3