Accepting request 822626 from home:mcalabkova:branches:devel:languages:python
- update to 2.1.0 * New commandline interface: 'python -m threadpoolctl -i numpy' will try to import the `numpy` package and then return the output of `threadpoolctl.threadpool_info()` on STDOUT formatted using the JSON syntax. This makes it easier to quickly introspect a Python environment. - Add patch python_executable.patch OBS-URL: https://build.opensuse.org/request/show/822626 OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-threadpoolctl?expand=0&rev=3
This commit is contained in:
parent
4c61e460d2
commit
f6bfeb9289
@ -1,3 +1,13 @@
|
||||
-------------------------------------------------------------------
|
||||
Fri Jul 24 11:21:21 UTC 2020 - Marketa Calabkova <mcalabkova@suse.com>
|
||||
|
||||
- update to 2.1.0
|
||||
* New commandline interface: 'python -m threadpoolctl -i numpy'
|
||||
will try to import the `numpy` package and then return the output of
|
||||
`threadpoolctl.threadpool_info()` on STDOUT formatted using the JSON
|
||||
syntax. This makes it easier to quickly introspect a Python environment.
|
||||
- Add patch python_executable.patch
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Thu Mar 5 13:02:43 UTC 2020 - pgajdos@suse.com
|
||||
|
||||
|
@ -19,13 +19,15 @@
|
||||
%{?!python_module:%define python_module() python-%{**} python3-%{**}}
|
||||
%define skip_python2 1
|
||||
Name: python-threadpoolctl
|
||||
Version: 2.0.0
|
||||
Version: 2.1.0
|
||||
Release: 0
|
||||
Summary: Thread-pool Controls
|
||||
License: BSD-3-Clause
|
||||
Group: Development/Languages/Python
|
||||
URL: https://github.com/joblib/threadpoolctl
|
||||
Source: https://files.pythonhosted.org/packages/source/t/threadpoolctl/threadpoolctl-%{version}.tar.gz
|
||||
# fix python executable in tests
|
||||
Patch0: python_executable.patch
|
||||
BuildRequires: %{python_module devel}
|
||||
BuildRequires: %{python_module pytest}
|
||||
BuildRequires: %{python_module setuptools}
|
||||
@ -41,6 +43,7 @@ and OpenMP implementations).
|
||||
|
||||
%prep
|
||||
%setup -q -n threadpoolctl-%{version}
|
||||
%patch0 -p1
|
||||
|
||||
%build
|
||||
%python_build
|
||||
|
30
python_executable.patch
Normal file
30
python_executable.patch
Normal file
@ -0,0 +1,30 @@
|
||||
Index: threadpoolctl-2.1.0/tests/test_threadpoolctl.py
|
||||
===================================================================
|
||||
--- threadpoolctl-2.1.0.orig/tests/test_threadpoolctl.py
|
||||
+++ threadpoolctl-2.1.0/tests/test_threadpoolctl.py
|
||||
@@ -396,14 +396,14 @@ def test_libomp_libiomp_warning(recwarn)
|
||||
|
||||
def test_command_line_empty():
|
||||
output = subprocess.check_output(
|
||||
- "python -m threadpoolctl".split())
|
||||
+ (sys.executable + " -m threadpoolctl").split())
|
||||
assert json.loads(output.decode("utf-8")) == []
|
||||
|
||||
|
||||
def test_command_line_command_flag():
|
||||
pytest.importorskip("numpy")
|
||||
output = subprocess.check_output(
|
||||
- ["python", "-m", "threadpoolctl", "-c", "import numpy"])
|
||||
+ [sys.executable, "-m", "threadpoolctl", "-c", "import numpy"])
|
||||
cli_info = json.loads(output.decode("utf-8"))
|
||||
|
||||
this_process_info = threadpool_info()
|
||||
@@ -415,7 +415,7 @@ def test_command_line_command_flag():
|
||||
reason="need recent subprocess.run options")
|
||||
def test_command_line_import_flag():
|
||||
result = subprocess.run([
|
||||
- "python", "-m", "threadpoolctl", "-i",
|
||||
+ sys.executable, "-m", "threadpoolctl", "-i",
|
||||
"numpy",
|
||||
"scipy.linalg",
|
||||
"invalid_package",
|
@ -1,3 +0,0 @@
|
||||
version https://git-lfs.github.com/spec/v1
|
||||
oid sha256:48b3e3e9ee079d6b5295c65cbe255b36a3026afc6dde3fb49c085cd0c004bbcf
|
||||
size 24617
|
3
threadpoolctl-2.1.0.tar.gz
Normal file
3
threadpoolctl-2.1.0.tar.gz
Normal file
@ -0,0 +1,3 @@
|
||||
version https://git-lfs.github.com/spec/v1
|
||||
oid sha256:ddc57c96a38beb63db45d6c159b5ab07b6bced12c45a1f07b2b92f272aebfa6b
|
||||
size 26644
|
Loading…
Reference in New Issue
Block a user