]> git.pld-linux.org Git - packages/python-spark_parser.git/blob - python-spark_parser.spec
5639ec7a2526ca06d7a78a0c854a038ca51f1c8a
[packages/python-spark_parser.git] / python-spark_parser.spec
1 #
2 # Conditional build:
3 %bcond_without  tests   # do not perform "make test"
4 %bcond_without  python2 # CPython 2.x module
5 %bcond_without  python3 # CPython 3.x module
6
7 %define         module          spark_parser
8 %define         egg_name        spark_parser
9 %define         pypi_name       spark_parser
10 Summary:        An Early-Algorithm Context-free grammar Parser
11 Name:           python-%{module}
12 Version:        1.4.0
13 Release:        7
14 License:        MIT
15 Group:          Libraries/Python
16 Source0:        https://files.pythonhosted.org/packages/source/s/%{pypi_name}/%{pypi_name}-%{version}.tar.gz
17 # Source0-md5:  e3c8f2e41572075d9e08daabb5f24253
18 URL:            https://github.com/rocky/python-spark/
19 BuildRequires:  rpm-pythonprov
20 BuildRequires:  rpmbuild(macros) >= 1.714
21 %if %{with python2}
22 BuildRequires:  python-nose >= 1.0
23 BuildRequires:  python-setuptools
24 %endif
25 %if %{with python3}
26 BuildRequires:  python3-nose >= 1.0
27 BuildRequires:  python3-setuptools
28 %endif
29 BuildArch:      noarch
30 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
31
32 %description
33 SPARK stands for Scanning, Parsing, and Rewriting Kit. It uses Jay
34 Early's algorithm for parsing context free grammars, and comes with
35 some generic Abstract Syntax Tree routines. There is also a prototype
36 scanner which does its job by combining Python regular expressions.
37
38 Note: Early algorithm parsers are almost linear when given an LR
39 grammar. These are grammars which are left-recursive.
40
41 %package -n python3-%{module}
42 Summary:        An Early-Algorithm LR Parser
43 Group:          Libraries/Python
44
45 %description -n python3-%{module}
46 SPARK stands for Scanning, Parsing, and Rewriting Kit. It uses Jay
47 Early's algorithm for parsing context free grammars, and comes with
48 some generic Abstract Syntax Tree routines. There is also a prototype
49 scanner which does its job by combining Python regular expressions.
50
51 Note: Early algorithm parsers are almost linear when given an LR
52 grammar. These are grammars which are left-recursive.
53
54 %prep
55 %setup -q -n %{module}-%{version}
56
57 # Remove bundled egg-info
58 %{__rm} -r %{module}.egg-info
59
60 %build
61 %if %{with python2}
62 %py_build %{?with_tests:test}
63 %endif
64
65 %if %{with python3}
66 %py3_build %{?with_tests:test}
67 %endif
68
69 %install
70 rm -rf $RPM_BUILD_ROOT
71 %if %{with python2}
72 %py_install
73 %py_postclean
74 %endif
75
76 %if %{with python3}
77 %py3_install
78 %endif
79
80 %clean
81 rm -rf $RPM_BUILD_ROOT
82
83 %if %{with python3}
84 %files
85 %defattr(644,root,root,755)
86 %doc README.rst LICENSE
87 %{py_sitescriptdir}/%{module}
88 %{py_sitescriptdir}/%{module}-%{version}-py*.egg-info
89 %endif
90
91 %if %{with python3}
92 %files -n python3-%{module}
93 %defattr(644,root,root,755)
94 %doc README.rst LICENSE
95 %{py3_sitescriptdir}/%{module}
96 %{py3_sitescriptdir}/%{module}-%{version}-py*.egg-info
97 %endif
This page took 0.024954 seconds and 2 git commands to generate.