1 |
%global pkgname repoze.sphinx.autointerface |
%global pkgname repoze.sphinx.autointerface |
2 |
%global srcname %(tr . - <<< %{pkgname}) |
%global srcname %(echo %{pkgname} | tr . -) |
3 |
|
|
4 |
Name: python-%{srcname} |
Name: python-%{srcname} |
5 |
Version: 0.8 |
Version: 0.8 |
6 |
Release: %mkrel 5 |
Release: %mkrel 6 |
7 |
Group: Development/Python |
Group: Development/Python |
8 |
Summary: Auto-generate Sphinx API docs from Zope interfaces |
Summary: Auto-generate Sphinx API docs from Zope interfaces |
9 |
|
|
10 |
License: BSD |
License: BSD |
11 |
URL: https://github.com/repoze/%{pkgname} |
URL: https://github.com/repoze/repoze.sphinx.autointerface |
12 |
Source0: https://github.com/repoze/%{pkgname}/archive/%{version}/%{pkgname}-%{version}.tar.gz |
Source0: https://github.com/repoze/%{pkgname}/archive/%{version}/%{pkgname}-%{version}.tar.gz |
13 |
BuildArch: noarch |
BuildArch: noarch |
14 |
|
|
|
BuildRequires: pkgconfig(python2) |
|
|
BuildRequires: python2dist(setuptools) |
|
|
BuildRequires: python2dist(sphinx) |
|
|
BuildRequires: python2dist(zope.interface) |
|
|
|
|
15 |
BuildRequires: pkgconfig(python3) |
BuildRequires: pkgconfig(python3) |
16 |
BuildRequires: python3dist(setuptools) |
BuildRequires: python3dist(setuptools) |
17 |
BuildRequires: python3dist(sphinx) |
BuildRequires: python3dist(sphinx) |
18 |
BuildRequires: python3dist(zope.interface) |
BuildRequires: python3dist(zope.interface) |
19 |
|
|
|
%{?python_provide:%python_provide python-%{srcname}} |
|
|
|
|
20 |
%global common_desc \ |
%global common_desc \ |
21 |
This package defines an extension for the Sphinx documentation system. \ |
This package defines an extension for the Sphinx documentation system. \ |
22 |
The extension allows generation of API documentation by introspection of \ |
The extension allows generation of API documentation by introspection of \ |
25 |
%description |
%description |
26 |
%{common_desc} |
%{common_desc} |
27 |
|
|
|
%package -n python2-%{srcname} |
|
|
Group: Development/Python |
|
|
Summary: Auto-generate Sphinx API docs from Zope interfaces |
|
|
Requires: python2dist(sphinx) |
|
|
Requires: python2dist(zope.interface) |
|
|
|
|
|
%{?python_provide:%python_provide python2-%{srcname}} |
|
|
|
|
|
%description -n python2-%{srcname} |
|
|
%{common_desc} |
|
|
|
|
28 |
%package -n python3-%{srcname} |
%package -n python3-%{srcname} |
29 |
Group: Development/Python |
Group: Development/Python |
30 |
Summary: Auto-generate Sphinx API docs from Zope interfaces |
Summary: Auto-generate Sphinx API docs from Zope interfaces |
37 |
%{common_desc} |
%{common_desc} |
38 |
|
|
39 |
%prep |
%prep |
40 |
%setup -q -c |
%setup -qn %{pkgname}-%{version} |
41 |
|
|
42 |
cp -a %{pkgname}-%{version} python3-%{pkgname}-%{version} |
# drop bundled egg-info |
43 |
|
rm -rf repoze.sphinx.autointerface.egg-info/ |
44 |
|
|
45 |
%build |
%build |
|
|
|
|
# Python 2 build |
|
|
pushd %{pkgname}-%{version} |
|
|
%py2_build |
|
|
python2 %{_bindir}/rst2html --no-datestamp CHANGES.rst CHANGES.html |
|
|
python2 %{_bindir}/rst2html --no-datestamp README.rst README.html |
|
|
popd |
|
|
|
|
|
# Python 3 build |
|
|
pushd python3-%{pkgname}-%{version} |
|
46 |
%py3_build |
%py3_build |
|
popd |
|
47 |
|
|
48 |
%install |
%install |
|
|
|
|
# Python 2 install |
|
|
pushd %{pkgname}-%{version} |
|
|
%py2_install |
|
|
popd |
|
|
|
|
|
# Python 3 install |
|
|
pushd python3-%{pkgname}-%{version} |
|
49 |
%py3_install |
%py3_install |
|
popd |
|
|
|
|
|
%files -n python2-%{srcname} |
|
|
%doc %{pkgname}-%{version}/CHANGES.html %{pkgname}-%{version}/CONTRIBUTORS.txt |
|
|
%doc %{pkgname}-%{version}/README.html |
|
|
%license %{pkgname}-%{version}/COPYRIGHT.txt %{pkgname}-%{version}/LICENSE.txt |
|
|
%{python2_sitelib}/* |
|
50 |
|
|
51 |
%files -n python3-%{srcname} |
%files -n python3-%{srcname} |
52 |
%doc %{pkgname}-%{version}/CHANGES.html %{pkgname}-%{version}/CONTRIBUTORS.txt |
%doc CHANGES.rst CONTRIBUTORS.txt README.rst |
53 |
%doc %{pkgname}-%{version}/README.html |
%license COPYRIGHT.txt LICENSE.txt |
|
%license %{pkgname}-%{version}/COPYRIGHT.txt %{pkgname}-%{version}/LICENSE.txt |
|
54 |
%{python3_sitelib}/* |
%{python3_sitelib}/* |
55 |
|
|