]>
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 | |
58e10a6d | 7 | Version: 3.3.0 |
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 | |
58e10a6d | 12 | # Source0-md5: 9c744bc722f554cb22f63e1fd2b1a187 |
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 |
20e72201 | 17 | BuildRequires: python-flexmock >= 0.9.3 |
20e72201 ER |
18 | BuildRequires: python-pytest |
19 | BuildRequires: python-setuptools | |
20 | BuildRequires: rpm-pythonprov | |
1588ee5b | 21 | BuildRequires: rpmbuild(macros) >= 1.714 |
20e72201 ER |
22 | BuildArch: noarch |
23 | BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) | |
24 | ||
25 | %description | |
26 | Convert Python packages to RPM .spec. | |
27 | ||
28 | Users can provide their own templates for rendering the package | |
29 | metadata. Both the package source and metadata can be extracted from | |
30 | PyPI or from local filesystem (local file doesn't provide that much | |
31 | information though). | |
32 | ||
33 | %prep | |
c1f92037 | 34 | %setup -q |
aa1c3d8d | 35 | %patch0 -p1 |
86badbed | 36 | %patch1 -p1 |
71736564 | 37 | %patch2 -p1 |
1588ee5b | 38 | |
20e72201 | 39 | %build |
1588ee5b | 40 | %py_build |
20e72201 ER |
41 | |
42 | %if %{with tests} | |
43 | PYTHONPATH=$(pwd) py.test | |
44 | %endif | |
45 | ||
46 | %install | |
47 | rm -rf $RPM_BUILD_ROOT | |
1588ee5b | 48 | %py_install |
20e72201 ER |
49 | %py_postclean |
50 | ||
51 | %clean | |
52 | rm -rf $RPM_BUILD_ROOT | |
53 | ||
54 | %files | |
55 | %defattr(644,root,root,755) | |
42073356 | 56 | %doc README.md LICENSE |
20e72201 | 57 | %attr(755,root,root) %{_bindir}/pyp2rpm |
41a9b90b ER |
58 | %dir %{py_sitescriptdir}/%{name} |
59 | %{py_sitescriptdir}/%{name}/*.py[co] | |
58e10a6d | 60 | %{py_sitescriptdir}/%{name}/command |
41a9b90b | 61 | %dir %{py_sitescriptdir}/%{name}/templates |
037f2468 ER |
62 | %{py_sitescriptdir}/%{name}/templates/epel6.spec |
63 | %{py_sitescriptdir}/%{name}/templates/epel7.spec | |
41a9b90b | 64 | %{py_sitescriptdir}/%{name}/templates/fedora.spec |
1588ee5b | 65 | %{py_sitescriptdir}/%{name}/templates/macros.spec |
41a9b90b ER |
66 | %{py_sitescriptdir}/%{name}/templates/mageia.spec |
67 | %{py_sitescriptdir}/%{name}/templates/pld.spec | |
20e72201 | 68 | %{py_sitescriptdir}/%{name}-%{version}-py*.egg-info |