1 | ### remark: as soon as setuptools is done, enable it here also !!!
|
---|
2 |
|
---|
3 |
|
---|
4 | %global srcname pyparsing
|
---|
5 | %global sum Python package with an object-oriented approach to text processing
|
---|
6 |
|
---|
7 | %global build_wheel 0
|
---|
8 | %global with_python3 0
|
---|
9 |
|
---|
10 | %global python2_wheelname %{srcname}-%{version}-py2.py3-none-any.whl
|
---|
11 | %global python3_wheelname %python2_wheelname
|
---|
12 |
|
---|
13 | Summary: %{sum}
|
---|
14 | Name: pyparsing
|
---|
15 | Version: 2.1.10
|
---|
16 | Release: 2%{?dist}
|
---|
17 |
|
---|
18 | License: MIT
|
---|
19 | URL: http://pyparsing.wikispaces.com/
|
---|
20 | Vendor: bww bitwise works GmbH
|
---|
21 | %scm_source github https://github.com/bitwiseworks/%{srcname}-os2 %{version}-os2
|
---|
22 |
|
---|
23 | BuildArch: noarch
|
---|
24 | BuildRequires: dos2unix
|
---|
25 | BuildRequires: python2-devel
|
---|
26 | #BuildRequires: python2-setuptools
|
---|
27 | %if 0%{?with_python3}
|
---|
28 | BuildRequires: python3-devel
|
---|
29 | BuildRequires: python3-setuptools
|
---|
30 | %endif
|
---|
31 |
|
---|
32 | %if 0%{?build_wheel}
|
---|
33 | BuildRequires: python2-pip
|
---|
34 | BuildRequires: python-wheel
|
---|
35 | BuildRequires: python%{python3_pkgversion}-pip
|
---|
36 | BuildRequires: python%{python3_pkgversion}-wheel
|
---|
37 | %endif
|
---|
38 |
|
---|
39 | Requires: python-%{srcname} = %{version}-%{release}
|
---|
40 |
|
---|
41 | %description
|
---|
42 | pyparsing is a module that can be used to easily and directly configure syntax
|
---|
43 | definitions for any number of text parsing applications.
|
---|
44 |
|
---|
45 |
|
---|
46 | %package doc
|
---|
47 | Summary: Documentation for pyparsing python package
|
---|
48 |
|
---|
49 | %description doc
|
---|
50 | The package contains documentation for pyparsing.
|
---|
51 |
|
---|
52 |
|
---|
53 | %package -n python2-%{srcname}
|
---|
54 | Summary: %{sum}
|
---|
55 | %{?python_provide:%python_provide python2-%{srcname}}
|
---|
56 |
|
---|
57 | %description -n python2-pyparsing
|
---|
58 | pyparsing is a module that can be used to easily and directly configure syntax
|
---|
59 | definitions for any number of text parsing applications.
|
---|
60 |
|
---|
61 |
|
---|
62 | %if 0%{?with_python3}
|
---|
63 | %package -n python3-pyparsing
|
---|
64 | Summary: %{sum}
|
---|
65 | %{?python_provide:%python_provide python3-%{srcname}}
|
---|
66 |
|
---|
67 | %description -n python3-pyparsing
|
---|
68 | pyparsing is a module that can be used to easily and directly configure syntax
|
---|
69 | definitions for any number of text parsing applications.
|
---|
70 |
|
---|
71 | This is the Python 3 version.
|
---|
72 | %endif
|
---|
73 |
|
---|
74 |
|
---|
75 | %prep
|
---|
76 | %scm_setup
|
---|
77 | #mv docs/pyparsingClassDiagram.PNG docs/pyparsingClassDiagram.png
|
---|
78 | rm docs/pyparsingClassDiagram.JPG
|
---|
79 | dos2unix -k CHANGES LICENSE README
|
---|
80 |
|
---|
81 | %build
|
---|
82 | %if 0%{?build_wheel}
|
---|
83 | %py2_build_wheel
|
---|
84 | %else
|
---|
85 | %py2_build
|
---|
86 | %endif
|
---|
87 | %if 0%{?with_python3}
|
---|
88 | %if 0%{?build_wheel}
|
---|
89 | %py3_build_wheel
|
---|
90 | %else
|
---|
91 | %py3_build
|
---|
92 | %endif
|
---|
93 | %endif
|
---|
94 |
|
---|
95 | %install
|
---|
96 | %if 0%{?build_wheel}
|
---|
97 | %py2_install_wheel %{python2_wheelname}
|
---|
98 | %else
|
---|
99 | %py2_install
|
---|
100 | %endif
|
---|
101 | %if 0%{?with_python3}
|
---|
102 | %if 0%{?build_wheel}
|
---|
103 | %py3_install_wheel %{python3_wheelname}
|
---|
104 | %else
|
---|
105 | %py3_install
|
---|
106 | %endif
|
---|
107 | %endif
|
---|
108 |
|
---|
109 | %files
|
---|
110 |
|
---|
111 | %files -n python2-pyparsing
|
---|
112 | %license LICENSE
|
---|
113 | %doc CHANGES README
|
---|
114 | %{python2_sitelib}/*
|
---|
115 |
|
---|
116 | %if 0%{?with_python3}
|
---|
117 | %files -n python3-pyparsing
|
---|
118 | %license LICENSE
|
---|
119 | %doc CHANGES README LICENSE
|
---|
120 | %{python3_sitelib}/pyparsing.py
|
---|
121 | %{python3_sitelib}/__pycache__/*
|
---|
122 | %{python3_sitelib}/pyparsing-*dist-info/
|
---|
123 | %endif
|
---|
124 |
|
---|
125 | %files doc
|
---|
126 | %license LICENSE
|
---|
127 | %doc CHANGES README HowToUsePyparsing.html docs examples htmldoc
|
---|
128 |
|
---|
129 | %changelog
|
---|
130 | * Thu Apr 13 2017 Silvan Scherrer <silvan.scherrer@aroa.ch> 2.1.10-2
|
---|
131 | - moved source to github
|
---|
132 |
|
---|
133 | * Mon Feb 27 2017 Silvan Scherrer <silvan.scherrer@aroa.ch> 2.1.10-1
|
---|
134 | - first rpm version (internal version only)
|
---|