]> git.pld-linux.org Git - packages/python-astroid.git/blame - python-astroid.spec
- up to 2.3.2; has anyone used this package? astroid 2.x is python3-only
[packages/python-astroid.git] / python-astroid.spec
CommitLineData
86ae2efd 1#
797e8d54 2# Conditional build:
c8eef9e6
JB
3%bcond_without tests # unit tests
4%bcond_with python2 # Python 2.x module
5%bcond_without python3 # Python 3.x module
797e8d54 6
935ded5d 7%define module astroid
424da304
JB
8Summary: An abstract syntax tree for Python 2 with inference support
9Summary(pl.UTF-8): Abstrakcyjnego drzewa składniowe dla Pythona 2 z obsługą wywodu
935ded5d 10Name: python-%{module}
c8eef9e6
JB
11Version: 2.3.2
12Release: 1
f33b8242 13License: LGPL v2.1+
f3ce12d1 14Group: Development/Languages/Python
c8eef9e6 15#Source0Download: https://pypi.org/simple/astroid/
00f52389 16Source0: https://files.pythonhosted.org/packages/source/a/astroid/astroid-%{version}.tar.gz
c8eef9e6 17# Source0-md5: b2cd5c0383ff33c1410e737c2607aa7a
077b42c9 18Patch0: %{name}-deps.patch
965510b3 19URL: https://github.com/PyCQA/astroid
797e8d54 20%if %{with python2}
b42224b7
JB
21BuildRequires: python-devel >= 1:2.7
22BuildRequires: python-modules >= 1:2.7
aab70606 23BuildRequires: python-pytest-runner
efa8ca83 24BuildRequires: python-setuptools >= 7.0
c8eef9e6
JB
25%if %{with tests}
26BuildRequires: python-lazy-object-proxy >= 1.4
27BuildRequires: python-pytest
28BuildRequires: python-six >= 1.12
29BuildRequires: python-typed_ast >= 1.4.0
30BuildRequires: python-typed_ast < 1.5
31BuildRequires: python-wrapt >= 1.11
32%endif
797e8d54
JK
33%endif
34%if %{with python3}
c8eef9e6
JB
35BuildRequires: python3-devel >= 1:3.5
36BuildRequires: python3-modules >= 1:3.5
aab70606 37BuildRequires: python3-pytest-runner
efa8ca83 38BuildRequires: python3-setuptools >= 7.0
c8eef9e6
JB
39%if %{with tests}
40BuildRequires: python3-lazy-object-proxy >= 1.4
41BuildRequires: python3-pytest
42BuildRequires: python3-six >= 1.12
43%if "%{py3_ver}" < "3.8"
44BuildRequires: python3-typed_ast >= 1.4.0
45BuildRequires: python3-typed_ast < 1.5
46%endif
47BuildRequires: python3-wrapt >= 1.11
797e8d54 48%endif
c8eef9e6
JB
49%endif
50BuildRequires: rpm-pythonprov
51BuildRequires: rpmbuild(macros) >= 1.714
b42224b7 52Requires: python-modules >= 1:2.7
ea88bfee 53Obsoletes: python-logilab-astng
f3ce12d1
KK
54BuildArch: noarch
55BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
56
57%description
8dd567ae 58The aim of this module is to provide a common base representation of
86ae2efd 59Python source code for projects such as pychecker, pyreverse,
8dd567ae
AF
60pylint... Well, actually the development of this library is
61essentially governed by pylint's needs. It used to be called
62logilab-astng.
f3ce12d1 63
9522705c
JR
64%description -l pl.UTF-8
65Celem tego modułu jest dostarczenie wspólnej bazowej reprezentacji
66kodu źródłowego Pythona dla projektów takich jak pychecker, pyreverse,
67pylint... Właściwie tworzenie tej biblioteki jest istotnie kierowane
86ae2efd 68potrzebami pylinta. Dawniej nazywała się logilab-astng.
8504e807 69
797e8d54 70%package -n python3-%{module}
424da304
JB
71Summary: An abstract syntax tree for Python 3 with inference support
72Summary(pl.UTF-8): Abstrakcyjnego drzewa składniowe dla Pythona 3 z obsługą wywodu
797e8d54 73Group: Development/Languages/Python
c8eef9e6
JB
74Requires: python3-modules >= 1:3.5
75%if "%{py3_ver}" < "3.8"
76# not detected by rpm from rule:
77# [:implementation_name == "cpython" and python_version < "3.8"]
78Requires: python3-typed_ast >= 1.4.0
79Requires: python3-typed_ast < 1.5
80%endif
ea88bfee 81Obsoletes: python3-logilab-astng
797e8d54
JK
82
83%description -n python3-%{module}
8dd567ae 84The aim of this module is to provide a common base representation of
86ae2efd 85Python source code for projects such as pychecker, pyreverse,
8dd567ae
AF
86pylint... Well, actually the development of this library is
87essentially governed by pylint's needs. It used to be called
88logilab-astng.
797e8d54
JK
89
90%description -n python3-%{module} -l pl.UTF-8
91Celem tego modułu jest dostarczenie wspólnej bazowej reprezentacji
92kodu źródłowego Pythona dla projektów takich jak pychecker, pyreverse,
93pylint... Właściwie tworzenie tej biblioteki jest istotnie kierowane
86ae2efd 94potrzebami pylinta. Dawniej nazywała się logilab-astng.
797e8d54 95
f3ce12d1 96%prep
abbaad7a 97%setup -q -n %{module}-%{version}
077b42c9 98%patch0 -p1
60fa4681 99
c8eef9e6
JB
100# non-deterministic (skipped if numpy not installed; unittest_brain_numpy_core_multiarray.py fails with numpy 1.16.5
101%{__rm} astroid/tests/unittest_brain_numpy_*
102# test_knownValues_get_builtin_module_part fails
103%{__rm} astroid/tests/unittest_modutils.py
f3ce12d1
KK
104
105%build
797e8d54 106%if %{with python2}
08f50e0d 107%py_build
c8eef9e6
JB
108
109%if %{with tests}
110%{__python} -m pytest astroid/tests
111%endif
797e8d54 112%endif
c8eef9e6 113
797e8d54 114%if %{with python3}
c8eef9e6
JB
115%py3_build
116
117%if %{with tests}
118%{__python3} -m pytest astroid/tests
119%endif
797e8d54 120%endif
f3ce12d1
KK
121
122%install
123rm -rf $RPM_BUILD_ROOT
124
797e8d54 125%if %{with python3}
cd33eed2 126%py3_install
797e8d54
JK
127%endif
128
129%if %{with python2}
08f50e0d 130%py_install
f3ce12d1 131
5a062cc9 132%py_postclean
797e8d54 133%endif
f3ce12d1 134
f3ce12d1
KK
135%clean
136rm -rf $RPM_BUILD_ROOT
137
8f194190 138%if %{with python2}
f3ce12d1
KK
139%files
140%defattr(644,root,root,755)
00f52389 141%doc ChangeLog README.rst
935ded5d
AF
142%{py_sitescriptdir}/astroid
143%{py_sitescriptdir}/astroid-%{version}-py*.egg-info
8f194190 144%endif
797e8d54 145
8f194190 146%if %{with python3}
797e8d54
JK
147%files -n python3-%{module}
148%defattr(644,root,root,755)
00f52389 149%doc ChangeLog README.rst
935ded5d
AF
150%{py3_sitescriptdir}/astroid
151%{py3_sitescriptdir}/astroid-%{version}-py*.egg-info
8f194190 152%endif
This page took 0.049101 seconds and 4 git commands to generate.