]>
Commit | Line | Data |
---|---|---|
20e72201 ER |
1 | # |
2 | # Conditional build: | |
d3776c9d | 3 | %bcond_with tests # do not perform "make test". requires network access, https://github.com/fedora-python/pyp2rpm/issues/57 |
20e72201 ER |
4 | |
5 | Summary: Convert Python packages to RPM .spec files | |
6 | Name: pyp2rpm | |
65b2716d | 7 | Version: 3.3.2 |
41978a25 | 8 | Release: 1 |
14705ca7 | 9 | License: MIT |
42073356 ER |
10 | Group: Development |
11 | Source0: https://github.com/fedora-python/pyp2rpm/archive/v%{version}/%{name}-%{version}.tar.gz | |
65b2716d | 12 | # Source0-md5: 32a6c74763c1b1d8ea6a260750bd0176 |
aa1c3d8d | 13 | Patch0: default-savepath.patch |
86badbed | 14 | Patch1: no-rpmdev-packager.patch |
71736564 | 15 | Patch2: default-distro.patch |
1588ee5b | 16 | URL: https://github.com/fedora-python/pyp2rpm |
65b2716d ER |
17 | BuildRequires: python3-flexmock >= 0.9.3 |
18 | BuildRequires: python3-setuptools | |
45c8ad12 | 19 | BuildRequires: python3-wheel |
20e72201 | 20 | BuildRequires: rpm-pythonprov |
1588ee5b | 21 | BuildRequires: rpmbuild(macros) >= 1.714 |
65b2716d ER |
22 | %if %{with tests} |
23 | BuildRequires: python3-click | |
24 | BuildRequires: python3-jinja2 | |
25 | BuildRequires: python3-pytest | |
26 | BuildRequires: python3-scripttest | |
27 | %endif | |
20e72201 ER |
28 | BuildArch: noarch |
29 | BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) | |
30 | ||
31 | %description | |
32 | Convert Python packages to RPM .spec. | |
33 | ||
34 | Users can provide their own templates for rendering the package | |
35 | metadata. Both the package source and metadata can be extracted from | |
36 | PyPI or from local filesystem (local file doesn't provide that much | |
37 | information though). | |
38 | ||
39 | %prep | |
c1f92037 | 40 | %setup -q |
aa1c3d8d | 41 | %patch0 -p1 |
86badbed | 42 | %patch1 -p1 |
71736564 | 43 | %patch2 -p1 |
1588ee5b | 44 | |
20e72201 | 45 | %build |
45c8ad12 | 46 | %py3_build |
20e72201 ER |
47 | |
48 | %if %{with tests} | |
65b2716d | 49 | PYTHONPATH=$(pwd) py.test-3 |
20e72201 ER |
50 | %endif |
51 | ||
52 | %install | |
53 | rm -rf $RPM_BUILD_ROOT | |
45c8ad12 | 54 | %py3_install |
20e72201 ER |
55 | |
56 | %clean | |
57 | rm -rf $RPM_BUILD_ROOT | |
58 | ||
59 | %files | |
60 | %defattr(644,root,root,755) | |
42073356 | 61 | %doc README.md LICENSE |
20e72201 | 62 | %attr(755,root,root) %{_bindir}/pyp2rpm |
45c8ad12 JR |
63 | %dir %{py3_sitescriptdir}/%{name} |
64 | %{py3_sitescriptdir}/%{name}/__pycache__ | |
65 | %{py3_sitescriptdir}/%{name}/*.py | |
66 | %{py3_sitescriptdir}/%{name}/command | |
67 | %dir %{py3_sitescriptdir}/%{name}/templates | |
68 | %{py3_sitescriptdir}/%{name}/templates/epel6.spec | |
69 | %{py3_sitescriptdir}/%{name}/templates/epel7.spec | |
70 | %{py3_sitescriptdir}/%{name}/templates/fedora.spec | |
71 | %{py3_sitescriptdir}/%{name}/templates/macros.spec | |
72 | %{py3_sitescriptdir}/%{name}/templates/mageia.spec | |
73 | %{py3_sitescriptdir}/%{name}/templates/pld.spec | |
74 | %{py3_sitescriptdir}/%{name}-%{version}-py*.egg-info |