]> git.pld-linux.org Git - packages/python-ply.git/blame - python-ply.spec
- release 4 (by relup.sh)
[packages/python-ply.git] / python-ply.spec
CommitLineData
46332089 1#
d10e53f5 2# Conditional build:
e2e08d81 3%bcond_without tests # unit/functional tests
d10e53f5
AM
4%bcond_without python2 # CPython 2.x module
5%bcond_without python3 # CPython 3.x module
6#
2bd18aac 7%define module ply
46332089
JB
8Summary: Python 2 Lex-Yacc
9Summary(pl.UTF-8): lex i yacc dla Pythona 2
2bd18aac 10Name: python-%{module}
06de1023 11# note: keep 3.x here for python2 support; for 4+ create python3- .spec instead
e2e08d81 12Version: 3.11
40fdf7df 13Release: 4
a379571a 14License: BSD
2bd18aac 15Group: Libraries/Python
c81e5195 16Source0: http://www.dabeaz.com/ply/ply-%{version}.tar.gz
e2e08d81 17# Source0-md5: 6465f602e656455affcd7c5734c638f8
c81e5195 18URL: http://www.dabeaz.com/ply/
46332089 19BuildRequires: rpmbuild(macros) >= 1.714
d10e53f5 20%if %{with python3}
e2e08d81 21BuildRequires: python >= 1:2.7
820e97e8
JB
22%if %{with tests}
23BuildRequires: python-setuptools
24%endif
d10e53f5
AM
25%endif
26%if %{with python3}
46332089 27BuildRequires: python3 >= 1:3.2
820e97e8
JB
28%if %{with tests}
29BuildRequires: python3-setuptools
30%endif
d10e53f5 31%endif
e2e08d81 32Requires: python-modules >= 1:2.7
46332089 33Obsoletes: ply
2bd18aac
AM
34BuildArch: noarch
35BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
2bd18aac
AM
36
37%description
38PLY is yet another implementation of lex and yacc for Python. Although
39several other parsing tools are available for Python, there are
40several reasons why you might want to take a look at PLY:
41- It uses LR-parsing which is reasonably efficient and well suited for
42 larger grammars.
43- PLY provides most of the standard lex/yacc features including
44 support for empty productions, precedence rules, error recovery, and
45 support for ambiguous grammars.
46- PLY is extremely easy to use and provides very extensive error
47 checking.
48
266bc3e3 49%description -l pl.UTF-8
a379571a
JB
50PLY to kolejna implementacja narzędzi lex i yacc dla Pythona. Mimo iż
51istnieje kilka innych analizatorów dla Pythona, to istnieje kilka
52powodów, dla których można zainteresować się PLY:
53- Używa on analizy LR, która jest w miarę wydajna i dość dobra dla
266bc3e3 54 większych gramatyk.
a379571a 55- Udostępnia większość możliwości standardowych lex/yacc, w tym
69417581
ER
56 obsługę pustych produkcji, reguł poprzedzania, rekompensowania błędów
57 oraz obsługę niejednoznacznych gramatyk.
a379571a 58- Jest niezwykle łatwy w użyciu oraz zapewnia rozległą kontrolę
266bc3e3 59 błędów.
2bd18aac 60
d10e53f5 61%package -n python3-%{module}
46332089
JB
62Summary: Python 3 Lex-Yacc
63Summary(pl.UTF-8): lex i yacc dla Pythona 3
d10e53f5 64Group: Libraries/Python
46332089 65Requires: python3-modules >= 1:3.2
d10e53f5
AM
66
67%description -n python3-%{module}
68PLY is yet another implementation of lex and yacc for Python. Although
69several other parsing tools are available for Python, there are
70several reasons why you might want to take a look at PLY:
71- It uses LR-parsing which is reasonably efficient and well suited for
72 larger grammars.
73- PLY provides most of the standard lex/yacc features including
74 support for empty productions, precedence rules, error recovery, and
75 support for ambiguous grammars.
76- PLY is extremely easy to use and provides very extensive error
77 checking.
78
79%description -n python3-%{module} -l pl.UTF-8
80PLY to kolejna implementacja narzędzi lex i yacc dla Pythona. Mimo iż
81istnieje kilka innych analizatorów dla Pythona, to istnieje kilka
82powodów, dla których można zainteresować się PLY:
83- Używa on analizy LR, która jest w miarę wydajna i dość dobra dla
84 większych gramatyk.
85- Udostępnia większość możliwości standardowych lex/yacc, w tym
86 obsługę pustych produkcji, reguł poprzedzania, rekompensowania błędów
87 oraz obsługę niejednoznacznych gramatyk.
88- Jest niezwykle łatwy w użyciu oraz zapewnia rozległą kontrolę
89 błędów.
90
c81e5195 91%package examples
92Summary: Python Lex-Yacc - examples
e93c130a 93Summary(pl.UTF-8): lex i yacc dla Pythona - przykłady
e55d443e 94Group: Development/Languages/Python
c81e5195 95
96%description examples
97Python Lex-Yacc - examples.
98
266bc3e3
JR
99%description examples -l pl.UTF-8
100lex i yacc dla Pythona - przykłady.
c81e5195 101
2bd18aac
AM
102%prep
103%setup -q -n %{module}-%{version}
104
65d4aff9
JP
105%{__sed} -i -e '1s,/usr/bin/env python,%{__python},' \
106 example/{,new}classcalc/calc.py
107
defeecf3 108%build
d10e53f5
AM
109%if %{with python2}
110%py_build %{?with_tests:test}
111%endif
112
113%if %{with python3}
114%py3_build %{?with_tests:test}
115%endif
116
2bd18aac
AM
117%install
118rm -rf $RPM_BUILD_ROOT
c81e5195 119install -d $RPM_BUILD_ROOT%{_examplesdir}/%{name}-%{version}
2bd18aac 120
d10e53f5
AM
121%if %{with python2}
122%py_install
123%py_ocomp $RPM_BUILD_ROOT%{py_sitedir}
124%py_comp $RPM_BUILD_ROOT%{py_sitedir}
125
c81e5195 126%py_postclean
d10e53f5
AM
127%endif
128
129%if %{with python3}
130%py3_install
131%endif
c81e5195 132
133cp -Rf example/* $RPM_BUILD_ROOT%{_examplesdir}/%{name}-%{version}
2bd18aac 134
2bd18aac
AM
135%clean
136rm -rf $RPM_BUILD_ROOT
137
d10e53f5 138%if %{with python2}
2bd18aac
AM
139%files
140%defattr(644,root,root,755)
d10e53f5 141%doc ANNOUNCE CHANGES README.md TODO doc/*.html
830679cd 142%dir %{py_sitescriptdir}/ply
143%{py_sitescriptdir}/ply/*.py[co]
a379571a
JB
144%{py_sitescriptdir}/ply-%{version}-py*.egg-info
145%endif
d10e53f5
AM
146
147%if %{with python3}
148%files -n python3-%{module}
149%defattr(644,root,root,755)
150%doc ANNOUNCE CHANGES README.md TODO doc/*.html
46332089
JB
151%{py3_sitescriptdir}/ply
152%{py3_sitescriptdir}/ply-%{version}-py*.egg-info
d10e53f5 153%endif
c81e5195 154
155%files examples
156%defattr(644,root,root,755)
157%{_examplesdir}/%{name}-%{version}
This page took 0.105354 seconds and 4 git commands to generate.