Script 'mail_helper' called by obssrc
Hello community,

here is the log from the commit of package python-scikit-hep-testdata for 
openSUSE:Factory checked in at 2021-07-18 23:45:03
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/python-scikit-hep-testdata (Old)
 and      /work/SRC/openSUSE:Factory/.python-scikit-hep-testdata.new.2632 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "python-scikit-hep-testdata"

Sun Jul 18 23:45:03 2021 rev:4 rq:906929 version:0.4.4

Changes:
--------
--- 
/work/SRC/openSUSE:Factory/python-scikit-hep-testdata/python-scikit-hep-testdata.changes
    2021-07-07 18:31:50.482349821 +0200
+++ 
/work/SRC/openSUSE:Factory/.python-scikit-hep-testdata.new.2632/python-scikit-hep-testdata.changes
  2021-07-18 23:45:15.594902618 +0200
@@ -1,0 +2,9 @@
+Fri Jul 16 17:33:54 UTC 2021 - Ben Greiner <[email protected]>
+
+- Package the test data. We need it on obs.
+  * Add scikit-hep-testdata-datadir.patch for putting the data into
+    a common subpackage in order to avoid multiple mostly identical
+    300MB python flavored packages.
+- Fix build and runtime requirements
+
+-------------------------------------------------------------------

New:
----
  scikit-hep-testdata-datadir.patch

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

Other differences:
------------------
++++++ python-scikit-hep-testdata.spec ++++++
--- /var/tmp/diff_new_pack.DpRkJl/_old  2021-07-18 23:45:17.490888033 +0200
+++ /var/tmp/diff_new_pack.DpRkJl/_new  2021-07-18 23:45:17.494888001 +0200
@@ -27,19 +27,33 @@
 Group:          Development/Languages/Python
 URL:            https://github.com/scikit-hep/scikit-hep-testdata
 Source:         
https://github.com/scikit-hep/scikit-hep-testdata/archive/v%{version}.tar.gz#/%{srcname}-%{version}.tar.gz
-BuildRequires:  %{python_module devel}
+# PATCH-FEATURE-OPENSUSE scikit-hep-testdata-datadir.patch -- change the 
install location of the datadir [email protected]
+Patch1:         scikit-hep-testdata-datadir.patch
+BuildRequires:  %{python_module PyYAML}
+BuildRequires:  %{python_module importlib-resources >= 1.3 if %python-base < 
3.9}
+BuildRequires:  %{python_module pathlib2 if %python-base <= 2.7}
+BuildRequires:  %{python_module requests}
 BuildRequires:  %{python_module setuptools_scm}
 BuildRequires:  %{python_module setuptools}
 BuildRequires:  %{python_module toml}
+BuildRequires:  %{python_module typing if %python-base <= 2.7}
 BuildRequires:  fdupes
 BuildRequires:  python-rpm-macros
 # SECTION Test requirements
-BuildRequires:  %{python_module PyYAML}
-BuildRequires:  %{python_module importlib-resources}
-BuildRequires:  %{python_module pytest-cov}
 BuildRequires:  %{python_module pytest}
-BuildRequires:  %{python_module requests}
 # /SECTION
+Requires:       python-PyYAML
+Requires:       python-requests
+%if %python_version_nodots < 39
+Requires:       python-importlib-resources >= 1.3
+%endif
+%if %python_version_nodots <= 27
+Requires:       python-pathlib2
+Requires:       python-typing
+%endif
+Requires:       scikit-hep-testdata-files = %{version}
+Requires(post): update-alternatives
+Requires(postun):update-alternatives
 BuildArch:      noarch
 %python_subpackages
 
@@ -52,6 +66,20 @@
 simple helper methods to get larger files from common open-access data
 repositories.
 
+%package -n scikit-hep-testdata-files
+Summary:        Example HEP files for testing and demonstrating - common file 
package
+
+%description -n scikit-hep-testdata-files
+A common package to provide example files (*e.g*. ROOT) for testing and
+developing packages against.  The sample of files is representative of typical
+files found "in the wild".
+
+In addition to including some root files directly, this package adds some
+simple helper methods to get larger files from common open-access data
+repositories.
+
+This subpackage contains the data files for all python flavors.
+
 %prep
 %autosetup -p1 -n %{srcname}-%{version}
 
@@ -66,10 +94,12 @@
 %python_expand %fdupes %{buildroot}%{$python_sitelib}
 %python_clone -a %{buildroot}%{_bindir}/scikit-hep-testdata
 %python_clone -a %{buildroot}%{_bindir}/skhep-testdata
+install -D -m 644 -t %{buildroot}%{_datadir}/scikit-hep-testdata/data 
src/skhep_testdata/data/*
+%fdupes %{buildroot}%{_datadir}/scikit-hep-testdata
 
 %check
-# test_data_path needs network
-%pytest -k 'not test_data_path'
+export SKHEP_DATA_DIR=%{buildroot}%{_datadir}/scikit-hep-testdata
+%pytest
 
 %post
 %python_install_alternative scikit-hep-testdata
@@ -80,9 +110,15 @@
 %python_uninstall_alternative skhep-testdata
 
 %files %{python_files}
+%license LICENSE
+%doc README.md
 %python_alternative %{_bindir}/scikit-hep-testdata
 %python_alternative %{_bindir}/skhep-testdata
 %{python_sitelib}/skhep_testdata/
 %{python_sitelib}/%{modname}-%{version}-py%{python_version}.egg-info/
 
+%files -n scikit-hep-testdata-files
+%license LICENSE
+%{_datadir}/scikit-hep-testdata
+
 %changelog

++++++ scikit-hep-testdata-datadir.patch ++++++
diff -ur scikit-hep-testdata-0.4.4.orig/src/skhep_testdata/local_files.py 
scikit-hep-testdata-0.4.4/src/skhep_testdata/local_files.py
--- scikit-hep-testdata-0.4.4.orig/src/skhep_testdata/local_files.py    
2021-07-16 20:25:58.664206704 +0200
+++ scikit-hep-testdata-0.4.4/src/skhep_testdata/local_files.py 2021-07-16 
20:36:55.863591123 +0200
@@ -1,6 +1,7 @@
 # -*- coding: utf-8 -*-
 from __future__ import absolute_import
 
+import os
 import sys
 import tempfile
 import typing
@@ -24,7 +25,7 @@
 __all__ = ("data_path", "download_all", "known_files")
 
 
-DIR = Path(__file__).parent.resolve()
+DIR = Path(os.environ.get("SKHEP_DATA_DIR", "/usr/share/scikit-hep-testdata/"))
 
 baseurl = 
"https://raw.githubusercontent.com/scikit-hep/scikit-hep-testdata/main/src/skhep_testdata/data/";
 zipurl = "https://github.com/scikit-hep/scikit-hep-testdata/zipball/main";
diff -ur scikit-hep-testdata-0.4.4.orig/tests/test_local_files.py 
scikit-hep-testdata-0.4.4/tests/test_local_files.py
--- scikit-hep-testdata-0.4.4.orig/tests/test_local_files.py    2021-07-16 
20:25:58.664206704 +0200
+++ scikit-hep-testdata-0.4.4/tests/test_local_files.py 2021-07-16 
20:42:21.434980038 +0200
@@ -5,7 +5,7 @@
 
 import skhep_testdata as skhtd
 
-data_dir = os.path.dirname(skhtd.__file__)
+data_dir = str(skhtd.local_files.DIR)
 data_dir = os.path.join(data_dir, "data")
 
 

Reply via email to