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 - 1.4.0-1 - init package for openEuler