From ce0969ee9a722d51f7ded3f67515eb4f60af1a9add6be09f3504ce767de82157 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tom=C3=A1=C5=A1=20Chv=C3=A1tal?= Date: Thu, 23 Aug 2018 11:18:12 +0000 Subject: [PATCH] - Version update to 1.3: * support py3 * tests redone in pytest - Run all tests - Switch to singlespec OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-Parsley?expand=0&rev=6 --- Parsley-1.2.tar.gz | 3 -- Parsley-1.3.tar.gz | 3 ++ python-Parsley.changes | 10 +++++ python-Parsley.spec | 85 +++++++++++++++--------------------------- 4 files changed, 43 insertions(+), 58 deletions(-) delete mode 100644 Parsley-1.2.tar.gz create mode 100644 Parsley-1.3.tar.gz diff --git a/Parsley-1.2.tar.gz b/Parsley-1.2.tar.gz deleted file mode 100644 index f8fe718..0000000 --- a/Parsley-1.2.tar.gz +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:50d30cee70770fd44db7cea421cb2fb75af247c3a1cd54885c06b30a7c85dd23 -size 275181 diff --git a/Parsley-1.3.tar.gz b/Parsley-1.3.tar.gz new file mode 100644 index 0000000..49b7c13 --- /dev/null +++ b/Parsley-1.3.tar.gz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:9444278d47161d5f2be76a767809a3cbe6db4db822f46a4fd7481d4057208d41 +size 99616 diff --git a/python-Parsley.changes b/python-Parsley.changes index 89caaff..4e1ad4d 100644 --- a/python-Parsley.changes +++ b/python-Parsley.changes @@ -1,3 +1,13 @@ +------------------------------------------------------------------- +Thu Aug 23 11:17:06 UTC 2018 - tchvatal@suse.com + +- Version update to 1.3: + * support py3 + * tests redone in pytest +- Run all tests +- Switch to singlespec +- Do not generate the docu and obsolete the doc subpkg + ------------------------------------------------------------------- Sun Jun 7 17:32:45 UTC 2015 - nemysis@gmx.ch diff --git a/python-Parsley.spec b/python-Parsley.spec index 50f1ac6..2c16e9f 100644 --- a/python-Parsley.spec +++ b/python-Parsley.spec @@ -1,7 +1,7 @@ # # spec file for package python-Parsley # -# Copyright (c) 2015 SUSE LINUX GmbH, Nuernberg, Germany. +# Copyright (c) 2018 SUSE LINUX GmbH, Nuernberg, Germany. # Copyright (c) 2013 LISA GmbH, Bingen, Germany. # # All modifications and additions to the file contributed by third parties @@ -18,30 +18,25 @@ %define oname Parsley - +%define oldpython python Name: python-Parsley -Version: 1.2 +Version: 1.3 Release: 0 Summary: Parsing and pattern matching made easy License: MIT Group: Development/Libraries/Python -Url: http://github.com/washort/parsley +URL: http://github.com/washort/parsley Source: https://pypi.python.org/packages/source/P/%{oname}/%{oname}-%{version}.tar.gz -%if 0%{?suse_version} +BuildRequires: %{python_module Twisted} +BuildRequires: %{python_module pytest} +BuildRequires: %{python_module setuptools} BuildRequires: fdupes -%endif -# Documentation requirements: -BuildRequires: python-Sphinx -# Testing requirements: -BuildRequires: python-Twisted -BuildRequires: python-setuptools -BuildRoot: %{_tmppath}/%{name}-%{version}-build - -%if 0%{?suse_version} && 0%{?suse_version} <= 1110 -%{!?python_sitelib: %global python_sitelib %(python -c "from distutils.sysconfig import get_python_lib; print get_python_lib()")} -%else +BuildRequires: python-rpm-macros +Provides: python-parsley +Obsoletes: %{oldpython}-Parsley-doc +Obsoletes: python-Parsley-doc BuildArch: noarch -%endif +%python_subpackages %description Parsley is a parsing library for people who find parsers scary or annoying. I @@ -58,58 +53,38 @@ bison or PLY. The binaries are prefixed with parsley-. -%package doc -Summary: Parsing and pattern matching made easy -Group: Development/Libraries/Python -Requires: %{name} = %{version} - -%description doc -This package contains documentation files for %{name}. - %prep %setup -q -n %{oname}-%{version} +# Remove with bump, missing fixtures +rm -f ometa/test/test_vm_builder.py %build -python setup.py build -# Generate HTML documentation -pushd doc -make html && rm _build/html/.buildinfo -popd +export LANG=en_US.UTF-8 +%python_build %install -python setup.py install --prefix=%{_prefix} --root=%{buildroot} +export LANG=en_US.UTF-8 +%python_install mkdir %{buildroot}/%{_bindir} # rename binaries in order to avoid name clashes with other system packages for f in {generate_parser,stage}; do + sed -i \ + -e "s|^#!%{_bindir}/env python$|#!%{_bindir}/python3|" \ + bin/$f cp -v bin/$f %{buildroot}/%{_bindir}/parsley-$f done -%if 0%{?suse_version} - %fdupes -s %{buildroot}%{_prefix} -%endif - -# Correct what fdupes didn't find, because docs are later installed -rm -f doc/_build/html/_downloads/tutorial3-netstrings.py -ln -sf ../_static/listings/tutorial3-netstrings2.py doc/_build/html/_downloads/tutorial3-netstrings2.py -rm -f doc/html/_downloads/tutorial3-netstring-reversal.py -ln -sf ../_static/listings/tutorial3-netstring-reversal.py doc//_build/html/_downloads/tutorial3-netstring-reversal.py +%python_expand %fdupes %{buildroot}%{$python_sitelib} %check -pushd ometa/test -PYTHONPATH='../..' python -m unittest test_builder test_pymeta test_runtime -popd +export LANG=en_US.UTF-8 +%python_expand PYTHONPATH=%{buildroot}%{$python_sitelib} py.test-%{$python_version} ometa/test +%python_expand PYTHONPATH=%{buildroot}%{$python_sitelib} py.test-%{$python_version} terml/test -%files -%defattr(-,root,root) -%doc LICENSE NEWS PKG-INFO README -%{_bindir}/parsley* -%{python_sitelib}/parsley.* -%{python_sitelib}/ometa -%{python_sitelib}/terml -%{python_sitelib}/%{oname}-%{version}-py%{py_ver}.egg-info - -%files doc -%defattr(-,root,root) -%doc doc/_build/html examples +%files %{python_files} +%license LICENSE +%doc NEWS PKG-INFO README +%python3_only %{_bindir}/parsley* +%{python_sitelib}/* %changelog