]>
Commit | Line | Data |
---|---|---|
86ae2efd | 1 | # |
797e8d54 JK |
2 | # Conditional build: |
3 | %bcond_without python2 # Python 2.x module | |
4 | %bcond_without python3 # Python 3.x module | |
5 | ||
935ded5d | 6 | %define module astroid |
424da304 JB |
7 | Summary: An abstract syntax tree for Python 2 with inference support |
8 | Summary(pl.UTF-8): Abstrakcyjnego drzewa składniowe dla Pythona 2 z obsługą wywodu | |
935ded5d | 9 | Name: python-%{module} |
4537d2ca MK |
10 | Version: 2.0.4 |
11 | Release: 1 | |
f33b8242 | 12 | License: LGPL v2.1+ |
f3ce12d1 | 13 | Group: Development/Languages/Python |
424da304 | 14 | #Source0Download: https://pypi.python.org/pypi/astroid/ |
00f52389 | 15 | Source0: https://files.pythonhosted.org/packages/source/a/astroid/astroid-%{version}.tar.gz |
4537d2ca | 16 | # Source0-md5: eb1c4312019809696634b33d639eee9d |
935ded5d | 17 | URL: http://www.astroid.org/ |
797e8d54 | 18 | %if %{with python2} |
b42224b7 JB |
19 | BuildRequires: python-devel >= 1:2.7 |
20 | BuildRequires: python-modules >= 1:2.7 | |
efa8ca83 | 21 | BuildRequires: python-setuptools >= 7.0 |
797e8d54 JK |
22 | %endif |
23 | %if %{with python3} | |
b42224b7 | 24 | BuildRequires: python3-devel >= 1:3.3 |
b42224b7 | 25 | BuildRequires: python3-modules >= 1:3.3 |
efa8ca83 | 26 | BuildRequires: python3-setuptools >= 7.0 |
8dd567ae | 27 | BuildRequires: rpm-pythonprov |
93287a34 | 28 | BuildRequires: rpmbuild(macros) >= 1.710 |
797e8d54 | 29 | %endif |
b42224b7 JB |
30 | Requires: python-modules >= 1:2.7 |
31 | Requires: python-six | |
ea88bfee | 32 | Obsoletes: python-logilab-astng |
f3ce12d1 KK |
33 | BuildArch: noarch |
34 | BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) | |
35 | ||
00f52389 JK |
36 | # current Python 3.x provides all these |
37 | %define _noautoreq python3egg.backports.functools-lru-cache python3egg.enum34 python3egg.singledispatch | |
38 | ||
f3ce12d1 | 39 | %description |
8dd567ae | 40 | The aim of this module is to provide a common base representation of |
86ae2efd | 41 | Python source code for projects such as pychecker, pyreverse, |
8dd567ae AF |
42 | pylint... Well, actually the development of this library is |
43 | essentially governed by pylint's needs. It used to be called | |
44 | logilab-astng. | |
f3ce12d1 | 45 | |
9522705c JR |
46 | %description -l pl.UTF-8 |
47 | Celem tego modułu jest dostarczenie wspólnej bazowej reprezentacji | |
48 | kodu źródłowego Pythona dla projektów takich jak pychecker, pyreverse, | |
49 | pylint... Właściwie tworzenie tej biblioteki jest istotnie kierowane | |
86ae2efd | 50 | potrzebami pylinta. Dawniej nazywała się logilab-astng. |
8504e807 | 51 | |
797e8d54 | 52 | %package -n python3-%{module} |
424da304 JB |
53 | Summary: An abstract syntax tree for Python 3 with inference support |
54 | Summary(pl.UTF-8): Abstrakcyjnego drzewa składniowe dla Pythona 3 z obsługą wywodu | |
797e8d54 | 55 | Group: Development/Languages/Python |
b42224b7 JB |
56 | Requires: python3-modules >= 1:3.3 |
57 | Requires: python3-six | |
ea88bfee | 58 | Obsoletes: python3-logilab-astng |
797e8d54 JK |
59 | |
60 | %description -n python3-%{module} | |
8dd567ae | 61 | The aim of this module is to provide a common base representation of |
86ae2efd | 62 | Python source code for projects such as pychecker, pyreverse, |
8dd567ae AF |
63 | pylint... Well, actually the development of this library is |
64 | essentially governed by pylint's needs. It used to be called | |
65 | logilab-astng. | |
797e8d54 JK |
66 | |
67 | %description -n python3-%{module} -l pl.UTF-8 | |
68 | Celem tego modułu jest dostarczenie wspólnej bazowej reprezentacji | |
69 | kodu źródłowego Pythona dla projektów takich jak pychecker, pyreverse, | |
70 | pylint... Właściwie tworzenie tej biblioteki jest istotnie kierowane | |
86ae2efd | 71 | potrzebami pylinta. Dawniej nazywała się logilab-astng. |
797e8d54 | 72 | |
f3ce12d1 | 73 | %prep |
abbaad7a | 74 | %setup -q -n %{module}-%{version} |
60fa4681 | 75 | |
f5edbecb | 76 | # drop python 2.5 egg deps |
389dcac9 | 77 | %{__rm} */*/*/*/*/*py2.5.egg |
f3ce12d1 KK |
78 | |
79 | %build | |
797e8d54 | 80 | %if %{with python2} |
08f50e0d | 81 | %py_build |
797e8d54 JK |
82 | %endif |
83 | %if %{with python3} | |
08f50e0d | 84 | %py3_build --build-base=build3 |
797e8d54 | 85 | %endif |
f3ce12d1 KK |
86 | |
87 | %install | |
88 | rm -rf $RPM_BUILD_ROOT | |
89 | ||
797e8d54 | 90 | %if %{with python3} |
cd33eed2 | 91 | %py3_install |
797e8d54 JK |
92 | %endif |
93 | ||
94 | %if %{with python2} | |
08f50e0d | 95 | %py_install |
f3ce12d1 | 96 | |
5a062cc9 | 97 | %py_postclean |
797e8d54 | 98 | %endif |
f3ce12d1 | 99 | |
f3ce12d1 KK |
100 | %clean |
101 | rm -rf $RPM_BUILD_ROOT | |
102 | ||
8f194190 | 103 | %if %{with python2} |
f3ce12d1 KK |
104 | %files |
105 | %defattr(644,root,root,755) | |
00f52389 | 106 | %doc ChangeLog README.rst |
935ded5d AF |
107 | %{py_sitescriptdir}/astroid |
108 | %{py_sitescriptdir}/astroid-%{version}-py*.egg-info | |
8f194190 | 109 | %endif |
797e8d54 | 110 | |
8f194190 | 111 | %if %{with python3} |
797e8d54 JK |
112 | %files -n python3-%{module} |
113 | %defattr(644,root,root,755) | |
00f52389 | 114 | %doc ChangeLog README.rst |
935ded5d AF |
115 | %{py3_sitescriptdir}/astroid |
116 | %{py3_sitescriptdir}/astroid-%{version}-py*.egg-info | |
8f194190 | 117 | %endif |