-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathpython-reno.spec
More file actions
155 lines (125 loc) · 3.78 KB
/
python-reno.spec
File metadata and controls
155 lines (125 loc) · 3.78 KB
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
%global pypi_name reno
%if 0%{?fedora}
%global with_python3 1
%endif
# Currently, we cannot generate reno docs from a tarball due to
# https://bugs.launchpad.net/reno/+bug/1520096
%global with_docs 0
# Only reason to choose 24 is that that's what was in development when we made
# the switch for this package. Fedora Policy was to have made this switch for
# Fedora 22.
%if 0%{?fedora} >= 24
%global default_python 3
%else
%global default_python 2
%endif
Name: python-%{pypi_name}
Version: XXX
Release: XXX
Summary: Release NOtes manager
License: ASL 2.0
URL: http://www.openstack.org/
Source0: https://pypi.python.org/packages/source/r/%{pypi_name}/%{pypi_name}-%{version}.tar.gz
BuildArch: noarch
%description
Reno is a release notes manager for storing
release notes in a git repository and then building documentation from them.
Managing release notes for a complex project over a long period
of time with many releases can be time consuming and error prone. Reno
helps automate the hard parts.
%package -n python2-%{pypi_name}
Summary: RElease NOtes manager
%{?python_provide:%python_provide python2-%{pypi_name}}
BuildRequires: python2-devel
BuildRequires: python-setuptools
BuildRequires: python-pbr
BuildRequires: python-babel
BuildRequires: python-sphinx
BuildRequires: python-oslo-sphinx
BuildRequires: PyYAML
BuildRequires: git
Requires: python-pbr
Requires: python-babel
Requires: PyYAML
Requires: git
%description -n python2-%{pypi_name}
Reno is a release notes manager for storing
release notes in a git repository and then building documentation from them.
Managing release notes for a complex project over a long period
of time with many releases can be time consuming and error prone. Reno
helps automate the hard parts.
%if 0%{?with_python3}
%package -n python3-%{pypi_name}
Summary: RElease NOtes manager
%{?python_provide:%python_provide python3-%{pypi_name}}
BuildRequires: python3-devel
BuildRequires: python3-setuptools
BuildRequires: python3-pbr
BuildRequires: python3-babel
BuildRequires: python3-sphinx
BuildRequires: python3-oslo-sphinx
BuildRequires: python3-PyYAML
BuildRequires: git
Requires: python3-pbr
Requires: python3-babel
Requires: python3-PyYAML
Requires: git
%description -n python3-%{pypi_name}
Reno is a release notes manager for storing
release notes in a gitnrepository and then building documentation from them.
Managing release notes for a complex project over a long period
of time with many releases can be time consuming and error prone. Reno
helps automate the hard parts.
%endif
%package -n python-%{pypi_name}-doc
Summary: reno documentation
%description -n python-%{pypi_name}-doc
Documentation for reno
%prep
%autosetup -n %{pypi_name}-%{upstream_version}
%build
%py2_build
%if 0%{?with_python3}
%py3_build
%endif
%install
%if 0%{?with_python3}
%py3_install
%if 0%{?default_python} >= 3
mv %{buildroot}%{_bindir}/%{pypi_name} ./%{pypi_name}.py3
%endif
%endif
%py2_install
%if 0%{?default_python} >= 3
mv %{pypi_name}.py3 %{buildroot}%{_bindir}/%{pypi_name}
%endif
%if 0%{?with_docs}
# generate html docs
sphinx-build doc/source html
# remove the sphinx-build leftovers
rm -rf html/.{doctrees,buildinfo}
%endif
%files -n python2-%{pypi_name}
%doc doc/source/readme.rst README.rst
%license LICENSE
%if 0%{?default_python} <= 2
%{_bindir}/%{pypi_name}
%endif
%{python2_sitelib}/%{pypi_name}
%{python2_sitelib}/%{pypi_name}-*.egg-info
%if 0%{?with_python3}
%files -n python3-%{pypi_name}
%doc doc/source/readme.rst README.rst
%license LICENSE
%if 0%{?default_python} >= 3
%{_bindir}/%{pypi_name}
%endif
%{python3_sitelib}/%{pypi_name}
%{python3_sitelib}/%{pypi_name}-*.egg-info
%endif
%files -n python-%{pypi_name}-doc
%if 0%{?with_docs}
%doc html
%endif
%license LICENSE
%changelog