File scikit-hep-testdata-datadir.patch of Package python-scikit-hep-testdata

---
 src/skhep_testdata/local_files.py |    3 ++-
 tests/test_local_files.py         |    2 +-
 2 files changed, 3 insertions(+), 2 deletions(-)

Index: scikit-hep-testdata-0.5.4/src/skhep_testdata/local_files.py
===================================================================
--- scikit-hep-testdata-0.5.4.orig/src/skhep_testdata/local_files.py
+++ scikit-hep-testdata-0.5.4/src/skhep_testdata/local_files.py
@@ -1,5 +1,6 @@
 from __future__ import annotations
 
+import os
 import tempfile
 import zipfile
 from importlib import resources
@@ -12,7 +13,7 @@ from . import data, remote_files
 __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"
Index: scikit-hep-testdata-0.5.4/tests/test_local_files.py
===================================================================
--- scikit-hep-testdata-0.5.4.orig/tests/test_local_files.py
+++ scikit-hep-testdata-0.5.4/tests/test_local_files.py
@@ -7,7 +7,7 @@ import requests
 
 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")
 
 
openSUSE Build Service is sponsored by