forked from openstack/python-glanceclient
-
Notifications
You must be signed in to change notification settings - Fork 0
/
python-glanceclient.spec
95 lines (65 loc) · 1.95 KB
/
python-glanceclient.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
%global enable_doc 0
%define mod_name glanceclient
%if ! (0%{?fedora} > 12 || 0%{?rhel} > 5)
%{!?python_sitelib: %global python_sitelib %(%{__python} -c "from distutils.sysconfig import get_python_lib; print(get_python_lib())")}
%endif
%global os_release essex
Name: python-glanceclient-%{os_release}
Version: 2012.1
Release: 1%{?dist}
Epoch: 1
Summary: OpenStack Glance Client
Group: Development/Languages
License: Apache 2.0
Vendor: Grid Dynamics Consulting Services, Inc.
URL: http://www.openstack.org
Source0: %{name}-%{version}.tar.gz
BuildRoot: %{_tmppath}/%{name}-%{version}
BuildArch: noarch
BuildRequires: python-setuptools
%if 0%{?enable_doc}
BuildRequires: python-sphinx make
%endif
Requires: python-httplib2
Requires: python-prettytable
Requires: python-argparse
Conflicts: python-glanceclient
%description
This is a client for the OpenStack Glance API. There is a Python API (the
glanceclient module), and a command-line script (glance).
%if 0%{?enable_doc}
%package doc
Summary: Documentation for %{name}
Group: Documentation
Requires: %{name} = %{epoch}:%{version}-%{release}
%description doc
Documentation for %{name}.
%endif
%prep
%setup -q
%build
%{__python} setup.py build
%install
rm -rf %{buildroot}
%{__python} setup.py install -O1 --skip-build --root %{buildroot}
%if 0%{?enable_doc}
make -C docs html PYTHONPATH=%{buildroot}%{python_sitelib}
%endif
# FIXME: remove it when `glance` will be removed from
# openstack-glance
rm -rf %{buildroot}/usr/bin
%clean
rm -rf %{buildroot}
%files
%defattr(-,root,root,-)
%doc README* LICENSE HACKING*
%{python_sitelib}/*
#%{_usr}/bin/*
%if 0%{?enable_doc}
%files doc
%defattr(-,root,root,-)
%doc docs/_build/html
%endif
%changelog
* Sun Jun 04 2012 Alessio Ababilov <[email protected]> - 2.7
- Initial release: spec created