-
Notifications
You must be signed in to change notification settings - Fork 6
/
downstream-cherry-picker.spec
80 lines (65 loc) · 1.77 KB
/
downstream-cherry-picker.spec
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
%if 0%{?fedora}
%global with_python3 1
%global _docdir_fmt %{name}
%endif
Name: downstream-cherry-picker
Version: 1.2.0
Release: 1%{?dist}
Summary: A command line object dispatcher
Group: Development/Languages
License: MIT
URL: https://github.com/red-hat-storage/downstream-cherry-picker
Source0: %{name}-%{version}.tar.gz
BuildArch: noarch
%if 0%{?with_python3}
Requires: python3-requests
BuildRequires: python3-devel
BuildRequires: python3-pytest
BuildRequires: python3-requests
BuildRequires: python3-setuptools
%else # python 2
Requires: python-requests
BuildRequires: pytest
BuildRequires: python2-devel
BuildRequires: python-requests
BuildRequires: python-setuptools
%endif
%description
A tool to quickly cherry-pick whole GitHub pull requests that correspond to Red
Hat Bugzilla bugs.
This is tool is suitable for cherry-picking upstream patches into downstream
-patches branches for rdopkg to consume.
%prep
%setup -q -n %{name}-%{version}
%build
%if 0%{?with_python3}
%{__python3} setup.py build
%else
%{__python2} setup.py build
%endif # with_python3
%install
%if 0%{?with_python3}
%{__python3} setup.py install -O1 --skip-build --root $RPM_BUILD_ROOT
%else
%{__python2} setup.py install -O1 --skip-build --root $RPM_BUILD_ROOT
%endif
%check
export PYTHONPATH=$(pwd)
%if 0%{?with_python3}
py.test-%{python3_version} -v downstream_cherry_picker/tests
%else
py.test-%{python_version} -v downstream_cherry_picker/tests
%endif
%files
%{!?_licensedir:%global license %%doc}
%doc README.rst
%license LICENSE
%{_bindir}/%{name}
%if 0%{?with_python3}
%{python3_sitelib}/*
%else
%{python2_sitelib}/*
%endif # with_python3
%changelog
* Mon Aug 22 2016 Ken Dreyer <[email protected]> - 1.0.1-1
- Initial package