]>
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 |
86ae2efd JB |
7 | Summary: Rebuild a new abstract syntax tree from Python's AST |
8 | Summary(pl.UTF-8): Tworzenie nowego abstrakcyjnego drzewa składniowego z pythonowego AST | |
935ded5d | 9 | Name: python-%{module} |
389dcac9 AM |
10 | Version: 1.3.2 |
11 | Release: 1 | |
f33b8242 | 12 | License: LGPL v2.1+ |
f3ce12d1 | 13 | Group: Development/Languages/Python |
8dd567ae | 14 | Source0: https://pypi.python.org/packages/source/a/astroid/astroid-%{version}.tar.gz |
389dcac9 | 15 | # Source0-md5: 2ab96129a977b6eba27765a15d1a9bf2 |
935ded5d | 16 | URL: http://www.astroid.org/ |
797e8d54 | 17 | %if %{with python2} |
f3ce12d1 | 18 | BuildRequires: python-devel |
b3a57614 | 19 | BuildRequires: python-modules >= 1:2.5 |
797e8d54 JK |
20 | %endif |
21 | %if %{with python3} | |
797e8d54 JK |
22 | BuildRequires: python3-2to3 |
23 | BuildRequires: python3-devel | |
24 | BuildRequires: python3-distribute | |
25 | BuildRequires: python3-modules >= 1:3.1 | |
8dd567ae AF |
26 | BuildRequires: rpm-pythonprov |
27 | BuildRequires: rpmbuild(macros) >= 1.219 | |
797e8d54 | 28 | %endif |
86ae2efd | 29 | Requires: python-logilab-common >= 0.60.0 |
8dd567ae | 30 | Requires: python-modules |
ea88bfee | 31 | Obsoletes: python-logilab-astng |
f3ce12d1 KK |
32 | BuildArch: noarch |
33 | BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) | |
34 | ||
35 | %description | |
8dd567ae | 36 | The aim of this module is to provide a common base representation of |
86ae2efd | 37 | Python source code for projects such as pychecker, pyreverse, |
8dd567ae AF |
38 | pylint... Well, actually the development of this library is |
39 | essentially governed by pylint's needs. It used to be called | |
40 | logilab-astng. | |
f3ce12d1 | 41 | |
9522705c JR |
42 | %description -l pl.UTF-8 |
43 | Celem tego modułu jest dostarczenie wspólnej bazowej reprezentacji | |
44 | kodu źródłowego Pythona dla projektów takich jak pychecker, pyreverse, | |
45 | pylint... Właściwie tworzenie tej biblioteki jest istotnie kierowane | |
86ae2efd | 46 | potrzebami pylinta. Dawniej nazywała się logilab-astng. |
8504e807 | 47 | |
797e8d54 | 48 | %package -n python3-%{module} |
86ae2efd JB |
49 | Summary: Rebuild a new abstract syntax tree from Python's AST |
50 | Summary(pl.UTF-8): Tworzenie nowego abstrakcyjnego drzewa składniowego z pythonowego AST | |
797e8d54 | 51 | Group: Development/Languages/Python |
86ae2efd | 52 | Requires: python3-logilab-common >= 0.60.0 |
8dd567ae | 53 | Requires: python3-modules |
ea88bfee | 54 | Obsoletes: python3-logilab-astng |
797e8d54 JK |
55 | |
56 | %description -n python3-%{module} | |
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. | |
797e8d54 JK |
62 | |
63 | %description -n python3-%{module} -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. |
797e8d54 | 68 | |
f3ce12d1 | 69 | %prep |
abbaad7a | 70 | %setup -q -n %{module}-%{version} |
f5edbecb | 71 | # drop python 2.5 egg deps |
389dcac9 | 72 | %{__rm} */*/*/*/*/*py2.5.egg |
f3ce12d1 KK |
73 | |
74 | %build | |
797e8d54 | 75 | %if %{with python2} |
f33b8242 | 76 | %{__python} setup.py build |
797e8d54 JK |
77 | %endif |
78 | %if %{with python3} | |
79 | %{__python3} setup.py build --build-base=build3 | |
80 | %endif | |
f3ce12d1 KK |
81 | |
82 | %install | |
83 | rm -rf $RPM_BUILD_ROOT | |
84 | ||
797e8d54 JK |
85 | %if %{with python3} |
86 | %{__python3} setup.py build --build-base=build3 install \ | |
87 | --optimize=2 \ | |
88 | --root=$RPM_BUILD_ROOT | |
797e8d54 JK |
89 | %endif |
90 | ||
91 | %if %{with python2} | |
f33b8242 | 92 | %{__python} setup.py install \ |
f3ce12d1 KK |
93 | --optimize=2 \ |
94 | --root=$RPM_BUILD_ROOT | |
95 | ||
5a062cc9 | 96 | %py_postclean |
797e8d54 | 97 | %endif |
f3ce12d1 | 98 | |
f3ce12d1 KK |
99 | %clean |
100 | rm -rf $RPM_BUILD_ROOT | |
101 | ||
8f194190 | 102 | %if %{with python2} |
f3ce12d1 KK |
103 | %files |
104 | %defattr(644,root,root,755) | |
105 | %doc ChangeLog README | |
935ded5d AF |
106 | %{py_sitescriptdir}/astroid |
107 | %{py_sitescriptdir}/astroid-%{version}-py*.egg-info | |
8f194190 | 108 | %endif |
797e8d54 | 109 | |
8f194190 | 110 | %if %{with python3} |
797e8d54 JK |
111 | %files -n python3-%{module} |
112 | %defattr(644,root,root,755) | |
113 | %doc ChangeLog README | |
935ded5d AF |
114 | %{py3_sitescriptdir}/astroid |
115 | %{py3_sitescriptdir}/astroid-%{version}-py*.egg-info | |
8f194190 | 116 | %endif |