3 %bcond_with tests # unit tests (using local python installation, failing on python 3.9)
4 %bcond_without python2 # CPython 2.x module
5 %bcond_without python3 # CPython 3.x module
7 Summary: Read/rewrite/write Python ASTs
8 Summary(pl.UTF-8): Odczyt/przepisywanie/zapis pythonowych AST
13 Group: Libraries/Python
14 #Source0Download: https://pypi.org/simple/astor/
15 Source0: https://files.pythonhosted.org/packages/source/a/astor/astor-%{version}.tar.gz
16 # Source0-md5: 83ab4ee6598f0381d94ed6949a6d6da2
17 URL: https://pypi.org/project/astor/
19 BuildRequires: python-modules >= 1:2.7
20 BuildRequires: python-setuptools
22 BuildRequires: python-astunparse
23 BuildRequires: python-nose
27 BuildRequires: python3-modules >= 1:3.4
28 BuildRequires: python3-setuptools
30 BuildRequires: python3-astunparse
31 BuildRequires: python3-nose
34 BuildRequires: rpm-pythonprov
35 BuildRequires: rpmbuild(macros) >= 1.714
36 Requires: python-modules >= 1:2.7
38 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
41 astor is designed to allow easy manipulation of Python source via the
44 %description -l pl.UTF-8
45 astor powstał, aby umożliwić łatwe operowanie na kodzie źródłowym w
48 %package -n python3-astor
49 Summary: Read/rewrite/write Python ASTs
50 Summary(pl.UTF-8): Odczyt/przepisywanie/zapis pythonowych AST
51 Group: Libraries/Python
52 Requires: python3-modules >= 1:3.4
54 %description -n python3-astor
55 astor is designed to allow easy manipulation of Python source via the
58 %description -n python3-astor -l pl.UTF-8
59 astor powstał, aby umożliwić łatwe operowanie na kodzie źródłowym w
63 %setup -q -n astor-%{version}
70 nosetests-%{py_ver} tests
78 nosetests-%{py3_ver} tests
83 rm -rf $RPM_BUILD_ROOT
96 rm -rf $RPM_BUILD_ROOT
100 %defattr(644,root,root,755)
101 %doc AUTHORS LICENSE README.rst
102 %{py_sitescriptdir}/astor
103 %{py_sitescriptdir}/astor-%{version}-py*.egg-info
107 %files -n python3-astor
108 %defattr(644,root,root,755)
109 %doc AUTHORS LICENSE README.rst
110 %{py3_sitescriptdir}/astor
111 %{py3_sitescriptdir}/astor-%{version}-py*.egg-info