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