]> git.pld-linux.org Git - packages/python-parso.git/blob - python-parso.spec
e59404d9b450022f004a95aa5d61cd595a418e84
[packages/python-parso.git] / python-parso.spec
1 #
2 # Conditional build:
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
7
8 Summary:        Python parser
9 Summary(pl.UTF-8):      Parser Pythona
10 Name:           python-parso
11 # keep 0.7.x here for python2 support
12 Version:        0.7.1
13 Release:        4
14 License:        MIT
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/
20 %if %{with python2}
21 BuildRequires:  python-modules >= 1:2.7
22 BuildRequires:  python-setuptools
23 %if %{with tests}
24 BuildRequires:  python-docopt
25 BuildRequires:  python-pytest >= 3.0.7
26 %endif
27 %endif
28 %if %{with python3}
29 BuildRequires:  python3-modules >= 1:3.4
30 BuildRequires:  python3-setuptools
31 %if %{with tests}
32 BuildRequires:  python3-docopt
33 BuildRequires:  python3-pytest >= 3.0.7
34 %endif
35 %endif
36 BuildRequires:  rpm-pythonprov
37 BuildRequires:  rpmbuild(macros) >= 1.714
38 %if %{with doc}
39 BuildRequires:  sphinx-pdg-2
40 %endif
41 Requires:       python-modules >= 1:2.7
42 BuildArch:      noarch
43 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
44
45 %description
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.
49
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.
54
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
60
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.
65
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.
70
71 %package apidocs
72 Summary:        API documentation for Python parso module
73 Summary(pl.UTF-8):      Dokumentacja API modułu Pythona parso
74 Group:          Documentation
75
76 %description apidocs
77 API documentation for Python parso module.
78
79 %description apidocs -l pl.UTF-8
80 Dokumentacja API modułu Pythona parso.
81
82 %prep
83 %setup -q -n parso-%{version}
84
85 %build
86 %if %{with python2}
87 %py_build
88
89 %if %{with tests}
90 PYTEST_DISABLE_PLUGIN_AUTOLOAD=1 \
91 %{__python} -m pytest test
92 %endif
93 %endif
94
95 %if %{with python3}
96 %py3_build
97
98 %if %{with tests}
99 PYTEST_DISABLE_PLUGIN_AUTOLOAD=1 \
100 %{__python3} -m pytest test
101 %endif
102 %endif
103
104 %if %{with doc}
105 %{__make} -C docs html \
106         SPHINXBUILD=sphinx-build-2
107 %endif
108
109 %install
110 rm -rf $RPM_BUILD_ROOT
111
112 %if %{with python2}
113 %py_install
114
115 %py_postclean
116 %endif
117
118 %if %{with python3}
119 %py3_install
120 %endif
121
122 %clean
123 rm -rf $RPM_BUILD_ROOT
124
125 %if %{with python2}
126 %files
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
131 %endif
132
133 %if %{with python3}
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
139 %endif
140
141 %if %{with doc}
142 %files apidocs
143 %defattr(644,root,root,755)
144 %doc docs/_build/html/{_modules,_static,docs,*.html,*.js}
145 %endif
This page took 0.069968 seconds and 2 git commands to generate.