]> git.pld-linux.org Git - packages/python-astroid.git/blob - python-astroid.spec
f93280c251d3eb3e713813f13a5c165d460f1173
[packages/python-astroid.git] / python-astroid.spec
1 # NOTE: 1.6.6 is the last version with python 2.7 support; for newer, python3-only releases see python3-astroid.spec
2 #
3 # Conditional build:
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)
7
8 %define module  astroid
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
13 Version:        1.6.6
14 Release:        4
15 Epoch:          1
16 License:        LGPL v2.1+
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
22 %if %{with python2}
23 BuildRequires:  python-devel >= 1:2.7
24 BuildRequires:  python-modules >= 1:2.7
25 BuildRequires:  python-setuptools >= 1:17.1
26 %if %{with tests}
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
35 %endif
36 %endif
37 %if %{with python3}
38 BuildRequires:  python3-devel >= 1:3.4
39 BuildRequires:  python3-modules >= 1:3.5
40 BuildRequires:  python3-setuptools >= 17.1
41 %if %{with tests}
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
47 %endif
48 %endif
49 BuildRequires:  rpm-pythonprov
50 BuildRequires:  rpmbuild(macros) >= 1.714
51 Requires:       python-modules >= 1:2.7
52 Obsoletes:      python-logilab-astng
53 BuildArch:      noarch
54 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
55
56 %description
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
61 logilab-astng.
62
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.
68
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
75
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
81 logilab-astng.
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
87 potrzebami pylinta. Dawniej nazywała się logilab-astng.
88
89 %prep
90 %setup -q -n %{module}-%{version}
91
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
96
97 %build
98 %if %{with python2}
99 %py_build
100
101 %if %{with tests}
102 %{__python} -m pytest astroid/tests
103 %endif
104 %endif
105
106 %if %{with python3}
107 %py3_build
108
109 %if %{with tests}
110 %{__python3} -m pytest astroid/tests
111 %endif
112 %endif
113
114 %install
115 rm -rf $RPM_BUILD_ROOT
116
117 %if %{with python3}
118 %py3_install
119 %endif
120
121 %if %{with python2}
122 %py_install
123
124 %py_postclean
125 %endif
126
127 %clean
128 rm -rf $RPM_BUILD_ROOT
129
130 %if %{with python2}
131 %files
132 %defattr(644,root,root,755)
133 %doc ChangeLog README.rst
134 %{py_sitescriptdir}/astroid
135 %{py_sitescriptdir}/astroid-%{version}-py*.egg-info
136 %endif
137
138 %if %{with python3}
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
144 %endif
This page took 0.050202 seconds and 2 git commands to generate.