summaryrefslogtreecommitdiffstats
path: root/SPECS/python-sphinxcontrib-autoprogram.spec
blob: 933ae9209b1af4a5a6188d7b2280e3701cf4ef39 (plain)
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
%global pypi_name sphinxcontrib-autoprogram

Name:           python-%{pypi_name}
Version:        0.1.2
Release:        1%{?dist}
Summary:        Sphinx extension for documenting CLI programs

License:        BSD
URL:            https://bitbucket.org/birkenfeld/sphinx-contrib
Source0:        https://files.pythonhosted.org/packages/source/s/%{pypi_name}/%{pypi_name}-%{version}.tar.gz
Source1:        https://bitbucket.org/birkenfeld/sphinx-contrib/raw/1621e337bb236e17d9e3fe4e98976365c06cc5fb/LICENSE
BuildArch:      noarch

BuildRequires:  python-setuptools
BuildRequires:  python2-devel
BuildRequires:  python2-six
BuildRequires:  python2-sphinx

BuildRequires:  python3-setuptools
BuildRequires:  python3-devel
BuildRequires:  python3-six
BuildRequires:  python3-sphinx

%description
This extension provides an automated way to document CLI programs.
It scans ArgumentParser objects and then expands it into a set of
program and option directives.


%package -n     python2-%{pypi_name}
Summary:        %{summary}
%{?python_provide:%python_provide python2-%{pypi_name}}

Requires:       python-sphinx >= 1.2
Requires:       python-six
%description -n python2-%{pypi_name}
This extension provides an automated way to document CLI programs.
It scans ArgumentParser objects and then expands it into a set of
program and option directives.

%package -n     python3-%{pypi_name}
Summary:        %{summary}
%{?python_provide:%python_provide python%{python3_pkgversion}-%{pypi_name}}

Requires:       python3-sphinx >= 1.2
Requires:       python3-six
%description -n python3-%{pypi_name}
This extension provides an automated way to document CLI programs.
It scans ArgumentParser objects and then expands it into a set of
program and option directives.

%prep
%autosetup -n %{pypi_name}-%{version}
# Remove bundled egg-info
rm -rf %{pypi_name}.egg-info
cp %SOURCE1 .

%build
%py2_build
%py3_build

%install
# Must do the subpackages' install first because the scripts in /usr/bin are
# overwritten with every setup.py install.
%py3_install

%py2_install


%check
%{__python2} setup.py test
%{__python3} setup.py test

%files -n python2-%{pypi_name}
%doc README.rst
%license LICENSE
%{python2_sitelib}/sphinxcontrib
%{python2_sitelib}/sphinxcontrib_autoprogram-%{version}-py?.?-nspkg.pth
%{python2_sitelib}/sphinxcontrib_autoprogram-%{version}-py?.?.egg-info

%files -n python3-%{pypi_name}
%doc README.rst
%license LICENSE
%{python3_sitelib}/sphinxcontrib
%{python3_sitelib}/sphinxcontrib_autoprogram-%{version}-py?.?-nspkg.pth
%{python3_sitelib}/sphinxcontrib_autoprogram-%{version}-py?.?.egg-info

%changelog
* Fri Sep 09 2016 mh <mh+fedora@scrit.ch> - 0.1.2-1
- Initial package.