]> git.pld-linux.org Git - SPECS.git/blob - python-parso.spec
SPECS updated Sun 1 Aug 20:28:02 CEST 2021
[SPECS.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 Version:        0.7.0
12 Release:        2
13 License:        MIT
14 Group:          Libraries/Python
15 #Source0Download: https://pypi.org/simple/parso/
16 Source0:        https://files.pythonhosted.org/packages/source/p/parso/parso-%{version}.tar.gz
17 # Source0-md5:  d3a892fb4d9a0ffed838b0a3416145bf
18 URL:            https://pypi.org/project/parso/
19 %if %{with python2}
20 BuildRequires:  python-modules >= 1:2.7
21 BuildRequires:  python-setuptools
22 %if %{with tests}
23 BuildRequires:  python-docopt
24 BuildRequires:  python-pytest >= 3.0.7
25 %endif
26 %endif
27 %if %{with python3}
28 BuildRequires:  python3-modules >= 1:3.4
29 BuildRequires:  python3-setuptools
30 %if %{with tests}
31 BuildRequires:  python3-docopt
32 BuildRequires:  python3-pytest >= 3.0.7
33 %endif
34 %endif
35 BuildRequires:  rpm-pythonprov
36 BuildRequires:  rpmbuild(macros) >= 1.714
37 %if %{with doc}
38 BuildRequires:  sphinx-pdg
39 %endif
40 Requires:       python-modules >= 1:2.7
41 BuildArch:      noarch
42 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
43
44 %description
45 Parso is a Python parser that supports error recovery and round-trip
46 parsing for different Python versions (in multiple Python versions).
47 Parso is also able to list multiple syntax errors in your python file.
48
49 %description -l pl.UTF-8
50 Parso to parser Pythona obsługujący wznawianie po błędach i obustronną
51 analizę dla różnych wersji Pythona (w wielu wersjach Pythona). Parso
52 potrafi także wypisać wiele błędów składni w pliku pythonowym.
53
54 %package -n python3-parso
55 Summary:        Python parser
56 Summary(pl.UTF-8):      Parser Pythona
57 Group:          Libraries/Python
58 Requires:       python3-modules >= 1:3.4
59
60 %description -n python3-parso
61 Parso is a Python parser that supports error recovery and round-trip
62 parsing for different Python versions (in multiple Python versions).
63 Parso is also able to list multiple syntax errors in your python file.
64
65 %description -n python3-parso -l pl.UTF-8
66 Parso to parser Pythona obsługujący wznawianie po błędach i obustronną
67 analizę dla różnych wersji Pythona (w wielu wersjach Pythona). Parso
68 potrafi także wypisać wiele błędów składni w pliku pythonowym.
69
70 %package apidocs
71 Summary:        API documentation for Python parso module
72 Summary(pl.UTF-8):      Dokumentacja API modułu Pythona parso
73 Group:          Documentation
74
75 %description apidocs
76 API documentation for Python parso module.
77
78 %description apidocs -l pl.UTF-8
79 Dokumentacja API modułu Pythona parso.
80
81 %prep
82 %setup -q -n parso-%{version}
83
84 %build
85 %if %{with python2}
86 %py_build
87
88 %if %{with tests}
89 %{__python} -m pytest test
90 %endif
91 %endif
92
93 %if %{with python3}
94 %py3_build
95
96 %if %{with tests}
97 %{__python3} -m pytest test
98 %endif
99 %endif
100
101 %if %{with doc}
102 %{__make} -C docs html
103 %endif
104
105 %install
106 rm -rf $RPM_BUILD_ROOT
107
108 %if %{with python2}
109 %py_install
110
111 %py_postclean
112 %endif
113
114 %if %{with python3}
115 %py3_install
116 %endif
117
118 %clean
119 rm -rf $RPM_BUILD_ROOT
120
121 %if %{with python2}
122 %files
123 %defattr(644,root,root,755)
124 %doc AUTHORS.txt CHANGELOG.rst LICENSE.txt README.rst
125 %{py_sitescriptdir}/parso
126 %{py_sitescriptdir}/parso-%{version}-py*.egg-info
127 %endif
128
129 %if %{with python3}
130 %files -n python3-parso
131 %defattr(644,root,root,755)
132 %doc AUTHORS.txt CHANGELOG.rst LICENSE.txt README.rst
133 %{py3_sitescriptdir}/parso
134 %{py3_sitescriptdir}/parso-%{version}-py*.egg-info
135 %endif
136
137 %if %{with doc}
138 %files apidocs
139 %defattr(644,root,root,755)
140 %doc docs/_build/html/{_modules,_static,docs,*.html,*.js}
141 %endif
This page took 0.758082 seconds and 3 git commands to generate.