]>
Commit | Line | Data |
---|---|---|
5b74327b | 1 | # NOTE: 1.6.6 is the last version with python 2.7 support; for newer, python3-only releases see python3-astroid.spec |
86ae2efd | 2 | # |
797e8d54 | 3 | # Conditional build: |
5b74327b JB |
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) | |
797e8d54 | 7 | |
935ded5d | 8 | %define module astroid |
424da304 JB |
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 | |
935ded5d | 11 | Name: python-%{module} |
349824db | 12 | # DO NOT UPGRADE TO 2.x, SEE NOTE ABOVE |
94f890e5 | 13 | Version: 1.6.6 |
c6ab7054 | 14 | Release: 2 |
5b74327b | 15 | Epoch: 1 |
f33b8242 | 16 | License: LGPL v2.1+ |
f3ce12d1 | 17 | Group: Development/Languages/Python |
c8eef9e6 | 18 | #Source0Download: https://pypi.org/simple/astroid/ |
00f52389 | 19 | Source0: https://files.pythonhosted.org/packages/source/a/astroid/astroid-%{version}.tar.gz |
94f890e5 | 20 | # Source0-md5: ce625aa26b8e93b4d6802401e0cf672b |
965510b3 | 21 | URL: https://github.com/PyCQA/astroid |
797e8d54 | 22 | %if %{with python2} |
b42224b7 JB |
23 | BuildRequires: python-devel >= 1:2.7 |
24 | BuildRequires: python-modules >= 1:2.7 | |
5b74327b | 25 | BuildRequires: python-setuptools >= 17.1 |
c8eef9e6 | 26 | %if %{with tests} |
5b74327b JB |
27 | BuildRequires: python-backports.functools_lru_cache |
28 | BuildRequires: python-enum34 >= 1.1.3 | |
29 | BuildRequires: python-lazy-object-proxy | |
c8eef9e6 | 30 | BuildRequires: python-pytest |
5b74327b JB |
31 | BuildRequires: python-pytest-runner |
32 | BuildRequires: python-singledispatch | |
33 | BuildRequires: python-six | |
34 | BuildRequires: python-wrapt | |
c8eef9e6 | 35 | %endif |
797e8d54 JK |
36 | %endif |
37 | %if %{with python3} | |
5b74327b | 38 | BuildRequires: python3-devel >= 1:3.4 |
c8eef9e6 | 39 | BuildRequires: python3-modules >= 1:3.5 |
5b74327b | 40 | BuildRequires: python3-setuptools >= 17.1 |
c8eef9e6 | 41 | %if %{with tests} |
5b74327b | 42 | BuildRequires: python3-lazy-object-proxy |
c8eef9e6 | 43 | BuildRequires: python3-pytest |
5b74327b JB |
44 | BuildRequires: python3-pytest-runner |
45 | BuildRequires: python3-six | |
c8eef9e6 | 46 | BuildRequires: python3-wrapt >= 1.11 |
797e8d54 | 47 | %endif |
c8eef9e6 JB |
48 | %endif |
49 | BuildRequires: rpm-pythonprov | |
50 | BuildRequires: rpmbuild(macros) >= 1.714 | |
b42224b7 | 51 | Requires: python-modules >= 1:2.7 |
ea88bfee | 52 | Obsoletes: python-logilab-astng |
f3ce12d1 KK |
53 | BuildArch: noarch |
54 | BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) | |
55 | ||
56 | %description | |
8dd567ae | 57 | The aim of this module is to provide a common base representation of |
86ae2efd | 58 | Python source code for projects such as pychecker, pyreverse, |
8dd567ae AF |
59 | pylint... Well, actually the development of this library is |
60 | essentially governed by pylint's needs. It used to be called | |
61 | logilab-astng. | |
f3ce12d1 | 62 | |
9522705c JR |
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 | |
86ae2efd | 67 | potrzebami pylinta. Dawniej nazywała się logilab-astng. |
8504e807 | 68 | |
797e8d54 | 69 | %package -n python3-%{module} |
424da304 JB |
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 | |
797e8d54 | 72 | Group: Development/Languages/Python |
5b74327b | 73 | Requires: python3-modules >= 1:3.4 |
ea88bfee | 74 | Obsoletes: python3-logilab-astng |
797e8d54 JK |
75 | |
76 | %description -n python3-%{module} | |
8dd567ae | 77 | The aim of this module is to provide a common base representation of |
86ae2efd | 78 | Python source code for projects such as pychecker, pyreverse, |
8dd567ae AF |
79 | pylint... Well, actually the development of this library is |
80 | essentially governed by pylint's needs. It used to be called | |
81 | logilab-astng. | |
797e8d54 JK |
82 | |
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 | |
86ae2efd | 87 | potrzebami pylinta. Dawniej nazywała się logilab-astng. |
797e8d54 | 88 | |
f3ce12d1 | 89 | %prep |
abbaad7a | 90 | %setup -q -n %{module}-%{version} |
60fa4681 | 91 | |
c8eef9e6 | 92 | # non-deterministic (skipped if numpy not installed; unittest_brain_numpy_core_multiarray.py fails with numpy 1.16.5 |
5b74327b | 93 | #%{__rm} astroid/tests/unittest_brain_numpy_* |
c8eef9e6 | 94 | # test_knownValues_get_builtin_module_part fails |
5b74327b | 95 | #%{__rm} astroid/tests/unittest_modutils.py |
f3ce12d1 KK |
96 | |
97 | %build | |
797e8d54 | 98 | %if %{with python2} |
08f50e0d | 99 | %py_build |
c8eef9e6 JB |
100 | |
101 | %if %{with tests} | |
102 | %{__python} -m pytest astroid/tests | |
103 | %endif | |
797e8d54 | 104 | %endif |
c8eef9e6 | 105 | |
797e8d54 | 106 | %if %{with python3} |
c8eef9e6 JB |
107 | %py3_build |
108 | ||
109 | %if %{with tests} | |
110 | %{__python3} -m pytest astroid/tests | |
111 | %endif | |
797e8d54 | 112 | %endif |
f3ce12d1 KK |
113 | |
114 | %install | |
115 | rm -rf $RPM_BUILD_ROOT | |
116 | ||
797e8d54 | 117 | %if %{with python3} |
cd33eed2 | 118 | %py3_install |
797e8d54 JK |
119 | %endif |
120 | ||
121 | %if %{with python2} | |
08f50e0d | 122 | %py_install |
f3ce12d1 | 123 | |
5a062cc9 | 124 | %py_postclean |
797e8d54 | 125 | %endif |
f3ce12d1 | 126 | |
f3ce12d1 KK |
127 | %clean |
128 | rm -rf $RPM_BUILD_ROOT | |
129 | ||
8f194190 | 130 | %if %{with python2} |
f3ce12d1 KK |
131 | %files |
132 | %defattr(644,root,root,755) | |
00f52389 | 133 | %doc ChangeLog README.rst |
935ded5d AF |
134 | %{py_sitescriptdir}/astroid |
135 | %{py_sitescriptdir}/astroid-%{version}-py*.egg-info | |
8f194190 | 136 | %endif |
797e8d54 | 137 | |
8f194190 | 138 | %if %{with python3} |
797e8d54 JK |
139 | %files -n python3-%{module} |
140 | %defattr(644,root,root,755) | |
00f52389 | 141 | %doc ChangeLog README.rst |
935ded5d AF |
142 | %{py3_sitescriptdir}/astroid |
143 | %{py3_sitescriptdir}/astroid-%{version}-py*.egg-info | |
8f194190 | 144 | %endif |