1{ lib
2, buildPythonPackage
3, fetchPypi
4, python
5}:
6
7buildPythonPackage rec {
8 pname = "ply";
9 version = "3.11";
10
11 src = fetchPypi {
12 inherit pname version;
13 sha256 = "00c7c1aaa88358b9c765b6d3000c6eec0ba42abca5351b095321aef446081da3";
14 };
15
16 checkPhase = ''
17 ${python.interpreter} test/testlex.py
18 ${python.interpreter} test/testyacc.py
19 '';
20
21 # Test suite appears broken
22 doCheck = false;
23
24 meta = {
25 homepage = "http://www.dabeaz.com/ply/";
26 description = "PLY (Python Lex-Yacc), an implementation of the lex and yacc parsing tools for Python";
27 longDescription = ''
28 PLY is an implementation of lex and yacc parsing tools for Python.
29 In a nutshell, PLY is nothing more than a straightforward lex/yacc
30 implementation. Here is a list of its essential features: It's
31 implemented entirely in Python; It uses LR-parsing which is
32 reasonably efficient and well suited for larger grammars; PLY
33 provides most of the standard lex/yacc features including support for
34 empty productions, precedence rules, error recovery, and support for
35 ambiguous grammars; PLY is straightforward to use and provides very
36 extensive error checking; PLY doesn't try to do anything more or less
37 than provide the basic lex/yacc functionality. In other words, it's
38 not a large parsing framework or a component of some larger system.
39 '';
40 license = lib.licenses.bsd3;
41 };
42}