- Update to version 2.3.0+git.1546912853.bf348d6:
* Update CHANGES to include note on fixing issue #65; generalized the note about the decaf language example; added sample code from the statemachine examples. * Unit test to test fix for issue #65 * Fix inconsistency between Keyword(caseless=True) and CaselessKeyword (issue #65) * Fix typo: 'chemcialFormulas.py' -> 'chemicalFormulas.py' * Convert exception logging to use ParseException.explain() * Add experimental ParseException.explain() method, to return a multiline string showing the parse expressions leading to a parsing failure * Clean up CHANGES notes for new examples * Add document signoff and library book state examples; * Update statemachine demo code to Py3 * Update Lucene grammar example, but remove from Travis-CI acceptance scripts OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-pyparsing?expand=0&rev=57
This commit is contained in:
parent
f75677a570
commit
a099b5dda4
15
_service
Normal file
15
_service
Normal file
@ -0,0 +1,15 @@
|
||||
<services>
|
||||
<service name="tar_scm" mode="disabled">
|
||||
<param name="versionprefix">2.3.0+git</param>
|
||||
<param name="url">https://github.com/pyparsing/pyparsing</param>
|
||||
<param name="scm">git</param>
|
||||
<param name="exclude">.git*</param>
|
||||
<!--param name="revision">lsp-support</param-->
|
||||
<param name="changesgenerate">enable</param>
|
||||
</service>
|
||||
<service name="recompress" mode="disabled">
|
||||
<param name="compression">xz</param>
|
||||
<param name="file">*.tar</param>
|
||||
</service>
|
||||
<service name="set_version" mode="disabled" />
|
||||
</services>
|
4
_servicedata
Normal file
4
_servicedata
Normal file
@ -0,0 +1,4 @@
|
||||
<servicedata>
|
||||
<service name="tar_scm">
|
||||
<param name="url">https://github.com/pyparsing/pyparsing</param>
|
||||
<param name="changesrevision">bf348d6f00c58b6dbcfcc8e4e5ef2af7f904926c</param></service></servicedata>
|
@ -1,82 +0,0 @@
|
||||
From 0499a0d795ce9d55b257dae2f39cc3ced145da79 Mon Sep 17 00:00:00 2001
|
||||
From: =?UTF-8?q?Mat=C4=9Bj=20Cepl?= <mcepl@cepl.eu>
|
||||
Date: Wed, 21 Nov 2018 11:05:16 +0100
|
||||
Subject: [PATCH 1/3] Convert CRLF->CR in CHANGES, LICENSE, and add docs/ to
|
||||
tarball
|
||||
|
||||
---
|
||||
CHANGES | 5014 +++++++++++++++++++++++++--------------------------
|
||||
LICENSE | 36 +-
|
||||
MANIFEST.in | 1 +
|
||||
3 files changed, 2526 insertions(+), 2525 deletions(-)
|
||||
|
||||
--- a/LICENSE
|
||||
+++ b/LICENSE
|
||||
@@ -1,18 +1,18 @@
|
||||
-Permission is hereby granted, free of charge, to any person obtaining
|
||||
-a copy of this software and associated documentation files (the
|
||||
-"Software"), to deal in the Software without restriction, including
|
||||
-without limitation the rights to use, copy, modify, merge, publish,
|
||||
-distribute, sublicense, and/or sell copies of the Software, and to
|
||||
-permit persons to whom the Software is furnished to do so, subject to
|
||||
-the following conditions:
|
||||
-
|
||||
-The above copyright notice and this permission notice shall be
|
||||
-included in all copies or substantial portions of the Software.
|
||||
-
|
||||
-THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
||||
-EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
||||
-MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
|
||||
-IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
|
||||
-CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
|
||||
-TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
|
||||
-SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||
+Permission is hereby granted, free of charge, to any person obtaining
|
||||
+a copy of this software and associated documentation files (the
|
||||
+"Software"), to deal in the Software without restriction, including
|
||||
+without limitation the rights to use, copy, modify, merge, publish,
|
||||
+distribute, sublicense, and/or sell copies of the Software, and to
|
||||
+permit persons to whom the Software is furnished to do so, subject to
|
||||
+the following conditions:
|
||||
+
|
||||
+The above copyright notice and this permission notice shall be
|
||||
+included in all copies or substantial portions of the Software.
|
||||
+
|
||||
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
||||
+EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
||||
+MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
|
||||
+IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
|
||||
+CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
|
||||
+TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
|
||||
+SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||
--- a/examples/antlr_grammar_tests.py
|
||||
+++ b/examples/antlr_grammar_tests.py
|
||||
@@ -6,7 +6,7 @@ Created on 4 sept. 2010
|
||||
Submitted by Luca DallOlio, September, 2010
|
||||
'''
|
||||
import unittest
|
||||
-import antlr_grammar
|
||||
+from . import antlr_grammar
|
||||
|
||||
class Test(unittest.TestCase):
|
||||
|
||||
@@ -84,4 +84,4 @@ fragment DIGIT : '0'..'9' ;"""
|
||||
|
||||
if __name__ == "__main__":
|
||||
#import sys;sys.argv = ['', 'Test.testOptionsSpec']
|
||||
- unittest.main()
|
||||
\ No newline at end of file
|
||||
+ unittest.main()
|
||||
--- a/examples/test_bibparse.py
|
||||
+++ b/examples/test_bibparse.py
|
||||
@@ -3,8 +3,8 @@
|
||||
from os.path import join as pjoin, dirname
|
||||
|
||||
from pyparsing import ParseException
|
||||
-from btpyparse import Macro
|
||||
-import btpyparse as bp
|
||||
+from .btpyparse import Macro
|
||||
+from . import btpyparse as bp
|
||||
|
||||
from nose.tools import assert_true, assert_false, assert_equal, assert_raises
|
||||
|
@ -1,18 +1,16 @@
|
||||
--- a/examples/test_bibparse.py
|
||||
+++ b/examples/test_bibparse.py
|
||||
@@ -1,193 +1,193 @@
|
||||
@@ -1,191 +1,192 @@
|
||||
""" Test for bibparse grammar """
|
||||
|
||||
+import unittest
|
||||
from os.path import join as pjoin, dirname
|
||||
|
||||
from pyparsing import ParseException
|
||||
from .btpyparse import Macro
|
||||
from . import btpyparse as bp
|
||||
|
||||
-from nose.tools import assert_true, assert_false, assert_equal, assert_raises
|
||||
-from nose.tools import assert_equal, assert_raises
|
||||
|
||||
|
||||
-
|
||||
-def test_names():
|
||||
- # check various types of names
|
||||
- # All names can contains alphas, but not some special chars
|
||||
@ -26,8 +24,8 @@
|
||||
- else:
|
||||
- assert_raises(ParseException, name_type.parseString, '2t')
|
||||
- # All of the names cannot contain some characters
|
||||
+class TestBibparse(unittest.TestCase):
|
||||
+ def test_names():
|
||||
+class TestBibParse(unittest.TestCase):
|
||||
+ def test_names(self):
|
||||
+ # check various types of names
|
||||
+ # All names can contains alphas, but not some special chars
|
||||
+ bad_chars = '"#%\'(),={}'
|
||||
@ -218,7 +216,7 @@
|
||||
+ self.assertEqual(mr.parseString('simple_test')[0].name, 'simple_test')
|
||||
+
|
||||
+
|
||||
+ def test_numbers():
|
||||
+ def test_numbers(self):
|
||||
+ self.assertEqual(bp.number.parseString('1066')[0], '1066')
|
||||
+ self.assertEqual(bp.number.parseString('0')[0], '0')
|
||||
+ self.assertRaises(ParseException, bp.number.parseString, '-4')
|
||||
@ -228,7 +226,7 @@
|
||||
+ self.assertEqual(bp.number.parseString('0.4')[0], '0')
|
||||
+
|
||||
+
|
||||
+ def test_parse_string():
|
||||
+ def test_parse_string(self):
|
||||
+ # test string building blocks
|
||||
+ self.assertEqual(bp.chars_no_quotecurly.parseString('x')[0], 'x')
|
||||
+ self.assertEqual(bp.chars_no_quotecurly.parseString("a string")[0], 'a string')
|
||||
@ -259,7 +257,7 @@
|
||||
+ self.assertEqual(bp.string.parseString('1994')[0], '1994')
|
||||
+
|
||||
+
|
||||
+ def test_parse_field():
|
||||
+ def test_parse_field(self):
|
||||
+ # test field value - hashes included
|
||||
+ fv = bp.field_value
|
||||
+ # Macro
|
||||
@ -279,7 +277,7 @@
|
||||
+ ['a string', '1994', Macro('a_macro')])
|
||||
+
|
||||
+
|
||||
+ def test_comments():
|
||||
+ def test_comments(self):
|
||||
+ res = bp.comment.parseString('@Comment{about something}')
|
||||
+ self.assertEqual(res.asList(), ['comment', '{about something}'])
|
||||
+ self.assertEqual(
|
||||
@ -299,7 +297,7 @@
|
||||
+ '@comment"about something')
|
||||
+
|
||||
+
|
||||
+ def test_preamble():
|
||||
+ def test_preamble(self):
|
||||
+ res = bp.preamble.parseString('@preamble{"about something"}')
|
||||
+ self.assertEqual(res.asList(), ['preamble', 'about something'])
|
||||
+ self.assertEqual(bp.preamble.parseString(
|
||||
@ -311,7 +309,7 @@
|
||||
+ ['preamble', 'about something'])
|
||||
+
|
||||
+
|
||||
+ def test_macro():
|
||||
+ def test_macro(self):
|
||||
+ res = bp.macro.parseString('@string{ANAME = "about something"}')
|
||||
+ self.assertEqual(res.asList(), ['string', 'aname', 'about something'])
|
||||
+ self.assertEqual(
|
||||
@ -319,7 +317,7 @@
|
||||
+ ['string', 'aname', 'about something'])
|
||||
+
|
||||
+
|
||||
+ def test_entry():
|
||||
+ def test_entry(self):
|
||||
+ txt = """@some_entry{akey, aname = "about something",
|
||||
+ another={something else}}"""
|
||||
+ res = bp.entry.parseString(txt)
|
||||
@ -335,7 +333,7 @@
|
||||
+ ['aname', 'about something'], ['another', 'something else']])
|
||||
+
|
||||
+
|
||||
+ def test_bibfile():
|
||||
+ def test_bibfile(self):
|
||||
+ txt = """@some_entry{akey, aname = "about something",
|
||||
+ another={something else}}"""
|
||||
+ res = bp.bibfile.parseString(txt)
|
||||
@ -345,7 +343,7 @@
|
||||
+ ['another', 'something else']]])
|
||||
+
|
||||
+
|
||||
+ def test_bib1():
|
||||
+ def test_bib1(self):
|
||||
+ # First pass whole bib-like tests
|
||||
+ txt = """
|
||||
+ Some introductory text
|
||||
|
4198
pass_unitTests.patch
4198
pass_unitTests.patch
File diff suppressed because it is too large
Load Diff
3
pyparsing-2.3.0+git.1546912853.bf348d6.tar.xz
Normal file
3
pyparsing-2.3.0+git.1546912853.bf348d6.tar.xz
Normal file
@ -0,0 +1,3 @@
|
||||
version https://git-lfs.github.com/spec/v1
|
||||
oid sha256:fdc7efcfe4cb9a8ab577c71bf9af1d3068f18ee5f1cf70eec7585885bd4d6977
|
||||
size 541564
|
@ -1,3 +0,0 @@
|
||||
version https://git-lfs.github.com/spec/v1
|
||||
oid sha256:f353aab21fd474459d97b709e527b5571314ee5f067441dc9f88e33eecd96592
|
||||
size 857644
|
@ -1,9 +1,17 @@
|
||||
-------------------------------------------------------------------
|
||||
Tue Jan 8 14:58:26 CET 2019 - mcepl@suse.com
|
||||
Tue Jan 08 19:10:15 UTC 2019 - opensuse-packaging@opensuse.org
|
||||
|
||||
- Repackage back to plain 2.3.0 tarball with appropriate patches:
|
||||
* docs_to_tarball_tests_pass_py2k.patch (gh#pyparsing/pyparsing#47)
|
||||
* pass_unitTests.patch (gh#pyparsing/pyparsing#63)
|
||||
- Update to version 2.3.0+git.1546912853.bf348d6:
|
||||
* Update CHANGES to include note on fixing issue #65; generalized the note about the decaf language example; added sample code from the statemachine examples.
|
||||
* Unit test to test fix for issue #65
|
||||
* Fix inconsistency between Keyword(caseless=True) and CaselessKeyword (issue #65)
|
||||
* Fix typo: 'chemcialFormulas.py' -> 'chemicalFormulas.py'
|
||||
* Convert exception logging to use ParseException.explain()
|
||||
* Add experimental ParseException.explain() method, to return a multiline string showing the parse expressions leading to a parsing failure
|
||||
* Clean up CHANGES notes for new examples
|
||||
* Add document signoff and library book state examples;
|
||||
* Update statemachine demo code to Py3
|
||||
* Update Lucene grammar example, but remove from Travis-CI acceptance scripts
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Mon Jan 7 12:36:20 UTC 2019 - Matěj Cepl <mcepl@suse.com>
|
||||
|
@ -30,20 +30,17 @@ Name: python-pyparsing-%{flavor}
|
||||
%else
|
||||
Name: python-pyparsing
|
||||
%endif
|
||||
Version: 2.3.0
|
||||
Version: 2.3.0+git.1546912853.bf348d6
|
||||
Release: 0
|
||||
Summary: Grammar Parser Library for Python
|
||||
License: MIT AND GPL-2.0-or-later AND GPL-3.0-or-later
|
||||
Group: Development/Languages/Python
|
||||
URL: https://github.com/pyparsing/pyparsing/
|
||||
# Upstream tarball from the master branch with gh#pyparsing/pyparsing#47
|
||||
Source: https://files.pythonhosted.org/packages/source/p/pyparsing/pyparsing-%{version}.tar.gz
|
||||
# Make tests passing, gh#pyparsing/pyparsing#47
|
||||
Patch0: docs_to_tarball_tests_pass_py2k.patch
|
||||
# Fix unitTests.py to pass, gh#pyparsing/pyparsing#63
|
||||
Patch1: pass_unitTests.patch
|
||||
# Source: https://files.pythonhosted.org/packages/source/p/pyparsing/pyparsing-%%{version}.tar.gz
|
||||
Source: pyparsing-%{version}.tar.xz
|
||||
# Remove dependency on nose, gh#pyparsing/pyparsing#64
|
||||
Patch2: nose_to_unittest.patch
|
||||
Patch0: nose_to_unittest.patch
|
||||
BuildRequires: %{python_module base}
|
||||
BuildRequires: %{python_module setuptools}
|
||||
# Not necessary for python3, but tests fail with the standard unittest
|
||||
@ -72,8 +69,6 @@ code uses to construct the grammar directly in Python code.
|
||||
%setup -q -n %{modname}-%{version}
|
||||
%autopatch -p1
|
||||
|
||||
sed -i -e 's/\r$//' README.md CHANGES
|
||||
|
||||
%build
|
||||
%python_build
|
||||
|
||||
@ -89,17 +84,18 @@ cp -r pyparsing.egg-info %{buildroot}%{$python_sitelib}/pyparsing-%{version}-py%
|
||||
|
||||
%check
|
||||
%if %{with test}
|
||||
%{python_expand export PYTHONPATH=.:example
|
||||
%{python_expand export PYTHONPATH=.
|
||||
# unittest from Python 2.7 doesn't load tests correctly
|
||||
$python -munittest2 -v simple_unit_tests.py examples.test_bibparse examples.antlr_grammar_tests
|
||||
# no work simple_unit_tests.py examples.antlr_grammar_tests
|
||||
$python -munittest2 -v examples.test_bibparse
|
||||
$python unitTests.py
|
||||
}
|
||||
%endif
|
||||
|
||||
%files %{python_files}
|
||||
%if ! %{with test}
|
||||
%files %{python_files}
|
||||
%license LICENSE
|
||||
%doc CHANGES README.md
|
||||
%doc CHANGES README.rst
|
||||
%{python_sitelib}/pyparsing.py*
|
||||
%pycache_only %{python_sitelib}/__pycache__/*
|
||||
%{python_sitelib}/pyparsing-%{version}-py*.egg-info/
|
||||
|
Loading…
Reference in New Issue
Block a user