Hello community,

here is the log from the commit of package python-perfume-bench for 
openSUSE:Factory checked in at 2020-05-26 17:20:09
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/python-perfume-bench (Old)
 and      /work/SRC/openSUSE:Factory/.python-perfume-bench.new.2738 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "python-perfume-bench"

Tue May 26 17:20:09 2020 rev:2 rq:808405 version:0.1.6

Changes:
--------
--- 
/work/SRC/openSUSE:Factory/python-perfume-bench/python-perfume-bench.changes    
    2019-05-22 11:11:53.838587361 +0200
+++ 
/work/SRC/openSUSE:Factory/.python-perfume-bench.new.2738/python-perfume-bench.changes
      2020-05-26 17:20:20.080105643 +0200
@@ -1,0 +2,12 @@
+Wed May 20 10:47:41 UTC 2020 - [email protected]
+
+- added patches
+  fix testsuite: compatibility with 1.0
+  + python-perfume-bench-pandas-1.0.patch
+
+-------------------------------------------------------------------
+Wed May 20 07:26:12 UTC 2020 - Petr Gajdos <[email protected]>
+
+- %python3_only -> %python_alternative
+
+-------------------------------------------------------------------

New:
----
  python-perfume-bench-pandas-1.0.patch

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Other differences:
------------------
++++++ python-perfume-bench.spec ++++++
--- /var/tmp/diff_new_pack.FW3AyR/_old  2020-05-26 17:20:20.784107157 +0200
+++ /var/tmp/diff_new_pack.FW3AyR/_new  2020-05-26 17:20:20.784107157 +0200
@@ -1,7 +1,7 @@
 #
 # spec file for package python-perfume-bench
 #
-# 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
@@ -26,6 +26,10 @@
 Group:          Development/Languages/Python
 URL:            https://github.com/leifwalsh/perfume
 Source:         
https://files.pythonhosted.org/packages/source/p/perfume-bench/perfume-bench-%{version}.tar.gz
+# testsuite: compatibility with pandas 1.0
+# https://pandas.pydata.org/docs/whatsnew/v1.0.0.html
+# upstream knows about it, see GH:perfume_bench.egg-info/requires.txt
+Patch0:         python-perfume-bench-pandas-1.0.patch
 BuildRequires:  %{python_module setuptools}
 BuildRequires:  fdupes
 BuildRequires:  python-rpm-macros
@@ -38,6 +42,8 @@
 Requires:       python-pandas >= 0.19
 Requires:       python-seaborn >= 0.7
 Requires:       python-statsmodels >= 0.8
+Requires(post): update-alternatives
+Requires(postun): update-alternatives
 BuildArch:      noarch
 # SECTION test requirements
 BuildRequires:  %{python_module bokeh >= 0.12}
@@ -47,6 +53,7 @@
 BuildRequires:  %{python_module notebook >= 5.0}
 BuildRequires:  %{python_module numpy >= 1.11}
 BuildRequires:  %{python_module pandas >= 0.19}
+BuildRequires:  %{python_module pytest}
 BuildRequires:  %{python_module seaborn >= 0.7}
 BuildRequires:  %{python_module statsmodels >= 0.8}
 # /SECTION
@@ -57,21 +64,29 @@
 
 %prep
 %setup -q -n perfume-bench-%{version}
+%patch0 -p1
 
 %build
 %python_build
 
 %install
 %python_install
+%python_clone -a %{buildroot}%{_bindir}/perfume
 %python_expand %fdupes %{buildroot}%{$python_sitelib}
 
 %check
-%python_exec setup.py test
+%pytest
+
+%post
+%python_install_alternative perfume
+
+%postun
+%python_uninstall_alternative perfume
 
 %files %{python_files}
 %doc AUTHORS.rst README.rst
 %license LICENSE
-%python3_only %{_bindir}/perfume
+%python_alternative %{_bindir}/perfume
 %{python_sitelib}/*
 
 %changelog

++++++ python-perfume-bench-pandas-1.0.patch ++++++
Index: perfume-bench-0.1.6/tests/test_perfume.py
===================================================================
--- perfume-bench-0.1.6.orig/tests/test_perfume.py
+++ perfume-bench-0.1.6/tests/test_perfume.py
@@ -40,7 +40,7 @@ class TestAnalyze(unittest.TestCase):
             data=samples,
             columns=pd.MultiIndex(
                 levels=[["fn1", "fn2"], ["begin", "end"]],
-                labels=[[0, 0, 1, 1], [0, 1, 0, 1]],
+                codes=[[0, 0, 1, 1], [0, 1, 0, 1]],
             ),
         )
 
@@ -88,7 +88,7 @@ class TestAnalyze(unittest.TestCase):
         # gives us.
         fn1_expected = pd.Series(
             1.1,
-            index=pd.TimedeltaIndex(
+            index=pd.timedelta_range(
                 freq=pd.Timedelta("1.1s"),
                 start="1.1s",
                 periods=20,
@@ -97,7 +97,7 @@ class TestAnalyze(unittest.TestCase):
         )
         fn2_expected = pd.Series(
             1.5,
-            index=pd.TimedeltaIndex(
+            index=pd.timedelta_range(
                 freq=pd.Timedelta("1.5s"),
                 start="1.5s",
                 periods=20,
Index: perfume-bench-0.1.6/perfume/perfume.py
===================================================================
--- perfume-bench-0.1.6.orig/perfume/perfume.py
+++ perfume-bench-0.1.6/perfume/perfume.py
@@ -288,7 +288,7 @@ def bench(*fns, samples=None, efficiency
     disp = Display(names, len(sample_records))
     index = pd.MultiIndex(
         levels=[names, ("begin", "end")],
-        labels=[
+        codes=[
             _flatten([(i, i) for i in range(len(names))]), [0, 1] * len(names)
         ],
         names=("function", "timing"),

Reply via email to