From a9b2b63daef6d399de64e52bffce76199487c362f312c806aee7b8458701679a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tom=C3=A1=C5=A1=20Chv=C3=A1tal?= Date: Thu, 15 Nov 2018 09:08:10 +0000 Subject: [PATCH 1/5] - Update to 2.3.0, see changelog of the main package - Update to 2.3.0: * Updates to migrate source repo to GitHub * Fix deprecation warning in Python 3.7 re: importing collections.abc * Fix Literal/Keyword bug raising IndexError instead of ParseException * Added simple_unit_tests.py, as a collection of easy-to-follow unit * tests for various classes and features of the pyparsing library. * Primary intent is more to be instructional than actually rigorous * testing. Complex tests can still be added in the unitTests.py file. * New features added to the Regex class - Fix URL to point to existing github OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-pyparsing?expand=0&rev=43 --- pyparsing-2.2.0.tar.gz | 3 --- pyparsing-2.3.0.tar.gz | 3 +++ python-pyparsing-doc.changes | 5 +++++ python-pyparsing-doc.spec | 19 +++++++++---------- python-pyparsing.changes | 18 ++++++++++++++++++ python-pyparsing.spec | 13 +++++++------ 6 files changed, 42 insertions(+), 19 deletions(-) delete mode 100644 pyparsing-2.2.0.tar.gz create mode 100644 pyparsing-2.3.0.tar.gz diff --git a/pyparsing-2.2.0.tar.gz b/pyparsing-2.2.0.tar.gz deleted file mode 100644 index f979ca6..0000000 --- a/pyparsing-2.2.0.tar.gz +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:0832bcf47acd283788593e7a0f542407bd9550a55a8a8435214a1960e04bcb04 -size 1232522 diff --git a/pyparsing-2.3.0.tar.gz b/pyparsing-2.3.0.tar.gz new file mode 100644 index 0000000..f6ad3f1 --- /dev/null +++ b/pyparsing-2.3.0.tar.gz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:f353aab21fd474459d97b709e527b5571314ee5f067441dc9f88e33eecd96592 +size 857644 diff --git a/python-pyparsing-doc.changes b/python-pyparsing-doc.changes index 70e8bd6..05fcb6e 100644 --- a/python-pyparsing-doc.changes +++ b/python-pyparsing-doc.changes @@ -1,3 +1,8 @@ +------------------------------------------------------------------- +Thu Nov 15 08:47:24 UTC 2018 - Tomáš Chvátal + +- Update to 2.3.0, see changelog of the main package + ------------------------------------------------------------------- Sat Aug 18 09:41:30 UTC 2018 - Matěj Cepl diff --git a/python-pyparsing-doc.spec b/python-pyparsing-doc.spec index 24b6b63..dcc7439 100644 --- a/python-pyparsing-doc.spec +++ b/python-pyparsing-doc.spec @@ -12,24 +12,23 @@ # license that conforms to the Open Source Definition (Version 1.9) # published by the Open Source Initiative. -# Please submit bugfixes or comments via http://bugs.opensuse.org/ +# Please submit bugfixes or comments via https://bugs.opensuse.org/ # -%define basename python-parsing -%define oldpython python %{?!python_module:%define python_module() python-%{**} python3-%{**}} Name: python-pyparsing-doc -Version: 2.2.0 +Version: 2.3.0 Release: 0 Summary: Grammar Parser Library for Python - Documentation License: MIT AND GPL-2.0-or-later AND GPL-3.0-or-later Group: Development/Libraries/Python -URL: http://pyparsing.wikispaces.com/ +URL: https://github.com/pyparsing/pyparsing/ Source: https://files.pythonhosted.org/packages/source/p/pyparsing/pyparsing-%{version}.tar.gz -BuildRequires: %{python_module base} BuildRequires: %{python_module nose} -Requires: %{basename} = %{version} +BuildRequires: dos2unix +BuildRequires: python-rpm-macros +Requires: python-pyparsing = %{version} BuildArch: noarch %python_subpackages @@ -39,13 +38,13 @@ simple grammars, vs. the traditional lex/yacc approach, or the use of regular expressions. The pyparsing module provides a library of classes that client code uses to construct the grammar directly in Python code. -This package contains the documentation of %{basename} +This package contains the documentation. %prep %setup -q -n pyparsing-%{version} %build -sed -i 's/\r$//' LICENSE examples/* +dos2unix LICENSE examples/* htmldoc/* %install : @@ -55,6 +54,6 @@ sed -i 's/\r$//' LICENSE examples/* %files %{python_files} %license LICENSE -%doc docs/* examples +%doc htmldoc/* examples %changelog diff --git a/python-pyparsing.changes b/python-pyparsing.changes index b6cd5df..3fa1c01 100644 --- a/python-pyparsing.changes +++ b/python-pyparsing.changes @@ -1,3 +1,21 @@ +------------------------------------------------------------------- +Thu Nov 15 08:46:10 UTC 2018 - Tomáš Chvátal + +- Update to 2.3.0: + * Updates to migrate source repo to GitHub + * Fix deprecation warning in Python 3.7 re: importing collections.abc + * Fix Literal/Keyword bug raising IndexError instead of ParseException + * Added simple_unit_tests.py, as a collection of easy-to-follow unit + * tests for various classes and features of the pyparsing library. + * Primary intent is more to be instructional than actually rigorous + * testing. Complex tests can still be added in the unitTests.py file. + * New features added to the Regex class + +------------------------------------------------------------------- +Thu Nov 15 08:45:05 UTC 2018 - Tomáš Chvátal + +- Fix URL to point to existing github + ------------------------------------------------------------------- Sat Aug 18 09:41:30 UTC 2018 - Matěj Cepl diff --git a/python-pyparsing.spec b/python-pyparsing.spec index 0b47875..81fcbbb 100644 --- a/python-pyparsing.spec +++ b/python-pyparsing.spec @@ -12,21 +12,22 @@ # license that conforms to the Open Source Definition (Version 1.9) # published by the Open Source Initiative. -# Please submit bugfixes or comments via http://bugs.opensuse.org/ +# Please submit bugfixes or comments via https://bugs.opensuse.org/ # %define oldpython python %{?!python_module:%define python_module() python-%{**} python3-%{**}} Name: python-pyparsing -Version: 2.2.0 +Version: 2.3.0 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: http://pyparsing.wikispaces.com/ +URL: https://github.com/pyparsing/pyparsing/ Source: https://files.pythonhosted.org/packages/source/p/pyparsing/pyparsing-%{version}.tar.gz BuildRequires: %{python_module base} +BuildRequires: dos2unix BuildRequires: fdupes BuildRequires: python-rpm-macros # do not add dependencies on setuptools and ideally not even full "python"; @@ -47,11 +48,11 @@ code uses to construct the grammar directly in Python code. %prep %setup -q -n pyparsing-%{version} +# Fix wrong EOL encoding: +dos2unix CHANGES LICENSE README.md %build %python_build -# Fix wrong EOL encoding: -sed -i 's/\r$//' CHANGES LICENSE README examples/* %install %python_install @@ -63,7 +64,7 @@ cp -r pyparsing.egg-info %{buildroot}%{$python_sitelib}/pyparsing-%{version}-py% %files %{python_files} %license LICENSE -%doc CHANGES README +%doc CHANGES README.md %{python_sitelib}/pyparsing.py* %pycache_only %{python_sitelib}/__pycache__/* %{python_sitelib}/pyparsing-%{version}-py*.egg-info/ From 3899205e0eaa442edf75f26c2a8857dc5326a1d94abfbc49cb95d81cc4cd7f2a Mon Sep 17 00:00:00 2001 From: Matej Cepl Date: Wed, 21 Nov 2018 16:58:27 +0000 Subject: [PATCH 2/5] - Upgrade to the current upstrem master with additional patches to make the test suite pass. - Add all tests. OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-pyparsing?expand=0&rev=44 --- pyparsing-2.3.0.tar.gz | 3 -- pyparsing-2.3.1~test4.tar.gz | 3 ++ python-pyparsing-doc.changes | 10 ------ python-pyparsing-doc.spec | 59 ------------------------------------ python-pyparsing.changes | 11 +++++++ python-pyparsing.spec | 45 ++++++++++++++++++++++----- 6 files changed, 52 insertions(+), 79 deletions(-) delete mode 100644 pyparsing-2.3.0.tar.gz create mode 100644 pyparsing-2.3.1~test4.tar.gz delete mode 100644 python-pyparsing-doc.changes delete mode 100644 python-pyparsing-doc.spec diff --git a/pyparsing-2.3.0.tar.gz b/pyparsing-2.3.0.tar.gz deleted file mode 100644 index f6ad3f1..0000000 --- a/pyparsing-2.3.0.tar.gz +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:f353aab21fd474459d97b709e527b5571314ee5f067441dc9f88e33eecd96592 -size 857644 diff --git a/pyparsing-2.3.1~test4.tar.gz b/pyparsing-2.3.1~test4.tar.gz new file mode 100644 index 0000000..9b3edcc --- /dev/null +++ b/pyparsing-2.3.1~test4.tar.gz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:606afcd112b68f0cda34441ef8ae35e8579ea3b12a8327e4b95b902fd9858dfc +size 296285 diff --git a/python-pyparsing-doc.changes b/python-pyparsing-doc.changes deleted file mode 100644 index 05fcb6e..0000000 --- a/python-pyparsing-doc.changes +++ /dev/null @@ -1,10 +0,0 @@ -------------------------------------------------------------------- -Thu Nov 15 08:47:24 UTC 2018 - Tomáš Chvátal - -- Update to 2.3.0, see changelog of the main package - -------------------------------------------------------------------- -Sat Aug 18 09:41:30 UTC 2018 - Matěj Cepl - -- Separate python-pyparsing-doc package so that tests can be run - without introducing circular dependency. diff --git a/python-pyparsing-doc.spec b/python-pyparsing-doc.spec deleted file mode 100644 index dcc7439..0000000 --- a/python-pyparsing-doc.spec +++ /dev/null @@ -1,59 +0,0 @@ -# -# spec file for package python-pyparsing-doc -# -# Copyright (c) 2018 SUSE LINUX GmbH, Nuernberg, Germany. -# -# All modifications and additions to the file contributed by third parties -# remain the property of their copyright owners, unless otherwise agreed -# upon. The license for this file, and modifications and additions to the -# file, is the same license as for the pristine package itself (unless the -# license for the pristine package is not an Open Source License, in which -# case the license is the MIT License). An "Open Source License" is a -# license that conforms to the Open Source Definition (Version 1.9) -# published by the Open Source Initiative. - -# Please submit bugfixes or comments via https://bugs.opensuse.org/ -# - - -%{?!python_module:%define python_module() python-%{**} python3-%{**}} -Name: python-pyparsing-doc -Version: 2.3.0 -Release: 0 -Summary: Grammar Parser Library for Python - Documentation -License: MIT AND GPL-2.0-or-later AND GPL-3.0-or-later -Group: Development/Libraries/Python -URL: https://github.com/pyparsing/pyparsing/ -Source: https://files.pythonhosted.org/packages/source/p/pyparsing/pyparsing-%{version}.tar.gz -BuildRequires: %{python_module nose} -BuildRequires: dos2unix -BuildRequires: python-rpm-macros -Requires: python-pyparsing = %{version} -BuildArch: noarch -%python_subpackages - -%description -The pyparsing module is an alternative approach to creating and executing -simple grammars, vs. the traditional lex/yacc approach, or the use of regular -expressions. The pyparsing module provides a library of classes that client -code uses to construct the grammar directly in Python code. - -This package contains the documentation. - -%prep -%setup -q -n pyparsing-%{version} - -%build -dos2unix LICENSE examples/* htmldoc/* - -%install -: - -%check -%python_expand nosetests-%{$python_bin_suffix} -v - -%files %{python_files} -%license LICENSE -%doc htmldoc/* examples - -%changelog diff --git a/python-pyparsing.changes b/python-pyparsing.changes index 3fa1c01..e523025 100644 --- a/python-pyparsing.changes +++ b/python-pyparsing.changes @@ -1,3 +1,14 @@ +------------------------------------------------------------------- +Wed Nov 21 17:48:41 CET 2018 - mcepl@suse.com + +- Upgrade to the current upstrem master with additional patches + to make the test suite pass. + +------------------------------------------------------------------- +Sat Nov 17 22:59:29 CET 2018 - mcepl@suse.com + +- Add all tests. + ------------------------------------------------------------------- Thu Nov 15 08:46:10 UTC 2018 - Tomáš Chvátal diff --git a/python-pyparsing.spec b/python-pyparsing.spec index 81fcbbb..9aba5b7 100644 --- a/python-pyparsing.spec +++ b/python-pyparsing.spec @@ -18,18 +18,26 @@ %define oldpython python %{?!python_module:%define python_module() python-%{**} python3-%{**}} + +%bcond_without test Name: python-pyparsing -Version: 2.3.0 +Version: 2.3.1~test4 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 BuildRequires: %{python_module base} -BuildRequires: dos2unix BuildRequires: fdupes BuildRequires: python-rpm-macros +BuildRequires: python2-unittest2 +BuildRequires: python3-Sphinx +BuildRequires: python3-Sphinx +%if %{with test} +BuildRequires: %{python_module nose} +%endif # do not add dependencies on setuptools and ideally not even full "python"; # this is now a dependency of setuptools Requires: python-base @@ -46,27 +54,50 @@ simple grammars, vs. the traditional lex/yacc approach, or the use of regular expressions. The pyparsing module provides a library of classes that client code uses to construct the grammar directly in Python code. +%package -n %{name}-docs +Summary: Documentation files for %name +Group: Documentation/Other + +%description -n %{name}-docs +HTML Documentation and examples for %name. + %prep -%setup -q -n pyparsing-%{version} -# Fix wrong EOL encoding: -dos2unix CHANGES LICENSE README.md +%setup -q -n pyparsing-2.3.1 %build %python_build +(cd docs/ +make html +) %install +%if ! %{with test} %python_install # ensure egg-info is a directory -%{python_expand rm %{buildroot}%{$python_sitelib}/*.egg-info +%{python_expand rm -rf %{buildroot}%{$python_sitelib}/*.egg-info cp -r pyparsing.egg-info %{buildroot}%{$python_sitelib}/pyparsing-%{version}-py%{$python_version}.egg-info } %python_expand %fdupes %{buildroot}%{$python_sitelib} +%endif + +%check +%if %{with test} +export PYTHONPATH=.:example +%python_exec setup.py nosetests -v +%endif %files %{python_files} +%if ! %{with test} %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/ +%endif + +%files -n %{name}-docs +%if ! %{with test} +%doc examples docs/_build/html/ +%endif %changelog From 501b075884d877f2281a5c8178771940ee377f6b418c482a0a40b92b415e311c Mon Sep 17 00:00:00 2001 From: Matej Cepl Date: Wed, 21 Nov 2018 18:08:02 +0000 Subject: [PATCH 3/5] Fix build OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-pyparsing?expand=0&rev=45 --- _multibuild | 3 +++ pyparsing-2.3.1~test4.tar.gz | 3 --- pyparsing-2.3.1~test5.tar.gz | 3 +++ python-pyparsing.spec | 19 +++++++++++++------ 4 files changed, 19 insertions(+), 9 deletions(-) create mode 100644 _multibuild delete mode 100644 pyparsing-2.3.1~test4.tar.gz create mode 100644 pyparsing-2.3.1~test5.tar.gz diff --git a/_multibuild b/_multibuild new file mode 100644 index 0000000..fcc7b97 --- /dev/null +++ b/_multibuild @@ -0,0 +1,3 @@ + + test + diff --git a/pyparsing-2.3.1~test4.tar.gz b/pyparsing-2.3.1~test4.tar.gz deleted file mode 100644 index 9b3edcc..0000000 --- a/pyparsing-2.3.1~test4.tar.gz +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:606afcd112b68f0cda34441ef8ae35e8579ea3b12a8327e4b95b902fd9858dfc -size 296285 diff --git a/pyparsing-2.3.1~test5.tar.gz b/pyparsing-2.3.1~test5.tar.gz new file mode 100644 index 0000000..3998389 --- /dev/null +++ b/pyparsing-2.3.1~test5.tar.gz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:0f671df9146dbf152a8475cd1703d89909d8e70ad7c33eb706c0dfd7f498e668 +size 590351 diff --git a/python-pyparsing.spec b/python-pyparsing.spec index 9aba5b7..ea06f1d 100644 --- a/python-pyparsing.spec +++ b/python-pyparsing.spec @@ -19,9 +19,18 @@ %define oldpython python %{?!python_module:%define python_module() python-%{**} python3-%{**}} +%global flavor @BUILD_FLAVOR@%{nil} +%if "%{flavor}" == "test" %bcond_without test +%else +%bcond_with test +%endif +%if %{with test} +Name: python-pyparsing-%{flavor} +%else Name: python-pyparsing -Version: 2.3.1~test4 +%endif +Version: 2.3.1~test5 Release: 0 Summary: Grammar Parser Library for Python License: MIT AND GPL-2.0-or-later AND GPL-3.0-or-later @@ -34,7 +43,6 @@ BuildRequires: fdupes BuildRequires: python-rpm-macros BuildRequires: python2-unittest2 BuildRequires: python3-Sphinx -BuildRequires: python3-Sphinx %if %{with test} BuildRequires: %{python_module nose} %endif @@ -66,9 +74,8 @@ HTML Documentation and examples for %name. %build %python_build -(cd docs/ -make html -) +# export PYTHONPATH=..:../examples +python3 setup.py build_sphinx -v %install %if ! %{with test} @@ -97,7 +104,7 @@ export PYTHONPATH=.:example %files -n %{name}-docs %if ! %{with test} -%doc examples docs/_build/html/ +%doc examples build/sphinx/html %endif %changelog From 78908c097d563a4ce875e1509173cb743ca074f94283d9acf6310436c547e0b2 Mon Sep 17 00:00:00 2001 From: Matej Cepl Date: Wed, 21 Nov 2018 18:25:27 +0000 Subject: [PATCH 4/5] Source tarball is not available upstream ATM OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-pyparsing?expand=0&rev=46 --- python-pyparsing.spec | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/python-pyparsing.spec b/python-pyparsing.spec index ea06f1d..9ad7f51 100644 --- a/python-pyparsing.spec +++ b/python-pyparsing.spec @@ -37,7 +37,8 @@ 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 +Source: pyparsing-%{version}.tar.gz +# Source: https://files.pythonhosted.org/packages/source/p/pyparsing/pyparsing-%%{version}.tar.gz BuildRequires: %{python_module base} BuildRequires: fdupes BuildRequires: python-rpm-macros From 91a81470e01390dc547a59770545edccf1ab332ef305d9999ee58c018864cd20 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tom=C3=A1=C5=A1=20Chv=C3=A1tal?= Date: Fri, 23 Nov 2018 07:56:59 +0000 Subject: [PATCH 5/5] Accepting request 651196 from home:jengelh:branches:devel:languages:python - Use more specific RPM group. OBS-URL: https://build.opensuse.org/request/show/651196 OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-pyparsing?expand=0&rev=47 --- python-pyparsing.changes | 5 +++++ python-pyparsing.spec | 2 +- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/python-pyparsing.changes b/python-pyparsing.changes index e523025..c2def46 100644 --- a/python-pyparsing.changes +++ b/python-pyparsing.changes @@ -1,3 +1,8 @@ +------------------------------------------------------------------- +Thu Nov 22 17:53:10 UTC 2018 - Jan Engelhardt + +- Use more specific RPM group. + ------------------------------------------------------------------- Wed Nov 21 17:48:41 CET 2018 - mcepl@suse.com diff --git a/python-pyparsing.spec b/python-pyparsing.spec index 9ad7f51..03e376d 100644 --- a/python-pyparsing.spec +++ b/python-pyparsing.spec @@ -65,7 +65,7 @@ code uses to construct the grammar directly in Python code. %package -n %{name}-docs Summary: Documentation files for %name -Group: Documentation/Other +Group: Documentation/HTML %description -n %{name}-docs HTML Documentation and examples for %name.