]> git.pld-linux.org Git - packages/docutils.git/blob - docutils.spec
- BR: setuptools, unify pypi Source URL
[packages/docutils.git] / docutils.spec
1 #
2 # Conditional build:
3 %bcond_without  python2 # CPython 2.x version
4 %bcond_without  python3 # CPython 3.x version
5 %bcond_without  tests   # unit tests
6
7 Summary:        Documentation Utilities
8 Summary(pl.UTF-8):      Narzędzia do tworzenia dokumentacji
9 Name:           docutils
10 Version:        0.15.2
11 Release:        1
12 License:        Public Domain, BSD, GPL v3 (see COPYING.txt)
13 Group:          Development/Tools
14 # original URL, but only with major releases: http://downloads.sourceforge.net/docutils/%{name}-%{version}.tar.gz
15 #Source0Download: https://pypi.org/simple/docutils/
16 Source0:        https://files.pythonhosted.org/packages/source/d/docutils/%{name}-%{version}.tar.gz
17 # Source0-md5:  e26a308d8000b0bed7416a633217c676
18 URL:            http://docutils.sourceforge.net/
19 %if %{with python2}
20 BuildRequires:  python-devel >= 1:2.6
21 BuildRequires:  python-setuptools
22 %endif
23 %if %{with python3}
24 BuildRequires:  python3-2to3 >= 1:3.4
25 BuildRequires:  python3-devel >= 1:3.4
26 BuildRequires:  python3-setuptools
27 %endif
28 BuildRequires:  rpm-pythonprov
29 BuildRequires:  rpmbuild(macros) >= 1.714
30 Requires:       python-%{name} = %{version}-%{release}
31 BuildArch:      noarch
32 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
33
34 %description
35 Utilities for general- and special-purpose documentation, including
36 autodocumentation of Python modules. Includes reStructuredText, the
37 easy to read, easy to use, what-you-see-is-what-you-get plaintext
38 markup language.
39
40 %description -l pl.UTF-8
41 Narzędzia do dokumentowania ogólnego i specjalnego zastosowania, w tym
42 autodokumentacji modułów Pythona. Zawierają reStructuredText - łatwy
43 do odczytania, łatwy w użyciu język opisu tekstu typu WYSIWYG.
44
45 %package -n python-%{name}
46 Summary:        Text documents processing modules for Python 2.x
47 Summary(pl.UTF-8):      Moduły Pythona 2.x do przetwarzania dokumentów tekstowych
48 Group:          Development/Languages/Python
49 %pyrequires_eq  python-libs
50
51 %description -n python-%{name}
52 Docutils are utilities for general- and special-purpose documentation,
53 including autodocumentation of Python modules. Includes
54 reStructuredText, the easy to read, easy to use,
55 what-you-see-is-what-you-get plaintext markup language.
56
57 This package provides the Docutils modules for Python 2.
58
59 %description -n python-%{name} -l pl.UTF-8
60 Narzędzia do dokumentowania ogólnego i specjalnego zastosowania, w tym
61 autodokumentacji modułów Pythona. Zawierają reStructuredText - łatwy
62 do odczytania, łatwy w użyciu język opisu tekstu typu WYSIWYG.
63
64 Ten pakiet dostarcza moduły Docutils dla Pythona 2.
65
66 %package 3
67 Summary:        Documentation Utilities for Python 3.x
68 Summary(pl.UTF-8):      Narzędzia do tworzenia dokumentacji dla Pythona 3.x
69 Group:          Development/Tools
70 Requires:       python3-%{name} = %{version}-%{release}
71
72 %description 3
73 Utilities for general- and special-purpose documentation, including
74 autodocumentation of Python modules. Includes reStructuredText, the
75 easy to read, easy to use, what-you-see-is-what-you-get plaintext
76 markup language.
77
78 This package provides the Docutils for Python 3.
79
80 %description 3 -l pl.UTF-8
81 Narzędzia do dokumentowania ogólnego i specjalnego zastosowania, w tym
82 autodokumentacji modułów Pythona. Zawierają reStructuredText - łatwy
83 do odczytania, łatwy w użyciu język opisu tekstu typu WYSIWYG.
84
85 Ten pakiet zawiera Docutils dla Pythona 3.
86
87 %package -n python3-%{name}
88 Summary:        Text documents processing modules for Python 3.x
89 Summary(pl.UTF-8):      Moduły Pythona 3.x do przetwarzania dokumentów tekstowych
90 Group:          Development/Languages/Python
91
92 %description -n python3-%{name}
93 Docutils are utilities for general- and special-purpose documentation,
94 including autodocumentation of Python modules. Includes
95 reStructuredText, the easy to read, easy to use,
96 what-you-see-is-what-you-get plaintext markup language.
97
98 This package provides the Docutils modules for Python 3.
99
100 %description -n python3-%{name} -l pl.UTF-8
101 Narzędzia do dokumentowania ogólnego i specjalnego zastosowania, w tym
102 autodokumentacji modułów Pythona. Zawierają reStructuredText - łatwy
103 do odczytania, łatwy w użyciu język opisu tekstu typu WYSIWYG.
104
105 Ten pakiet dostarcza moduły Docutils dla Pythona 3.
106
107 %prep
108 %setup -q
109
110 %build
111 %if %{with python2}
112 %{__python} setup.py config build -b build-2
113
114 %if %{with tests}
115 PYTHONPATH=$(pwd)/build-2/lib \
116 %{__python} test/alltests.py
117 %endif
118 %endif
119
120 %if %{with python3}
121 %{__python3} setup.py config build -b build-3
122
123 %if %{with tests}
124 PYTHONPATH=$(pwd)/build-3/lib \
125 %{__python3} test3/alltests.py
126 %endif
127 %endif
128
129 %install
130 rm -rf $RPM_BUILD_ROOT
131
132 %if %{with python2}
133 %py_install
134
135 for f in $RPM_BUILD_ROOT%{_bindir}/*.py ; do
136         %{__mv} "${f}" "${f%.py}"
137 done
138
139 %py_postclean
140 %endif
141
142 %if %{with python3}
143 %py3_install
144
145 for f in $RPM_BUILD_ROOT%{_bindir}/*.py ; do
146         %{__mv} "${f}" "${f%.py}-3"
147 done
148 %endif
149
150 %clean
151 rm -rf $RPM_BUILD_ROOT
152
153 %if %{with python2}
154 %files
155 %defattr(644,root,root,755)
156 %attr(755,root,root) %{_bindir}/rst2html
157 %attr(755,root,root) %{_bindir}/rst2html4
158 %attr(755,root,root) %{_bindir}/rst2html5
159 %attr(755,root,root) %{_bindir}/rst2latex
160 %attr(755,root,root) %{_bindir}/rst2man
161 %attr(755,root,root) %{_bindir}/rst2odt
162 %attr(755,root,root) %{_bindir}/rst2odt_prepstyles
163 %attr(755,root,root) %{_bindir}/rst2pseudoxml
164 %attr(755,root,root) %{_bindir}/rst2s5
165 %attr(755,root,root) %{_bindir}/rst2xetex
166 %attr(755,root,root) %{_bindir}/rst2xml
167 %attr(755,root,root) %{_bindir}/rstpep2html
168
169 %files -n python-%{name}
170 %defattr(644,root,root,755)
171 %doc BUGS.txt COPYING.txt README.txt RELEASE-NOTES.txt THANKS.txt docs
172 %{py_sitescriptdir}/docutils
173 %{py_sitescriptdir}/docutils-%{version}-py*.egg-info
174 %endif
175
176 %if %{with python3}
177 %files 3
178 %defattr(644,root,root,755)
179 %attr(755,root,root) %{_bindir}/rst*-3
180
181 %files -n python3-%{name}
182 %defattr(644,root,root,755)
183 %doc BUGS.txt COPYING.txt README.txt RELEASE-NOTES.txt THANKS.txt docs
184 %{py3_sitescriptdir}/docutils
185 %{py3_sitescriptdir}/docutils-%{version}-py*.egg-info
186 %endif
This page took 0.037088 seconds and 3 git commands to generate.