1 # NOTE: 1.6.6 is the last version with python 2.7 support; for newer, python3-only releases see python3-astroid.spec
4 %bcond_with tests # unit tests (too many failures)
5 %bcond_without python2 # Python 2.x module
6 %bcond_with python3 # Python 3.x module (newer version is built from python3-astroid.spec)
9 Summary: An abstract syntax tree for Python 2 with inference support
10 Summary(pl.UTF-8): Abstrakcyjnego drzewa składniowe dla Pythona 2 z obsługą wywodu
11 Name: python-%{module}
12 # DO NOT UPGRADE TO 2.x, SEE NOTE ABOVE
17 Group: Development/Languages/Python
18 #Source0Download: https://pypi.org/simple/astroid/
19 Source0: https://files.pythonhosted.org/packages/source/a/astroid/astroid-%{version}.tar.gz
20 # Source0-md5: ce625aa26b8e93b4d6802401e0cf672b
21 URL: https://github.com/PyCQA/astroid
23 BuildRequires: python-devel >= 1:2.7
24 BuildRequires: python-modules >= 1:2.7
25 BuildRequires: python-setuptools >= 1:17.1
27 BuildRequires: python-backports.functools_lru_cache
28 BuildRequires: python-enum34 >= 1.1.3
29 BuildRequires: python-lazy-object-proxy
30 BuildRequires: python-pytest
31 BuildRequires: python-pytest-runner
32 BuildRequires: python-singledispatch
33 BuildRequires: python-six
34 BuildRequires: python-wrapt
38 BuildRequires: python3-devel >= 1:3.4
39 BuildRequires: python3-modules >= 1:3.5
40 BuildRequires: python3-setuptools >= 17.1
42 BuildRequires: python3-lazy-object-proxy
43 BuildRequires: python3-pytest
44 BuildRequires: python3-pytest-runner
45 BuildRequires: python3-six
46 BuildRequires: python3-wrapt >= 1.11
49 BuildRequires: rpm-pythonprov
50 BuildRequires: rpmbuild(macros) >= 1.714
51 Requires: python-modules >= 1:2.7
52 Obsoletes: python-logilab-astng
54 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
57 The aim of this module is to provide a common base representation of
58 Python source code for projects such as pychecker, pyreverse,
59 pylint... Well, actually the development of this library is
60 essentially governed by pylint's needs. It used to be called
63 %description -l pl.UTF-8
64 Celem tego modułu jest dostarczenie wspólnej bazowej reprezentacji
65 kodu źródłowego Pythona dla projektów takich jak pychecker, pyreverse,
66 pylint... Właściwie tworzenie tej biblioteki jest istotnie kierowane
67 potrzebami pylinta. Dawniej nazywała się logilab-astng.
69 %package -n python3-%{module}
70 Summary: An abstract syntax tree for Python 3 with inference support
71 Summary(pl.UTF-8): Abstrakcyjnego drzewa składniowe dla Pythona 3 z obsługą wywodu
72 Group: Development/Languages/Python
73 Requires: python3-modules >= 1:3.4
74 Obsoletes: python3-logilab-astng
76 %description -n python3-%{module}
77 The aim of this module is to provide a common base representation of
78 Python source code for projects such as pychecker, pyreverse,
79 pylint... Well, actually the development of this library is
80 essentially governed by pylint's needs. It used to be called
83 %description -n python3-%{module} -l pl.UTF-8
84 Celem tego modułu jest dostarczenie wspólnej bazowej reprezentacji
85 kodu źródłowego Pythona dla projektów takich jak pychecker, pyreverse,
86 pylint... Właściwie tworzenie tej biblioteki jest istotnie kierowane
87 potrzebami pylinta. Dawniej nazywała się logilab-astng.
90 %setup -q -n %{module}-%{version}
92 # non-deterministic (skipped if numpy not installed; unittest_brain_numpy_core_multiarray.py fails with numpy 1.16.5
93 #%{__rm} astroid/tests/unittest_brain_numpy_*
94 # test_knownValues_get_builtin_module_part fails
95 #%{__rm} astroid/tests/unittest_modutils.py
102 %{__python} -m pytest astroid/tests
110 %{__python3} -m pytest astroid/tests
115 rm -rf $RPM_BUILD_ROOT
128 rm -rf $RPM_BUILD_ROOT
132 %defattr(644,root,root,755)
133 %doc ChangeLog README.rst
134 %{py_sitescriptdir}/astroid
135 %{py_sitescriptdir}/astroid-%{version}-py*.egg-info
139 %files -n python3-%{module}
140 %defattr(644,root,root,755)
141 %doc ChangeLog README.rst
142 %{py3_sitescriptdir}/astroid
143 %{py3_sitescriptdir}/astroid-%{version}-py*.egg-info