commit python-brotlipy for openSUSE:Leap:15.2

2020-03-30 Thread root
Hello community,

here is the log from the commit of package python-brotlipy for 
openSUSE:Leap:15.2 checked in at 2020-03-31 07:21:24

Comparing /work/SRC/openSUSE:Leap:15.2/python-brotlipy (Old)
 and  /work/SRC/openSUSE:Leap:15.2/.python-brotlipy.new.3160 (New)


Package is "python-brotlipy"

Tue Mar 31 07:21:24 2020 rev:16 rq:789128 version:0.7.0

Changes:

--- /work/SRC/openSUSE:Leap:15.2/python-brotlipy/python-brotlipy.changes
2020-02-21 23:48:41.256487301 +0100
+++ 
/work/SRC/openSUSE:Leap:15.2/.python-brotlipy.new.3160/python-brotlipy.changes  
2020-03-31 07:21:25.186373281 +0200
@@ -1,0 +2,5 @@
+Mon Mar 16 10:21:09 UTC 2020 - Tomáš Chvátal 
+
+- Fix build without python2
+
+---



Other differences:
--
++ python-brotlipy.spec ++
--- /var/tmp/diff_new_pack.NJmSlK/_old  2020-03-31 07:21:25.838373564 +0200
+++ /var/tmp/diff_new_pack.NJmSlK/_new  2020-03-31 07:21:25.842373565 +0200
@@ -1,7 +1,7 @@
 #
 # spec file for package python-brotlipy
 #
-# Copyright (c) 2019 SUSE LINUX GmbH, Nuernberg, Germany.
+# Copyright (c) 2020 SUSE LLC
 #
 # All modifications and additions to the file contributed by third parties
 # remain the property of their copyright owners, unless otherwise agreed
@@ -17,14 +17,14 @@
 
 
 %{?!python_module:%define python_module() python-%{**} python3-%{**}}
+%bcond_without python2
 Name:   python-brotlipy
 Version:0.7.0
 Release:0
 Summary:Python binding to the Brotli library
 License:MIT
-Group:  Development/Languages/Python
-Url:https://github.com/python-hyper/brotlipy
-Source0:
https://pypi.io/packages/source/b/brotlipy/brotlipy-%{version}.tar.gz
+URL:https://github.com/python-hyper/brotlipy
+Source0:
https://files.pythonhosted.org/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
@@ -37,9 +37,11 @@
 BuildRequires:  %{python_module setuptools}
 BuildRequires:  fdupes
 BuildRequires:  libbrotli-devel
-BuildRequires:  python-enum34
 BuildRequires:  python-rpm-macros
 Requires:   python-cffi >= 1.0.0
+%if %{with python2}
+BuildRequires:  python-enum34
+%endif
 %ifpython2
 Requires:   python-enum34
 %endif
@@ -77,7 +79,7 @@
 
 %check
 # the skipped tests are benchmarks which can be flaky in OBS
-%python_expand PYTHONPATH=%{buildroot}%{$python_sitearch} $python -m pytest -k 
'not (test_streaming_compression or test_streaming_compression_flush)'
+%pytest_arch -k 'not (test_streaming_compression or 
test_streaming_compression_flush)'
 
 %files %{python_files}
 %license LICENSE




commit python-brotlipy for openSUSE:Leap:15.2

2020-02-21 Thread root
Hello community,

here is the log from the commit of package python-brotlipy for 
openSUSE:Leap:15.2 checked in at 2020-02-21 23:48:40

Comparing /work/SRC/openSUSE:Leap:15.2/python-brotlipy (Old)
 and  /work/SRC/openSUSE:Leap:15.2/.python-brotlipy.new.26092 (New)


Package is "python-brotlipy"

Fri Feb 21 23:48:40 2020 rev:15 rq:776461 version:0.7.0

Changes:

--- /work/SRC/openSUSE:Leap:15.2/python-brotlipy/python-brotlipy.changes
2020-01-15 15:47:44.219401866 +0100
+++ 
/work/SRC/openSUSE:Leap:15.2/.python-brotlipy.new.26092/python-brotlipy.changes 
2020-02-21 23:48:41.256487301 +0100
@@ -1,0 +2,21 @@
+Fri Nov  1 11:37:53 UTC 2019 - John Vandenberg 
+
+- Replace builtin libbrotli v0.6 with system libbrotli 1.x with patches:
+  - merged_pr_94.patch
+  - pr_154-brotli-v1.patch
+- Remove build dependency stdc++
+- Remove brotli/build.py from installed package
+
+---
+Fri Mar 22 12:49:36 UTC 2019 - Tomáš Chvátal 
+
+- Skip failing tests in OBS due to the speed of CPUs there
+
+---
+Thu Feb 28 06:43:41 UTC 2019 - John Vandenberg 
+
+- Add missing runtime dependency enum34
+- Use %license, and add the libbrotli LICENSE
+- Activate test suite
+
+---

New:

  conftest.py
  merged_pr_94.patch
  pr_154-brotli-v1.patch
  testdata.tgz



Other differences:
--
++ python-brotlipy.spec ++
--- /var/tmp/diff_new_pack.Ey5ye7/_old  2020-02-21 23:48:42.832490432 +0100
+++ /var/tmp/diff_new_pack.Ey5ye7/_new  2020-02-21 23:48:42.836490440 +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,24 @@
 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
+Patch0: merged_pr_94.patch
+Patch1: pr_154-brotli-v1.patch
 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:  libbrotli-devel
+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,20 +53,36 @@
 
 %prep
 %setup -q -n brotlipy-%{version}
+%autopatch -p1
+# Remove unnecessary dependency on stdc++
+# See https://github.com/python-hyper/brotlipy/pull/151
+sed -i 's/libraries.append.*stdc++.*$/pass/' src/brotli/build.py
+
+cp %{SOURCE2} test/
+cd libbrotli
+mkdir -p tests
+cd tests
+tar -xzf %{SOURCE1}
 
 %build
 export CFLAGS="%{optflags}"
-export CXXFLAGS="%{optflags}"
+export USE_SHARED_BROTLI=1
 %python_build
 
 %install
 %python_install
-%python_expand %fdupes -s %{buildroot}%{$python_sitearch}
+%{python_expand rm -f %{buildroot}%{$python_sitearch}/brotli/build.py* 
%{buildroot}%{$python_sitearch}/brotli/__pycache__/build.*
+%fdupes %{buildroot}%{$python_sitearch}
+}
+
+%check
+# the skipped tests are benchmarks which can be flaky in OBS
+%python_expand PYTHONPATH=%{buildroot}%{$python_sitearch} $python -m pytest -k 
'not (test_streaming_compression or test_streaming_compression_flush)'
 
 %files %{python_files}
-%defattr(-,root,root,-)
-%doc LICENSE README.rst
+%license LICENSE
+%doc README.rst
 %{python_sitearch}/brotli
-%{python_sitearch}/brotlipy-%{version}-py%{py_ver}.egg-info
+%{python_sitearch}/brotlipy-%{version}-py*.egg-info
 
 %changelog

++ 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(cu