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