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