]>
Commit | Line | Data |
---|---|---|
7e920f0f JB |
1 | # |
2 | # Conditional build: | |
3 | %bcond_without doc # HTML documentation build | |
595503c1 JK |
4 | %bcond_without python2 # CPython 2.x module |
5 | %bcond_without python3 # CPython 3.x module | |
7e920f0f JB |
6 | # |
7 | Summary: Sphinx extension to reference issues in issue trackers | |
8 | Summary(pl.UTF-8): Rozszerzenie Sphinksa do tworzenia odnośników do systemów śledzenia zgłoszeń | |
9 | Name: python-sphinxcontrib-issuetracker | |
4be26aef | 10 | Version: 0.11 |
595503c1 | 11 | Release: 4 |
7e920f0f JB |
12 | License: BSD |
13 | Group: Development/Languages/Python | |
14 | Source0: http://pypi.python.org/packages/source/s/sphinxcontrib-issuetracker/sphinxcontrib-issuetracker-%{version}.tar.gz | |
4be26aef | 15 | # Source0-md5: 69c2f0e5770c5d7bad73f60f8d764e28 |
650b8445 JR |
16 | Source1: http://docs.python.org/objects.inv?/python-objects.inv |
17 | # Source1-md5: 173c3f7fb1ad2162f1f194a5267700db | |
18 | Source2: http://sphinx.pocoo.org/objects.inv?/sphinx-objects.inv | |
19 | # Source2-md5: 5f30379fe116fbace2636d5284df8622 | |
b6e3b830 | 20 | Patch0: %{name}-offline.patch |
7e920f0f | 21 | URL: http://pypi.python.org/pypi/sphinxcontrib-issuetracker |
7e920f0f | 22 | BuildRequires: rpm-pythonprov |
5a1afafb | 23 | BuildRequires: rpmbuild(macros) >= 1.710 |
595503c1 JK |
24 | %if %{with python2} |
25 | BuildRequires: python-devel >= 1:2.6 | |
26 | Requires: python-requests >= 0.13 | |
7e920f0f JB |
27 | %if %{with doc} |
28 | BuildRequires: python-requests >= 0.13 | |
595503c1 JK |
29 | BuildRequires: sphinx-pdg-2 >= 1.1 |
30 | %endif | |
31 | %endif | |
32 | %if %{with python3} | |
33 | BuildRequires: python3-devel >= 1:3.3 | |
34 | Requires: python3-requests >= 0.13 | |
35 | %if %{with doc} | |
36 | BuildRequires: python3-requests >= 0.13 | |
37 | BuildRequires: sphinx-pdg-3 >= 1.1 | |
38 | %endif | |
7e920f0f | 39 | %endif |
7e920f0f JB |
40 | BuildArch: noarch |
41 | BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) | |
42 | ||
43 | %description | |
44 | A Sphinx extension to reference issues in issue trackers, either | |
45 | explicitly with an "issue" role or optionally implicitly by issue ids | |
46 | like "#10" in plaintext. | |
47 | ||
48 | %description -l pl.UTF-8 | |
49 | Rozszerzenie Sphinksa do umieszczania odnośników do systemów śledzenia | |
50 | zgłoszeń - wprost poprzez regułę "issue" lub opcjonalnie poprzez numer | |
51 | zgłoszenia zapisany tekstowo (np. "#10"). | |
52 | ||
595503c1 JK |
53 | %package -n python3-sphinxcontrib-issuetracker |
54 | Summary: Sphinx extension to reference issues in issue trackers | |
55 | Summary(pl.UTF-8): Rozszerzenie Sphinksa do tworzenia odnośników do systemów śledzenia zgłoszeń | |
56 | Group: Libraries/Python | |
57 | Requires: python3-modules | |
58 | ||
59 | %description -n python3-sphinxcontrib-issuetracker | |
60 | A Sphinx extension to reference issues in issue trackers, either | |
61 | explicitly with an "issue" role or optionally implicitly by issue ids | |
62 | like "#10" in plaintext. | |
63 | ||
64 | %description -n python3-sphinxcontrib-issuetracker -l pl.UTF-8 | |
65 | Rozszerzenie Sphinksa do umieszczania odnośników do systemów śledzenia | |
66 | zgłoszeń - wprost poprzez regułę "issue" lub opcjonalnie poprzez numer | |
67 | zgłoszenia zapisany tekstowo (np. "#10"). | |
68 | ||
7e920f0f JB |
69 | %prep |
70 | %setup -q -n sphinxcontrib-issuetracker-%{version} | |
b6e3b830 JB |
71 | %patch0 -p1 |
72 | ||
73 | cp -p %{SOURCE1} %{SOURCE2} doc | |
7e920f0f JB |
74 | |
75 | %build | |
595503c1 | 76 | %if %{with python2} |
672915b5 | 77 | %py_build |
7e920f0f JB |
78 | |
79 | %if %{with doc} | |
595503c1 JK |
80 | PYTHONPATH=$(pwd)/build-2/lib \ |
81 | %{__make} -C doc html SPHINXBUILD=sphinx-build-2 | |
82 | mv doc/_build doc/_build2 | |
83 | %endif | |
84 | %endif | |
85 | ||
86 | %if %{with python3} | |
87 | %py3_build | |
88 | ||
89 | %if %{with doc} | |
90 | PYTHONPATH=$(pwd)/build-3/lib \ | |
91 | %{__make} -C doc html SPHINXBUILD=sphinx-build-3 | |
92 | mv doc/_build doc/_build3 | |
93 | %endif | |
7e920f0f JB |
94 | %endif |
95 | ||
96 | %install | |
97 | rm -rf $RPM_BUILD_ROOT | |
7e920f0f | 98 | |
595503c1 JK |
99 | %if %{with python2} |
100 | %py_install | |
7e920f0f | 101 | %py_postclean |
595503c1 JK |
102 | %endif |
103 | ||
104 | %if %{with python3} | |
105 | %py3_install | |
106 | %endif | |
7e920f0f JB |
107 | |
108 | %clean | |
109 | rm -rf $RPM_BUILD_ROOT | |
110 | ||
595503c1 | 111 | %if %{with python2} |
7e920f0f JB |
112 | %files |
113 | %defattr(644,root,root,755) | |
595503c1 | 114 | %doc CHANGES.rst CREDITS LICENSE README.rst %{?with_doc:doc/_build3/html} |
7e920f0f JB |
115 | # top dir should belong to python-Sphinx? |
116 | %dir %{py_sitescriptdir}/sphinxcontrib | |
117 | %dir %{py_sitescriptdir}/sphinxcontrib/issuetracker | |
118 | %{py_sitescriptdir}/sphinxcontrib/issuetracker/*.py[co] | |
119 | %{py_sitescriptdir}/sphinxcontrib/issuetracker/issuetracker.css | |
120 | %{py_sitescriptdir}/sphinxcontrib_issuetracker-%{version}-py*.egg-info | |
121 | %{py_sitescriptdir}/sphinxcontrib_issuetracker-%{version}-py*-nspkg.pth | |
595503c1 JK |
122 | %endif |
123 | ||
124 | %if %{with python3} | |
125 | %files -n python3-sphinxcontrib-issuetracker | |
126 | %defattr(644,root,root,755) | |
127 | %doc CHANGES.rst CREDITS LICENSE README.rst %{?with_doc:doc/_build3/html} | |
128 | # top dir should belong to python-Sphinx? | |
129 | %dir %{py3_sitescriptdir}/sphinxcontrib | |
130 | %{py3_sitescriptdir}/sphinxcontrib/issuetracker | |
131 | %{py3_sitescriptdir}/sphinxcontrib_issuetracker-%{version}-py*.egg-info | |
132 | %{py3_sitescriptdir}/sphinxcontrib_issuetracker-%{version}-py*-nspkg.pth | |
133 | %endif |