blob: 2b4683d494cde0a25abe82ed1fa9c42fed253dff (
plain)
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
|
%if 0%{?fedora}
%global with_python3 1
%endif
%define srcname beanbag
Name: python-beanbag
Version: 1.9.2
Release: 1%{?dist}
Summary: A helper module for accessing REST APIs
License: MIT
URL: https://github.com/ajtowns/beanbag
Source0: http://pypi.python.org/packages/source/b/%{srcname}/%{srcname}-%{version}.tar.gz
BuildArch: noarch
BuildRequires: pytest
BuildRequires: python2-devel
BuildRequires: python-requests
%if 0%{?with_python3}
BuildRequires: python3-devel
BuildRequires: python3-requests
BuildRequires: python3-pytest
%endif # with_python3
%description
BeanBag is a simple module that lets you access REST APIs in an easy way.
%package -n python2-%{srcname}
Summary: %{summary}
Requires: python-requests
%{?python_provide:%python_provide python2-%{srcname}}
%description -n python2-%{srcname}
BeanBag is a simple module that lets you access REST APIs in an easy way.
%if 0%{?with_python3}
%package -n python3-beanbag
Summary: %{summary}
Requires: python3
Requires: python3-requests
%description -n python3-beanbag
BeanBag is a simple module that lets you access REST APIs in an easy way.
%endif # with_python3
%prep
%autosetup -n %{srcname}-%{version}
%build
%{py2_build}
%if 0%{?with_python3}
%{py3_build}
%endif # with_python3
%install
%py2_install
%if 0%{?with_python3}
%py3_install
%endif # with_python3
%check
export PYTHONPATH=$(pwd)
py.test-%{python2_version} -v tests
%if 0%{?with_python3}
py.test-%{python3_version} -v tests
%endif # with_python3
%files -n python2-%{srcname}
%doc README.rst
%license LICENSE
%{python2_sitelib}/*
%if 0%{?with_python3}
%files -n python3-%{srcname}
%doc README.rst
%license LICENSE
%{python3_sitelib}/*
%endif # with_python3
%changelog
* Sat Dec 12 2015 Ken Dreyer <ktdreyer@ktdreyer.com> - 1.9.2-1
- Initial package
|