-
Notifications
You must be signed in to change notification settings - Fork 16
/
gerrymander.spec.in
82 lines (61 loc) · 1.96 KB
/
gerrymander.spec.in
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
Summary: The gerrymander gerrit client tools
Name: gerrymander
Version: @PY_VERSION@
Release: 1%{?dist}
Source0: https://pypi.python.org/packages/source/g/%{name}/%{name}-%{version}.tar.gz
URL: https://pypi.python.org/pypi/gerrymander
License: ASL 2.0
Group: Development/Libraries
BuildArch: noarch
BuildRequires: python2-devel
BuildRequires: python-nose
BuildRequires: python3-nose
BuildRequires: python3-devel
Requires: python3-gerrymander
Requires: python-prettytable
%package -n python-gerrymander
Summary: The gerrymander gerrit python2 client
License: GPLv2+
Group: Development/Libraries
%package -n python3-gerrymander
Summary: The gerrymander gerrit python3 client
License: GPLv2+
Group: Development/Libraries
%description
The gerrymander package provides a set of command line tools
for interacting with Gerrit
%description -n python-gerrymander
The python2-gerrymander package provides a set of python2
modules for interacting with Gerrit.
%description -n python3-gerrymander
The python3-gerrymander package provides a set of python3
modules for interacting with Gerrit.
%prep
%setup -q
rm -rf %{py3dir}
cp -a . %{py3dir}
find %{py3dir} -name '*.py' | xargs sed -i '1s|^#!python|#!%{__python3}|'
# Remove any egg info (as of submitting this review, there's no bundled
# egg info)
rm -rf *.egg-info
%build
%{__python2} setup.py build
%{__python3} setup.py build
%install
%{__python2} setup.py install --skip-build --root=%{buildroot}
%{__python3} setup.py install --skip-build --root=%{buildroot}
%check
%{__python2} setup.py test
%{__python3} setup.py test
%files
%doc conf/gerrymander.conf-example
%{_bindir}/gerrymander
%files -n python-gerrymander
%doc README LICENSE
%{python2_sitelib}/gerrymander/
%{python2_sitelib}/%{name}-%{version}-py2.7.egg-info
%files -n python3-gerrymander
%doc README LICENSE
%{python3_sitelib}/gerrymander/
%{python3_sitelib}/%{name}-%{version}-py3.*.egg-info
%changelog