forked from python-bugzilla/python-bugzilla
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathpython-bugzilla.spec
More file actions
95 lines (70 loc) · 2.15 KB
/
python-bugzilla.spec
File metadata and controls
95 lines (70 loc) · 2.15 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
%if 0%{?fedora} || 0%{?rhel} >= 8
%global with_python3 1
%else
%{!?__python2: %global __python2 /usr/bin/python2}
%{!?python2_sitelib2: %global python2_sitelib %(%{__python2} -c "from distutils.sysconfig import get_python_lib; print (get_python_lib())")}
%endif
Name: python-bugzilla
Version: 1.2.2
Release: 1%{?dist}
Summary: A python library and tool for interacting with Bugzilla
License: GPLv2+
URL: https://github.com/python-bugzilla/python-bugzilla
Source0: https://github.com/python-bugzilla/python-bugzilla/archive/v%{version}.tar.gz#/%{name}-%{version}.tar.gz
BuildArch: noarch
BuildRequires: python2-devel
BuildRequires: python-requests
BuildRequires: python-setuptools
%if 0%{?with_python3}
BuildRequires: python3-devel
BuildRequires: python3-requests
BuildRequires: python3-setuptools
%endif # if with_python3
Requires: python-requests
Requires: python-magic
%description
python-bugzilla is a python 2 library for interacting with bugzilla instances
over XML-RPC. This package also includes the 'bugzilla' command-line tool
for interacting with bugzilla from shell scripts.
%if 0%{?with_python3}
%package -n python3-bugzilla
Summary: A python 3 library for interacting with Bugzilla
Requires: python3-requests
Requires: python3-magic
%description -n python3-bugzilla
python3-bugzilla is a python 3 library for interacting with bugzilla instances
over XML-RPC.
%endif # if with_python3
%prep
%setup -q
%if 0%{?with_python3}
rm -rf %{py3dir}
cp -a . %{py3dir}
%endif # with_python3
%build
%if 0%{?with_python3}
pushd %{py3dir}
%{__python3} setup.py build
popd
%endif # with_python3
%{__python2} setup.py build
%install
%if 0%{?with_python3}
pushd %{py3dir}
%{__python3} setup.py install -O1 --skip-build --root %{buildroot}
rm %{buildroot}/usr/bin/bugzilla
popd
%endif # with_python3
%{__python2} setup.py install -O1 --skip-build --root %{buildroot}
%check
%{__python2} setup.py test
%files
%doc COPYING README.md
%{python2_sitelib}/*
%{_bindir}/bugzilla
%{_mandir}/man1/bugzilla.1.gz
%if 0%{?with_python3}
%files -n python3-bugzilla
%doc COPYING README.md
%{python3_sitelib}/*
%endif # with_python3