]> git.pld-linux.org Git - packages/python3-astroid.git/blob - python3-astroid.spec
- python3-only version under python3-* spec name
[packages/python3-astroid.git] / python3-astroid.spec
1 #
2 # Conditional build:
3 %bcond_without  tests   # unit tests
4
5 %define module  astroid
6 Summary:        An abstract syntax tree for Python 3 with inference support
7 Summary(pl.UTF-8):      Abstrakcyjnego drzewa składniowe dla Pythona 3 z obsługą wywodu
8 Name:           python3-%{module}
9 Version:        2.3.2
10 Release:        1
11 License:        LGPL v2.1+
12 Group:          Development/Languages/Python
13 #Source0Download: https://pypi.org/simple/astroid/
14 Source0:        https://files.pythonhosted.org/packages/source/a/astroid/astroid-%{version}.tar.gz
15 # Source0-md5:  b2cd5c0383ff33c1410e737c2607aa7a
16 Patch0:         %{name}-deps.patch
17 URL:            https://github.com/PyCQA/astroid
18 BuildRequires:  python3-devel >= 1:3.5
19 BuildRequires:  python3-modules >= 1:3.5
20 BuildRequires:  python3-pytest-runner
21 BuildRequires:  python3-setuptools >= 7.0
22 %if %{with tests}
23 BuildRequires:  python3-lazy-object-proxy >= 1.4
24 BuildRequires:  python3-pytest
25 BuildRequires:  python3-six >= 1.12
26 %if "%{py3_ver}" < "3.8"
27 BuildRequires:  python3-typed_ast >= 1.4.0
28 BuildRequires:  python3-typed_ast < 1.5
29 %endif
30 BuildRequires:  python3-wrapt >= 1.11
31 %endif
32 BuildRequires:  rpm-pythonprov
33 BuildRequires:  rpmbuild(macros) >= 1.714
34 Requires:       python3-modules >= 1:3.5
35 %if "%{py3_ver}" < "3.8"
36 # not detected by rpm from rule:
37 # [:implementation_name == "cpython" and python_version < "3.8"]
38 Requires:       python3-typed_ast >= 1.4.0
39 Requires:       python3-typed_ast < 1.5
40 %endif
41 Obsoletes:      python3-logilab-astng
42 BuildArch:      noarch
43 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
44
45 %description
46 The aim of this module is to provide a common base representation of
47 Python source code for projects such as pychecker, pyreverse,
48 pylint... Well, actually the development of this library is
49 essentially governed by pylint's needs. It used to be called
50 logilab-astng.
51
52 %description -l pl.UTF-8
53 Celem tego modułu jest dostarczenie wspólnej bazowej reprezentacji
54 kodu źródłowego Pythona dla projektów takich jak pychecker, pyreverse,
55 pylint... Właściwie tworzenie tej biblioteki jest istotnie kierowane
56 potrzebami pylinta. Dawniej nazywała się logilab-astng.
57
58 %prep
59 %setup -q -n %{module}-%{version}
60 %patch0 -p1
61
62 # non-deterministic (skipped if numpy not installed; unittest_brain_numpy_core_multiarray.py fails with numpy 1.16.5
63 %{__rm} astroid/tests/unittest_brain_numpy_*
64 # test_knownValues_get_builtin_module_part fails
65 %{__rm} astroid/tests/unittest_modutils.py
66
67 %build
68 %py3_build
69
70 %if %{with tests}
71 %{__python3} -m pytest astroid/tests
72 %endif
73
74 %install
75 rm -rf $RPM_BUILD_ROOT
76
77 %py3_install
78
79 %clean
80 rm -rf $RPM_BUILD_ROOT
81
82 %files
83 %defattr(644,root,root,755)
84 %doc ChangeLog README.rst
85 %{py3_sitescriptdir}/astroid
86 %{py3_sitescriptdir}/astroid-%{version}-py*.egg-info
This page took 0.069556 seconds and 4 git commands to generate.