]> git.pld-linux.org Git - SPECS.git/blob - python-jenkins.spec
SPECS updated Wed 28 Jul 14:48:01 CEST 2021
[SPECS.git] / python-jenkins.spec
1 #
2 # Conditional build:
3 %bcond_without  doc             # don't build doc
4 %bcond_without  tests   # do not perform "make test"
5
6 %define         module  jenkins
7 Summary:        Python bindings for the remote Jenkins API
8 Name:           python-%{module}
9 Version:        0.2.1
10 Release:        2
11 License:        BSD
12 Group:          Development/Libraries
13 Source0:        https://launchpad.net/python-jenkins/0.2/%{version}/+download/%{name}-%{version}.tar.gz
14 # Source0-md5:  4e9ff3c2e6b0ae8da59a6c46080df898
15 URL:            http://launchpad.net/python-jenkins
16 BuildRequires:  rpm-pythonprov
17 BuildRequires:  rpmbuild(macros) >= 1.710
18 %if %{with tests}
19 BuildRequires:  python-mock
20 BuildRequires:  python-nose
21 %endif
22 %if %{with doc}
23 BuildRequires:  python-Sphinx
24 %endif
25 BuildArch:      noarch
26 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
27
28 %description
29 Python Jenkins is a library for the remote API of the Jenkins
30 continuous integration server. It is useful for creating and managing
31 jobs as well as build nodes.
32
33 %prep
34 %setup -q
35
36 # Remove env from __init__.py
37 sed -i '/^#!\%{_prefix}\/bin\/env python$/d' jenkins/__init__.py
38
39 %build
40 %py_build
41
42 %if %{with tests}
43 PYTHONPATH=. nosetests-%{py_ver} -w tests
44 %endif
45
46 %{__make} -C doc html man
47 rm -f doc/build/html/.buildinfo
48
49 %install
50 rm -rf $RPM_BUILD_ROOT
51 %py_install
52
53 %py_postclean
54
55 install -d $RPM_BUILD_ROOT%{_mandir}/man1
56 install -D doc/build/man/pythonjenkins.1 $RPM_BUILD_ROOT%{_mandir}/man1/pythonjenkins.1
57
58 %clean
59 rm -rf $RPM_BUILD_ROOT
60
61 %files
62 %defattr(644,root,root,755)
63 %doc COPYING doc/build/html
64 %dir %{py_sitescriptdir}/jenkins
65 %{py_sitescriptdir}/jenkins/*.py[co]
66 %{py_sitescriptdir}/python_jenkins-%{version}-py*.egg-info
67 # this should be .3?
68 %{_mandir}/man1/pythonjenkins.1*
This page took 0.338285 seconds and 3 git commands to generate.