]> git.pld-linux.org Git - packages/python-astroid.git/blob - python-astroid.spec
f1733b4c9b8595c5d50ddee95ebc31c6e196ddd4
[packages/python-astroid.git] / python-astroid.spec
1 #
2 # Conditional build:
3 %bcond_without  python2 # Python 2.x module
4 %bcond_without  python3 # Python 3.x module
5
6 %define module  astroid
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
9 Name:           python-%{module}
10 Version:        1.1.1
11 Release:        2
12 License:        LGPL v2.1+
13 Group:          Development/Languages/Python
14 Source0:        https://pypi.python.org/packages/source/a/astroid/astroid-%{version}.tar.gz
15 # Source0-md5:  b8153df72670f62bd8d6bc8be99cd184
16 URL:            http://www.astroid.org/
17 %if %{with python2}
18 BuildRequires:  python-devel
19 BuildRequires:  python-modules >= 1:2.5
20 %endif
21 %if %{with python3}
22 BuildRequires:  python3-2to3
23 BuildRequires:  python3-devel
24 BuildRequires:  python3-distribute
25 BuildRequires:  python3-modules >= 1:3.1
26 BuildRequires:  rpm-pythonprov
27 BuildRequires:  rpmbuild(macros) >= 1.219
28 %endif
29 Requires:       python-logilab-common >= 0.60.0
30 Requires:       python-modules
31 Obsoletes:      python-logilab-astng
32 BuildArch:      noarch
33 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
34
35 %description
36 The aim of this module is to provide a common base representation of
37 Python source code for projects such as pychecker, pyreverse,
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.
41
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
46 potrzebami pylinta. Dawniej nazywała się logilab-astng.
47
48 %package -n python3-%{module}
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
51 Group:          Development/Languages/Python
52 Requires:       python3-logilab-common >= 0.60.0
53 Requires:       python3-modules
54 Obsoletes:      python3-logilab-astng
55
56 %description -n python3-%{module}
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 -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
67 potrzebami pylinta. Dawniej nazywała się logilab-astng.
68
69 %prep
70 %setup -q -n %{module}-%{version}
71 # drop python 2.5 egg deps
72 %{__rm} */*/*py2.5.egg
73
74 %build
75 %if %{with python2}
76 %{__python} setup.py build
77 %endif
78 %if %{with python3}
79 %{__python3} setup.py build --build-base=build3
80 %endif
81
82 %install
83 rm -rf $RPM_BUILD_ROOT
84
85 %if %{with python3}
86 %{__python3} setup.py build --build-base=build3 install \
87         --optimize=2 \
88         --root=$RPM_BUILD_ROOT
89 %endif
90
91 %if %{with python2}
92 %{__python} setup.py install \
93         --optimize=2 \
94         --root=$RPM_BUILD_ROOT
95
96 %py_postclean
97 %endif
98
99 %clean
100 rm -rf $RPM_BUILD_ROOT
101
102 %if %{with python2}
103 %files
104 %defattr(644,root,root,755)
105 %doc ChangeLog README
106 %{py_sitescriptdir}/astroid
107 %{py_sitescriptdir}/astroid-%{version}-py*.egg-info
108 %endif
109
110 %if %{with python3}
111 %files -n python3-%{module}
112 %defattr(644,root,root,755)
113 %doc ChangeLog README
114 %{py3_sitescriptdir}/astroid
115 %{py3_sitescriptdir}/astroid-%{version}-py*.egg-info
116 %endif
This page took 0.068777 seconds and 2 git commands to generate.