-
Notifications
You must be signed in to change notification settings - Fork 6
/
openstack-example-tests.spec
79 lines (56 loc) · 1.75 KB
/
openstack-example-tests.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
%{!?upstream_version: %global upstream_version %{version}%{?milestone}}
%global pname example_tests
%global service example-tests
Name: openstack-%{service}
Version: XXX
Release: XXX
Summary: Example Test Framework
License: ASL 2.0
URL: http://launchpad.net/%{service}/
Source0: http://tarballs.openstack.org/%{service}/%{service}-master.tar.gz
BuildArch: noarch
BuildRequires: python2-devel
BuildRequires: python-pbr
BuildRequires: python-setuptools
BuildRequires: git
Requires: python-pbr
Requires: python-setuptools
# test dependencies requirements
BuildRequires: python-hacking
BuildRequires: python-mock
BuildRequires: python-coverage
%description
This project contains example test framework.
%package -n openstack-%{service}-doc
Summary: OpenStack example tests Documentation
BuildRequires: python-sphinx
Requires: %{name} = %{version}-%{release}
%description -n openstack-%{service}-doc
It contains the documentation of example package.
%prep
%setup -q -n %{service}-%{upstream_version}
# Let RPM handle the dependencies
rm -f test-requirements.txt requirements.txt
%build
%{__python2} setup.py build
# Build Documentation
%{__python2} setup.py build_sphinx
# remove the sphinx-build leftovers
rm -rf html/.{doctrees,buildinfo}
%install
%{__python2} setup.py install -O1 --skip-build --root %{buildroot}
install -d -m 755 %{buildroot}%{_sysconfdir}/
mv %{buildroot}/usr/etc/* %{buildroot}%{_sysconfdir}/
%check
%{__python2} setup.py test
%files
%doc README.rst
%license LICENSE
%{python2_sitelib}/%{pname}
%{python2_sitelib}/%{pname}-*.egg-info
%{_bindir}/<test binary>
%{_sysconfdir}/<config path>/*
%files -n openstack-%{example}-doc
%license LICENSE
%doc html
%changelog