Hello community,
here is the log from the commit of package python-brotlipy for openSUSE:Factory
checked in at 2019-03-01 20:30:33
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/python-brotlipy (Old)
and /work/SRC/openSUSE:Factory/.python-brotlipy.new.28833 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "python-brotlipy"
Fri Mar 1 20:30:33 2019 rev:3 rq:680141 version:0.7.0
Changes:
--------
--- /work/SRC/openSUSE:Factory/python-brotlipy/python-brotlipy.changes
2018-02-27 16:56:33.115090019 +0100
+++
/work/SRC/openSUSE:Factory/.python-brotlipy.new.28833/python-brotlipy.changes
2019-03-01 20:30:50.113990890 +0100
@@ -1,0 +2,7 @@
+Thu Feb 28 06:43:41 UTC 2019 - John Vandenberg <[email protected]>
+
+- Add missing runtime dependency enum34
+- Use %license, and add the libbrotli LICENSE
+- Activate test suite
+
+-------------------------------------------------------------------
New:
----
conftest.py
testdata.tgz
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Other differences:
------------------
++++++ python-brotlipy.spec ++++++
--- /var/tmp/diff_new_pack.GQrE5P/_old 2019-03-01 20:30:52.041990416 +0100
+++ /var/tmp/diff_new_pack.GQrE5P/_new 2019-03-01 20:30:52.061990411 +0100
@@ -1,7 +1,7 @@
#
# spec file for package python-brotlipy
#
-# Copyright (c) 2018 SUSE LINUX GmbH, Nuernberg, Germany.
+# Copyright (c) 2019 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
@@ -12,7 +12,7 @@
# 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/
#
@@ -25,14 +25,22 @@
Group: Development/Languages/Python
Url: https://github.com/python-hyper/brotlipy
Source0:
https://pypi.io/packages/source/b/brotlipy/brotlipy-%{version}.tar.gz
+# Copy of
https://github.com/google/brotli/tree/46c1a881b41bb638c76247558aa04b1591af3aa7/tests/testdata
+Source1: testdata.tgz
+Source2:
https://raw.githubusercontent.com/python-hyper/brotlipy/master/test/conftest.py
BuildRequires: %{python_module cffi >= 1.0.0}
BuildRequires: %{python_module devel}
+BuildRequires: %{python_module hypothesis}
+BuildRequires: %{python_module pytest}
BuildRequires: %{python_module setuptools}
BuildRequires: fdupes
BuildRequires: gcc-c++
+BuildRequires: python-enum34
BuildRequires: python-rpm-macros
Requires: python-cffi >= 1.0.0
-BuildRoot: %{_tmppath}/%{name}-%{version}-build
+%ifpython2
+Requires: python-enum34
+%endif
%python_subpackages
%description
@@ -43,6 +51,12 @@
%prep
%setup -q -n brotlipy-%{version}
+mv libbrotli/LICENSE LICENSE.libbrotli
+cp %{SOURCE2} test/
+cd libbrotli
+mkdir -p tests
+cd tests
+tar -xzf %{SOURCE1}
%build
export CFLAGS="%{optflags}"
@@ -53,9 +67,12 @@
%python_install
%python_expand %fdupes -s %{buildroot}%{$python_sitearch}
+%check
+%python_expand PYTHONPATH=%{buildroot}%{$python_sitearch} $python -m pytest
+
%files %{python_files}
-%defattr(-,root,root,-)
-%doc LICENSE README.rst
+%license LICENSE LICENSE.libbrotli
+%doc README.rst
%{python_sitearch}/brotli
%{python_sitearch}/brotlipy-%{version}-py%{py_ver}.egg-info
++++++ conftest.py ++++++
# -*- coding: utf-8 -*-
import os
import os.path
import pytest
# Statically look for all the files.
curdir = os.path.split(os.path.dirname(__file__))[0]
TEST_DATA_DIR = os.path.join(curdir, 'libbrotli', 'tests', 'testdata')
simple_test_files = [
os.path.join(TEST_DATA_DIR, p) for p in os.listdir(TEST_DATA_DIR)
]
compressed_simple_test_files = set(
f for f in simple_test_files if f.endswith('.compressed')
)
@pytest.fixture(params=compressed_simple_test_files)
def simple_compressed_file(request):
"""
Returns a two-tuple: (uncompressed_file, compressed_file), from the Brotli
test fixtures.
"""
file = request.param
return (file[:-len('.compressed')], file)
@pytest.fixture()
def one_compressed_file():
return os.path.join(TEST_DATA_DIR, 'alice29.txt')