blob: db2d5ef46e59d00d63f6a8bfdaebaecaa2f1b6ea (
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
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
|
%global srcname slacker
%if 0%{?fedora}
%global with_python3 1
%endif
Name: python-%{srcname}
Version: 0.5.4
Release: 1%{?dist}
Summary: Slack API client
License: ASL 2.0
URL: http://pypi.python.org/pypi/%{srcname}/
Source0: http://pypi.python.org/packages/source/s/%{srcname}/%{srcname}-%{version}.tar.gz
Source1: %{name}-generate-tests-tarball.sh
# To get the tarball in Source2, ensure that the upstream version number is
# correct in the "generate tarball" script above, and then run the script.
Source2: %{srcname}-%{version}-tests.tar.xz
BuildArch: noarch
Requires: python-requests
BuildRequires: python2-devel
BuildRequires: python-setuptools
BuildRequires: pytest
BuildRequires: python-mock
BuildRequires: python-requests
%description
Slacker is a full-featured Python interface for the Slack API.
%if 0%{?with_python3}
%package -n python3-%{srcname}
Summary: Slack API client
Requires: python3-requests
BuildRequires: python3-devel
BuildRequires: python3-setuptools
BuildRequires: python3-pytest
BuildRequires: python3-mock
BuildRequires: python3-requests
%description -n python3-%{srcname}
Slacker is a full-featured Python interface for the Slack API.
%endif
%prep
%setup -q -n %{srcname}-%{version} -a 2
%if 0%{?with_python3}
rm -rf %{py3dir}
cp -a . %{py3dir}
%endif # with_python3
%build
%{__python2} setup.py build
%if 0%{?with_python3}
pushd %{py3dir}
%{__python3} setup.py build
popd
%endif
%install
%{__python2} setup.py install --skip-build --root %{buildroot}
%if 0%{?with_python3}
pushd %{py3dir}
%{__python3} setup.py install --skip-build --root %{buildroot}
popd
%endif
%check
export PYTHONPATH=$(pwd)
py.test-%{python_version} -v tests
%if 0%{?with_python3}
pushd %{py3dir}
py.test-%{python3_version} -v tests
popd
%endif # with_python3
%files
%doc README.rst
%{python2_sitelib}/%{srcname}/
%{python2_sitelib}/%{srcname}*.egg-info
%if 0%{?with_python3}
%files -n python3-%{srcname}
%doc README.rst
%{python3_sitelib}/%{srcname}/
%{python3_sitelib}/%{srcname}*.egg-info
%endif
%changelog
* Fri Jan 30 2015 Ken Dreyer <ktdreyer@ktdreyer.com> - 0.5.4-1
- initial package
|