3 %bcond_without doc # Sphinx documentation
4 %bcond_without tests # unit tests
5 %bcond_without python2 # CPython 2.x module
6 %bcond_without python3 # CPython 3.x module
9 Summary(pl.UTF-8): Parser Pythona
11 # keep 0.7.x here for python2 support
15 Group: Libraries/Python
16 #Source0Download: https://pypi.org/simple/parso/
17 Source0: https://files.pythonhosted.org/packages/source/p/parso/parso-%{version}.tar.gz
18 # Source0-md5: eac40cda515ee71e3bb008c404ca3ac1
19 URL: https://pypi.org/project/parso/
21 BuildRequires: python-modules >= 1:2.7
22 BuildRequires: python-setuptools
24 BuildRequires: python-docopt
25 BuildRequires: python-pytest >= 3.0.7
29 BuildRequires: python3-modules >= 1:3.4
30 BuildRequires: python3-setuptools
32 BuildRequires: python3-docopt
33 BuildRequires: python3-pytest >= 3.0.7
36 BuildRequires: rpm-pythonprov
37 BuildRequires: rpmbuild(macros) >= 1.714
39 BuildRequires: sphinx-pdg-2
41 Requires: python-modules >= 1:2.7
43 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
46 Parso is a Python parser that supports error recovery and round-trip
47 parsing for different Python versions (in multiple Python versions).
48 Parso is also able to list multiple syntax errors in your python file.
50 %description -l pl.UTF-8
51 Parso to parser Pythona obsługujący wznawianie po błędach i obustronną
52 analizę dla różnych wersji Pythona (w wielu wersjach Pythona). Parso
53 potrafi także wypisać wiele błędów składni w pliku pythonowym.
55 %package -n python3-parso
56 Summary: Python parser
57 Summary(pl.UTF-8): Parser Pythona
58 Group: Libraries/Python
59 Requires: python3-modules >= 1:3.4
61 %description -n python3-parso
62 Parso is a Python parser that supports error recovery and round-trip
63 parsing for different Python versions (in multiple Python versions).
64 Parso is also able to list multiple syntax errors in your python file.
66 %description -n python3-parso -l pl.UTF-8
67 Parso to parser Pythona obsługujący wznawianie po błędach i obustronną
68 analizę dla różnych wersji Pythona (w wielu wersjach Pythona). Parso
69 potrafi także wypisać wiele błędów składni w pliku pythonowym.
72 Summary: API documentation for Python parso module
73 Summary(pl.UTF-8): Dokumentacja API modułu Pythona parso
77 API documentation for Python parso module.
79 %description apidocs -l pl.UTF-8
80 Dokumentacja API modułu Pythona parso.
83 %setup -q -n parso-%{version}
90 PYTEST_DISABLE_PLUGIN_AUTOLOAD=1 \
91 %{__python} -m pytest test
99 PYTEST_DISABLE_PLUGIN_AUTOLOAD=1 \
100 %{__python3} -m pytest test
105 %{__make} -C docs html \
106 SPHINXBUILD=sphinx-build-2
110 rm -rf $RPM_BUILD_ROOT
123 rm -rf $RPM_BUILD_ROOT
127 %defattr(644,root,root,755)
128 %doc AUTHORS.txt CHANGELOG.rst LICENSE.txt README.rst
129 %{py_sitescriptdir}/parso
130 %{py_sitescriptdir}/parso-%{version}-py*.egg-info
134 %files -n python3-parso
135 %defattr(644,root,root,755)
136 %doc AUTHORS.txt CHANGELOG.rst LICENSE.txt README.rst
137 %{py3_sitescriptdir}/parso
138 %{py3_sitescriptdir}/parso-%{version}-py*.egg-info
143 %defattr(644,root,root,755)
144 %doc docs/_build/html/{_modules,_static,docs,*.html,*.js}