]> git.pld-linux.org Git - packages/python-pycparser.git/blob - python-pycparser.spec
15f6b16aee5ecc4977dbb6fa424f6995287498ee
[packages/python-pycparser.git] / python-pycparser.spec
1 #
2 # Conditional build:
3 %bcond_without  python2 # CPython 2.x module
4 %bcond_without  python3 # CPython 3.x module
5 #
6 Summary:        C Parser in Python 2
7 Summary(pl.UTF-8):      Parser języka C w Pythonie 2
8 Name:           python-pycparser
9 Version:        2.14
10 Release:        3
11 License:        BSD
12 Group:          Libraries/Python
13 #Source0Download: https://pypi.python.org/pypi/pycparser
14 Source0:        https://pypi.python.org/packages/source/p/pycparser/pycparser-%{version}.tar.gz
15 # Source0-md5:  a2bc8d28c923b4fe2b2c3b4b51a4f935
16 URL:            https://github.com/eliben/pycparser
17 %if %{with python2}
18 BuildRequires:  python >= 2
19 BuildRequires:  python-modules >= 2
20 %endif
21 %if %{with python3}
22 BuildRequires:  python3 >= 1:3.2
23 BuildRequires:  python3-devel >= 1:3.2
24 %endif
25 BuildRequires:  rpm-pythonprov
26 BuildRequires:  rpmbuild(macros) >= 1.710
27 Requires:       python-modules
28 BuildArch:      noarch
29 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
30
31 %description
32 pycparser is a parser for the C language, written in pure Python. It
33 is a module designed to be easily integrated into applications that
34 need to parse C source code.
35
36 This package contains Python 2 module.
37
38 %description -l pl.UTF-8
39 pycparser to parser języka C napisany w czystym Pythonie. Jest to
40 moduł zaprojektowany tak, aby można go było łatwo zintegrować w
41 aplikacjach wymagających analizy kodu źródłowego w C.
42
43 Ten pakiet zawiera moduł Pythona 2.
44
45 %package -n python3-pycparser
46 Summary:        C Parser in Python 3
47 Summary(pl.UTF-8):      Parser języka C w Pythonie 3
48 Group:          Libraries/Python
49 Requires:       python3-modules
50
51 %description -n python3-pycparser
52 pycparser is a parser for the C language, written in pure Python. It
53 is a module designed to be easily integrated into applications that
54 need to parse C source code.
55
56 This package contains Python 3 module.
57
58 %description -n python3-pycparser -l pl.UTF-8
59 pycparser to parser języka C napisany w czystym Pythonie. Jest to
60 moduł zaprojektowany tak, aby można go było łatwo zintegrować w
61 aplikacjach wymagających analizy kodu źródłowego w C.
62
63 Ten pakiet zawiera moduł Pythona 3.
64
65 %prep
66 %setup -q -n pycparser-%{version}
67
68 %build
69 %if %{with python2}
70 %py_build
71 %endif
72 %if %{with python3}
73 %py3_build
74 %endif
75
76 %install
77 rm -rf $RPM_BUILD_ROOT
78
79 %if %{with python2}
80 %py_install
81
82 %py_postclean
83 %endif
84
85 %if %{with python3}
86 %py3_install
87 %endif
88
89 %clean
90 rm -rf $RPM_BUILD_ROOT
91
92 %if %{with python2}
93 %files
94 %defattr(644,root,root,755)
95 %doc CHANGES LICENSE README.rst
96 %dir %{py_sitescriptdir}/pycparser
97 %{py_sitescriptdir}/pycparser/*.py[co]
98 %{py_sitescriptdir}/pycparser/_c_ast.cfg
99 %dir %{py_sitescriptdir}/pycparser/ply
100 %{py_sitescriptdir}/pycparser/ply/*.py[co]
101 %{py_sitescriptdir}/pycparser-%{version}-py*.egg-info
102 %endif
103
104 %if %{with python3}
105 %files -n python3-pycparser
106 %defattr(644,root,root,755)
107 %doc CHANGES LICENSE README.rst
108 %dir %{py3_sitescriptdir}/pycparser
109 %{py3_sitescriptdir}/pycparser/*.py
110 %{py3_sitescriptdir}/pycparser/_c_ast.cfg
111 %{py3_sitescriptdir}/pycparser/__pycache__
112 %dir %{py3_sitescriptdir}/pycparser/ply
113 %{py3_sitescriptdir}/pycparser/ply/*.py
114 %{py3_sitescriptdir}/pycparser/ply/__pycache__
115 %{py3_sitescriptdir}/pycparser-%{version}-py*.egg-info
116 %endif
This page took 0.082717 seconds and 2 git commands to generate.