]> git.pld-linux.org Git - SPECS.git/blob - pyp2rpm.spec
SPECS updated Sat 31 Jul 20:26:02 CEST 2021
[SPECS.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:        2
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:  python3-wheel
20 BuildRequires:  rpm-pythonprov
21 BuildRequires:  rpmbuild(macros) >= 1.714
22 %if %{with tests}
23 BuildRequires:  python3-click
24 BuildRequires:  python3-jinja2
25 BuildRequires:  python3-pytest
26 BuildRequires:  python3-scripttest
27 %endif
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
40 %setup -q
41 %patch0 -p1
42 %patch1 -p1
43 %patch2 -p1
44
45 %build
46 %py3_build
47
48 %if %{with tests}
49 PYTHONPATH=$(pwd) py.test-3
50 %endif
51
52 %install
53 rm -rf $RPM_BUILD_ROOT
54 %py3_install
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 %{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
This page took 0.065808 seconds and 3 git commands to generate.