/
python-keystone-tests-tempest.spec
136 lines (109 loc) · 3.34 KB
/
python-keystone-tests-tempest.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
%global service keystone
%global plugin keystone-tempest-plugin
%global module keystone_tempest_plugin
%global with_doc 1
%{!?upstream_version: %global upstream_version %{commit}}
%global commit fe269f266f5cacf484cb43ca3d5599a37507e932
%global shortcommit %(c=%{commit}; echo ${c:0:7})
# DO NOT REMOVE ALPHATAG
%global alphatag .%{shortcommit}git
%{?dlrn: %global tarsources %module}
%{!?dlrn: %global tarsources %plugin}
%if 0%{?fedora}
%global with_python3 1
%endif
%global common_desc \
This package contains Tempest plugin for functional testing of keystone \
LDAP and federation features. Additionally it provides a plugin to \
automatically load these tests into Tempest.
Name: python-%{service}-tests-tempest
Version: 0.0.1
Release: 0.1%{?alphatag}%{?dist}
Summary: Tempest plugin for the keystone project.
License: ASL 2.0
URL: https://git.openstack.org/cgit/openstack/%{plugin}/
Source0: https://github.com/openstack/%{plugin}/archive/%{commit}.tar.gz#/%{plugin}-%{shortcommit}.tar.gz
BuildArch: noarch
%description
%{common_desc}
%package -n python2-%{service}-tests-tempest
Summary: %{summary}
%{?python_provide:%python_provide python2-%{service}-tests-tempest}
BuildRequires: python2-devel
BuildRequires: python-pbr
BuildRequires: python-setuptools
BuildRequires: git
BuildRequires: openstack-macros
Requires: python-tempest >= 1:12.2.0
Requires: python-lxml
Requires: python-oslo-config >= 2:3.22.0
Requires: python-six
Requires: python-testtools
Requires: python-requests
%description -n python2-%{service}-tests-tempest
%{common_desc}
%if 0%{?with_doc}
%package -n python-%{service}-tests-tempest-doc
Summary: python-%{service}-tests-tempest documentation
BuildRequires: python-sphinx
BuildRequires: python-oslo-sphinx
%description -n python-%{service}-tests-tempest-doc
It contains the documentation for the Keystone tempest tests.
%endif
%if 0%{?with_python3}
%package -n python3-%{service}-tests-tempest
Summary: %{summary}
%{?python_provide:%python_provide python3-%{service}-tests-tempest}
BuildRequires: python3-devel
BuildRequires: python3-pbr
BuildRequires: python3-setuptools
Requires: python3-tempest >= 1:12.2.0
Requires: python3-lxml
Requires: python3-six
Requires: python3-testtools
Requires: python3-requests
%description -n python3-%{service}-tests-tempest
%{common_desc}
%endif
%prep
%autosetup -n %{tarsources}-%{upstream_version} -S git
# Let's handle dependencies ourseleves
%py_req_cleanup
# Remove bundled egg-ingo
rm -rf %{module}.egg-info
%build
%if 0%{?with_python3}
%py3_build
%endif
%py2_build
# Generate Docs
%if 0%{?with_doc}
%{__python2} setup.py build_sphinx
# remove the sphinx build leftovers
rm -rf doc/build/html/.{doctrees,buildinfo}
%endif
%install
%if 0%{?with_python3}
%py3_install
%endif
%py2_install
%files -n python2-%{service}-tests-tempest
%license LICENSE
%doc README.rst
%{python2_sitelib}/%{module}
%{python2_sitelib}/*.egg-info
%if 0%{?with_python3}
%files -n python3-%{service}-tests-tempest
%license LICENSE
%doc README.rst
%{python3_sitelib}/%{module}
%{python3_sitelib}/*.egg-info
%endif
%if 0%{?with_doc}
%files -n python-%{service}-tests-tempest-doc
%doc doc/build/html
%license LICENSE
%endif
%changelog
* Thu Aug 24 2017 Alfredo Moralejo <amoralej@redhat.com> 0.0.1-0.1.fe269f2git
- Update to pre-release 0.0.1 (fe269f266f5cacf484cb43ca3d5599a37507e932)