This repository was archived by the owner on May 30, 2022. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 10
/
Copy pathpython-krbcontext.spec
174 lines (135 loc) · 5.01 KB
/
python-krbcontext.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
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
%global src_name krbcontext
Summary: A Kerberos context manager
Name: python-%{src_name}
Version: 0.8
Release: 2%{?dist}
Source0: https://files.pythonhosted.org/packages/source/k/%{src_name}/%{src_name}-%{version}.tar.gz
License: GPLv3
Url: https://github.com/krbcontext/python-krbcontext
BuildArch: noarch
%description
krbcontext provides a Kerberos context that you can put code inside, which
requires a valid ticket in credential cache.
krbcontext is able to initialize credential cache automatically on behalf
of you according to the options you specify. It can initialize with keytab or a
regular user's Kerberos name and password.
You can use krbcontext as a context manager with with statement, or
call API directly to check credential cache and even initialize by yourself.
# Build Python 2 package for Fedora and only for RHEL7
%package -n python2-%{src_name}
Summary: A Kerberos context manager
%if 0%{?rhel}
BuildRequires: python-devel
BuildRequires: python-setuptools
# For running test
BuildRequires: pytest
# BuildRequires: python2-pytest-cov
%else
BuildRequires: python2-devel
BuildRequires: python2-setuptools
# For running test
BuildRequires: python2-pytest
# BuildRequires: python-pytest-cov
%endif
BuildRequires: python-gssapi
BuildRequires: python2-mock
Requires: python-gssapi
%{?python_provide:%python_provide python2-%{src_name}}
%description -n python2-%{src_name}
krbcontext provides a Kerberos context that you can put code inside, which
requires a valid ticket in credential cache.
krbcontext is able to initialize credential cache automatically on behalf
of you according to the options you specify. It can initialize with keytab or a
regular user's Kerberos name and password.
You can use krbcontext as a context manager with with statement, or
call API directly to check credential cache and even initialize by yourself.
# Only build Python 3 package for Fedora
%if 0%{?fedora}
%package -n python3-%{src_name}
Summary: A Kerberos context manager
BuildRequires: python3-setuptools
BuildRequires: python3-devel
BuildRequires: python3-gssapi
# For running test
BuildRequires: python3-mock
BuildRequires: python3-pytest
#BuildRequires: python3-pytest-cov
Requires: python3-gssapi
%{?python_provide:%python_provide python%{python3_pkgversion}-%{src_name}}
%description -n python3-%{src_name}
krbcontext provides a Kerberos context that you can put code inside, which
requires a valid ticket in credential cache.
krbcontext is able to initialize credential cache automatically on behalf
of you according to the options you specify. It can initialize with keytab or a
regular user's Kerberos name and password.
You can use krbcontext as a context manager with with statement, or
call API directly to check credential cache and even initialize by yourself.
%endif
# end of Python 3 package
%prep
%setup -q -n %{src_name}-%{version}
%build
%py2_build
%if 0%{?fedora}
%py3_build
%endif
%install
%py2_install
%if 0%{?fedora}
%py3_install
%endif
%check
PYTHONPATH=. py.test-%{python2_version} test/
%if 0%{?fedora}
PYTHONPATH=. py.test-%{python3_version} test/
%endif
%files -n python2-%{src_name}
%doc README.rst CHANGELOG.rst docs/
%license LICENSE
%{python2_sitelib}/krbcontext/
%{python2_sitelib}/krbcontext-%{version}-*.egg-info
%if 0%{?fedora}
%files -n python3-%{src_name}
%doc README.rst CHANGELOG.rst docs/
%license LICENSE
%{python3_sitelib}/krbcontext/
%{python3_sitelib}/krbcontext-%{version}-*.egg-info
%endif
%changelog
* Thu Sep 07 2017 Chenxiong Qi <[email protected]> - 0.8-2
- Remove flake8 from BuildRequires
* Tue Sep 05 2017 Chenxiong Qi <[email protected]> - 0.8-1
- Fix SPEC (Chenxiong Qi)
- Use __future__.absolute_import (Chenxiong Qi)
- Fix and enhance maintanence scripts (Chenxiong Qi)
* Wed Aug 30 2017 Chenxiong Qi <[email protected]> - 0.7-1
- Remove unused meta info (Chenxiong Qi)
- Fix init_with_keytab and tests (Chenxiong Qi)
- Add script for publishing packages (Chenxiong Qi)
- Refine make release script (Chenxiong Qi)
* Sun Aug 27 2017 Chenxiong Qi <[email protected]> - 0.6-1
- Fix reading package info (Chenxiong Qi)
* Sat Aug 26 2017 Chenxiong Qi <[email protected]> - 0.5-1
- Add script for making release (Chenxiong Qi)
- Add distcheck to Makefile (Chenxiong Qi)
- Refine doc settings (Chenxiong Qi)
- Easy to set project info (Chenxiong Qi)
- Bump version to 4.0 in doc (Chenxiong Qi)
* Sat Aug 26 2017 Chenxiong Qi <[email protected]> - 0.4-1
- Migrate to python-gssapi
- Compatible with Python 3
* Thu Mar 13 2014 Chenxiong Qi <[email protected]> - 0.3.3-1
- Change README.txt to README.rst
- Fix: logic error of KRB5CCNAME maintenance during initialization
- Fix testcase of getting default credential cache
* Fri Jan 18 2013 Chenxiong Qi <[email protected]> - 0.3.1-1
- Thread-safe credentials cache initialization
* Thu Jan 10 2013 Chenxiong Qi <[email protected]> - 0.3.0-1
- Lazy initialization of credential cache.
- Refactor all code
- Rewrite all unittest
- Improve SPEC
- Improve configuration of Python package distribution
- Update documentation
* Mon Jul 30 2012 Chenxiong Qi <[email protected]> - 0.2-1
- Initial package