blob: be91e352061690d336f82f177f513d0d2879b1c4 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
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
|