Accepting request 651320 from devel:languages:python

OBS-URL: https://build.opensuse.org/request/show/651320
OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/python-pyparsing?expand=0&rev=28
This commit is contained in:
Dominique Leuenberger 2018-11-26 09:14:58 +00:00 committed by Git OBS Bridge
commit 07d4df157e
7 changed files with 89 additions and 77 deletions

3
_multibuild Normal file
View File

@ -0,0 +1,3 @@
<multibuild>
<package>test</package>
</multibuild>

View File

@ -1,3 +0,0 @@
version https://git-lfs.github.com/spec/v1
oid sha256:0832bcf47acd283788593e7a0f542407bd9550a55a8a8435214a1960e04bcb04
size 1232522

View File

@ -0,0 +1,3 @@
version https://git-lfs.github.com/spec/v1
oid sha256:0f671df9146dbf152a8475cd1703d89909d8e70ad7c33eb706c0dfd7f498e668
size 590351

View File

@ -1,5 +0,0 @@
-------------------------------------------------------------------
Sat Aug 18 09:41:30 UTC 2018 - Matěj Cepl <mcepl@suse.com>
- Separate python-pyparsing-doc package so that tests can be run
without introducing circular dependency.

View File

@ -1,60 +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 http://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
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/
Source: https://files.pythonhosted.org/packages/source/p/pyparsing/pyparsing-%{version}.tar.gz
BuildRequires: %{python_module base}
BuildRequires: %{python_module nose}
Requires: %{basename} = %{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 of %{basename}
%prep
%setup -q -n pyparsing-%{version}
%build
sed -i 's/\r$//' LICENSE examples/*
%install
:
%check
%python_expand nosetests-%{$python_bin_suffix} -v
%files %{python_files}
%license LICENSE
%doc docs/* examples
%changelog

View File

@ -1,3 +1,37 @@
-------------------------------------------------------------------
Thu Nov 22 17:53:10 UTC 2018 - Jan Engelhardt <jengelh@inai.de>
- Use more specific RPM group.
-------------------------------------------------------------------
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 <tchvatal@suse.com>
- 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 <tchvatal@suse.com>
- Fix URL to point to existing github
-------------------------------------------------------------------
Sat Aug 18 09:41:30 UTC 2018 - Matěj Cepl <mcepl@suse.com>

View File

@ -12,23 +12,41 @@
# 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-%{**}}
%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.2.0
%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
Group: Development/Languages/Python
URL: http://pyparsing.wikispaces.com/
Source: https://files.pythonhosted.org/packages/source/p/pyparsing/pyparsing-%{version}.tar.gz
URL: https://github.com/pyparsing/pyparsing/
# Upstream tarball from the master branch with gh#pyparsing/pyparsing#47
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
BuildRequires: python2-unittest2
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
@ -45,27 +63,49 @@ 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/HTML
%description -n %{name}-docs
HTML Documentation and examples for %name.
%prep
%setup -q -n pyparsing-%{version}
%setup -q -n pyparsing-2.3.1
%build
%python_build
# Fix wrong EOL encoding:
sed -i 's/\r$//' CHANGES LICENSE README examples/*
# export PYTHONPATH=..:../examples
python3 setup.py build_sphinx -v
%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
%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 build/sphinx/html
%endif
%changelog