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