Hello community, here is the log from the commit of package python-demjson for openSUSE:Factory checked in at 2017-05-17 17:18:06 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/python-demjson (Old) and /work/SRC/openSUSE:Factory/.python-demjson.new (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "python-demjson" Wed May 17 17:18:06 2017 rev:2 rq:491187 version:2.2.4 Changes: -------- --- /work/SRC/openSUSE:Factory/python-demjson/python-demjson.changes 2016-10-22 13:21:38.000000000 +0200 +++ /work/SRC/openSUSE:Factory/.python-demjson.new/python-demjson.changes 2017-05-17 17:18:08.070933614 +0200 @@ -1,0 +2,6 @@ +Wed Apr 26 04:01:04 UTC 2017 - [email protected] + +- Implement single-spec version. +- Fix source URL. + +------------------------------------------------------------------- ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ python-demjson.spec ++++++ --- /var/tmp/diff_new_pack.1CEY3n/_old 2017-05-17 17:18:08.934811793 +0200 +++ /var/tmp/diff_new_pack.1CEY3n/_new 2017-05-17 17:18:08.938811230 +0200 @@ -1,7 +1,7 @@ # # spec file for package python-demjson # -# Copyright (c) 2016 SUSE LINUX GmbH, Nuernberg, Germany. +# Copyright (c) 2017 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 @@ -16,6 +16,9 @@ # +%bcond_without tests + +%{?!python_module:%define python_module() python-%{**} python3-%{**}} Name: python-demjson Version: 2.2.4 Release: 0 @@ -23,17 +26,15 @@ Summary: Encoder, decoder, and lint/validator for JSON compliant with RFC 4627 License: LGPL-3.0+ Group: Development/Languages/Python -Source: https://pypi.io/packages/source/d/demjson/demjson-%{version}.tar.gz +Source: https://files.pythonhosted.org/packages/source/d/demjson/demjson-%{version}.tar.gz BuildRoot: %{_tmppath}/%{name}-%{version}-build -BuildRequires: python-devel -BuildRequires: python-setuptools -%if 0%{?suse_version} -%py_requires -%if 0%{?suse_version} > 1110 +BuildRequires: fdupes +BuildRequires: python-rpm-macros +BuildRequires: python3-2to3 +BuildRequires: %{python_module devel} +BuildRequires: %{python_module setuptools} BuildArch: noarch -%endif -%endif -%{!?python_sitelib: %global python_sitelib %(%{__python} -c "from distutils.sysconfig import get_python_lib; print get_python_lib()")} +%python_subpackages %description This module provides classes and functions for encoding or decoding data @@ -52,15 +53,28 @@ sed -i "1d" demjson.py # Fix non-executable script %build -python setup.py build +%python_build %install -python setup.py install --prefix=%{_prefix} --root=%{buildroot} +%python_install +%python_expand %fdupes %{buildroot}%{$python_sitelib} + +%if %{with tests}3 +%check +%python_expand cp test/test_demjson.py test/test_demjson_%{$python_bin_suffix}.py +%if %have_python3 +2to3 -nw test/test_demjson_%{python3_bin_suffix}.py +%endif +%{python_expand export PYTHONPATH=%{buildroot}%{$python_sitelib} +$python test/test_demjson_%{$python_bin_suffix}.py +} +%endif -%files +%files %{python_files} %defattr(-,root,root,-) -%doc LICENSE.txt README.txt docs -%{_bindir}/jsonlint +%doc LICENSE.txt README.txt +%doc docs/ +%python3_only %{_bindir}/jsonlint %{python_sitelib}/* %changelog
