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