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