summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorHyunjee Kim <hj0426.kim@samsung.com>2020-04-10 13:10:53 +0900
committerHyunjee Kim <hj0426.kim@samsung.com>2020-04-10 13:12:27 +0900
commitd153b8722dc9037e6223f5994020650064cf40df (patch)
tree561410e5c8b076fd588dc8c946ec583b7b009ea7
parentd9efd3b770ee34e25e88c11a3510d85cdf3a4dbb (diff)
downloadpython3-ply-accepted/tizen_7.0_base_hotfix.tar.gz
python3-ply-accepted/tizen_7.0_base_hotfix.tar.bz2
python3-ply-accepted/tizen_7.0_base_hotfix.zip
Change-Id: I908df4dbd7a71de8f3d445aef2d93e5f729422e9 Signed-off-by: Hyunjee Kim <hj0426.kim@samsung.com>
-rw-r--r--LICENSE25
-rw-r--r--packaging/python3-ply.manifest5
-rw-r--r--packaging/python3-ply.spec54
3 files changed, 84 insertions, 0 deletions
diff --git a/LICENSE b/LICENSE
new file mode 100644
index 0000000..1f9254b
--- /dev/null
+++ b/LICENSE
@@ -0,0 +1,25 @@
+Redistribution and use in source and binary forms, with or without
+modification, are permitted provided that the following conditions
+are met:
+
+1. Redistributions of source code must retain the above copyright
+ notice, this list of conditions and the following disclaimer.
+
+2. Redistributions in binary form must reproduce the above copyright
+ notice, this list of conditions and the following disclaimer in the
+ documentation and/or other materials provided with the distribution.
+
+3. The name of the author may not be used to endorse or promote products
+ derived from this software without specific prior written permission.
+
+THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
+IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT,
+INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
+SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
+STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING
+IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
+POSSIBILITY OF SUCH DAMAGE.
diff --git a/packaging/python3-ply.manifest b/packaging/python3-ply.manifest
new file mode 100644
index 0000000..017d22d
--- /dev/null
+++ b/packaging/python3-ply.manifest
@@ -0,0 +1,5 @@
+<manifest>
+ <request>
+ <domain name="_"/>
+ </request>
+</manifest>
diff --git a/packaging/python3-ply.spec b/packaging/python3-ply.spec
new file mode 100644
index 0000000..6640258
--- /dev/null
+++ b/packaging/python3-ply.spec
@@ -0,0 +1,54 @@
+Name: python3-ply
+Version: 3.11
+Release: 0
+Summary: Python Lex & Yacc
+License: BSD-3-Clause
+Group: Development/Languages/Python
+URL: http://www.dabeaz.com/ply/
+Source: https://files.pythonhosted.org/packages/source/p/ply/ply-%{version}.tar.gz
+Source1001: python3-ply.manifest
+BuildRequires: python3-setuptools
+BuildRequires: fdupes
+BuildArch: noarch
+
+%description
+PLY is yet another implementation of lex and yacc for Python. Some notable
+features include the fact that its implemented entirely in Python and it
+uses LALR(1) parsing which is efficient and well suited for larger grammars.
+
+PLY provides most of the standard lex/yacc features including support for empty
+productions, precedence rules, error recovery, and support for ambiguous grammars.
+
+PLY provides extensive error checking.
+It is compatible with both Python 2 and Python 3.
+
+%prep
+%setup -q -n ply-%{version}
+cp %{SOURCE1001} .
+# remove unneeded executable bit
+chmod -x test/testlex.py
+
+# Fix wrong-script-interpreter
+find example -type f -name "*.py" -exec sed -i "s|#!%{_bindir}/env python3||" {} +
+
+%fdupes example
+
+%build
+%{_bindir}/python3 setup.py build
+
+%install
+%{_bindir}/python3 setup.py install --prefix=%{_prefix} --root=%{buildroot}
+%fdupes %{buildroot}%{python3_sitelib}
+
+%check
+pushd test
+PYTHONPATH=%{buildroot}%{$python3_sitelib}
+%{_bindir}/python3 -B testlex.py
+%{_bindir}/python3 -B testyacc.py
+popd
+
+%files
+%manifest %{name}.manifest
+%license LICENSE
+# yay for upstream that puts the license to readme
+%{python3_sitelib}/*