3 %bcond_without tests # unit tests
4 %bcond_without python2 # CPython 2.x module
5 %bcond_without python3 # CPython 3.x module
7 Summary: Python AST that abstracts the underlying Python version
8 Summary(pl.UTF-8): Pythonowe AST niezależne od wersji Pythona
13 Group: Libraries/Python
14 #Source0Download: https://pypi.org/simple/gast/
15 Source0: https://files.pythonhosted.org/packages/source/g/gast/gast-%{version}.tar.gz
16 # Source0-md5: fdff900805e03e9dd76d377eb4cbaed7
17 Patch0: gast-python2.patch
18 URL: https://pypi.org/project/gast/
20 BuildRequires: python-modules >= 1:2.7
21 BuildRequires: python-setuptools
24 BuildRequires: python3-modules >= 1:3.4
25 BuildRequires: python3-setuptools
27 BuildRequires: rpm-pythonprov
28 BuildRequires: rpmbuild(macros) >= 1.714
29 Requires: python-modules >= 1:2.7
31 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
34 A generic AST to represent Python2 and Python3's Abstract Syntax Tree
35 (AST). GAST provides a compatibility layer between the AST of various
36 Python versions, as produced by "ast.parse" from the standard "ast"
39 %description -l pl.UTF-8
40 Ogólne AST reprezentujące abstrakcyjne drzewo składniowe (Abstract
41 Syntax Tree) Pythona 2 i 3. GAST zapewnia warstwę zgodności między AST
42 różnych wersji Pythona, w postaci tworzonej przez "ast.parse" ze
43 standardowego modułu "ast".
45 %package -n python3-gast
46 Summary: Python AST that abstracts the underlying Python version
47 Summary(pl.UTF-8): Pythonowe AST niezależne od wersji Pythona
48 Group: Libraries/Python
49 Requires: python3-modules >= 1:3.4
51 %description -n python3-gast
52 A generic AST to represent Python2 and Python3's Abstract Syntax Tree
53 (AST). GAST provides a compatibility layer between the AST of various
54 Python versions, as produced by "ast.parse" from the standard "ast"
57 %description -n python3-gast -l pl.UTF-8
58 Ogólne AST reprezentujące abstrakcyjne drzewo składniowe (Abstract
59 Syntax Tree) Pythona 2 i 3. GAST zapewnia warstwę zgodności między AST
60 różnych wersji Pythona, w postaci tworzonej przez "ast.parse" ze
61 standardowego modułu "ast".
64 %setup -q -n gast-%{version}
70 # deprecated target, but sometimes still used: %{?with_tests:test}
74 %{__python} -m unittest discover -s tests
76 ## use explicit plugins list for reliable builds (delete PYTEST_PLUGINS if empty)
77 #PYTEST_DISABLE_PLUGIN_AUTOLOAD=1 \
79 #%{__python} -m pytest ...
85 # deprecated target, but sometimes still used: %{?with_tests:test}
89 %{__python3} -m unittest discover -s tests
90 ## use explicit plugins list for reliable builds (delete PYTEST_PLUGINS if empty)
91 #PYTEST_DISABLE_PLUGIN_AUTOLOAD=1 \
93 #%{__python3} -m pytest ...
98 rm -rf $RPM_BUILD_ROOT
111 rm -rf $RPM_BUILD_ROOT
115 %defattr(644,root,root,755)
116 %doc LICENSE README.rst
117 %{py_sitescriptdir}/gast
118 %{py_sitescriptdir}/gast-%{version}-py*.egg-info
122 %files -n python3-gast
123 %defattr(644,root,root,755)
124 %doc LICENSE README.rst
125 %{py3_sitescriptdir}/gast
126 %{py3_sitescriptdir}/gast-%{version}-py*.egg-info