]> git.pld-linux.org Git - packages/pyp2rpm.git/blob - pyp2rpm.spec
45e2f6f9a8025c2be8026c89f48feeb6d2f94620
[packages/pyp2rpm.git] / pyp2rpm.spec
1 #
2 # Conditional build:
3 %bcond_without  tests   # do not perform "make test"
4
5 Summary:        Convert Python packages to RPM .spec files
6 Name:           pyp2rpm
7 Version:        1.0.1
8 Release:        1
9 License:        MIT
10 Group:          Applications
11 Source0:        http://pypi.python.org/packages/source/p/pyp2rpm/%{name}-%{version}.tar.gz
12 # Source0-md5:  1e9a514d8dab9782f699ded2eb268237
13 # to get tests:
14 # git clone git@bitbucket.org:bkabrda/pyp2rpm.git && cd pyp2rpm
15 # git checkout v1.0.1 && tar czf pyp2rpm-1.0.1-tests.tgz tests/
16 Source1:        %{name}-%{version}-tests.tgz
17 # Source1-md5:  d6ffe3cd0acb10af01c99a77e6bd51f3
18 Patch0:         default-savepath.patch
19 Patch1:         no-rpmdev-packager.patch
20 URL:            https://pypi.python.org/pypi/pyp2rpm
21 BuildRequires:  python-flexmock >= 0.9.3
22 BuildRequires:  python-pytest
23 BuildRequires:  python-setuptools
24 BuildRequires:  rpm-pythonprov
25 BuildRequires:  rpmbuild(macros) >= 1.219
26 Requires:       python-jinja2
27 Requires:       python-setuptools
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 # Remove bundled egg-info
44 rm -r %{name}.egg-info
45
46 %build
47 %{__python} setup.py build
48
49 %if %{with tests}
50 PYTHONPATH=$(pwd) py.test
51 %endif
52
53 %install
54 rm -rf $RPM_BUILD_ROOT
55 %{__python} setup.py install \
56         --skip-build \
57         --optimize=2 \
58         --root=$RPM_BUILD_ROOT
59
60 %py_postclean
61
62 %clean
63 rm -rf $RPM_BUILD_ROOT
64
65 %files
66 %defattr(644,root,root,755)
67 %doc README.rst LICENSE
68 %attr(755,root,root) %{_bindir}/pyp2rpm
69 %{py_sitescriptdir}/%{name}
70 %{py_sitescriptdir}/%{name}-%{version}-py*.egg-info
This page took 0.090112 seconds and 2 git commands to generate.