diff --git a/python-threadpoolctl.changes b/python-threadpoolctl.changes index 433a247..1a8e2ac 100644 --- a/python-threadpoolctl.changes +++ b/python-threadpoolctl.changes @@ -1,3 +1,13 @@ +------------------------------------------------------------------- +Fri Jul 24 11:21:21 UTC 2020 - Marketa Calabkova + +- 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 diff --git a/python-threadpoolctl.spec b/python-threadpoolctl.spec index 223c3f4..7a615d7 100644 --- a/python-threadpoolctl.spec +++ b/python-threadpoolctl.spec @@ -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 diff --git a/python_executable.patch b/python_executable.patch new file mode 100644 index 0000000..6160c14 --- /dev/null +++ b/python_executable.patch @@ -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", diff --git a/threadpoolctl-2.0.0.tar.gz b/threadpoolctl-2.0.0.tar.gz deleted file mode 100644 index 9d9e34a..0000000 --- a/threadpoolctl-2.0.0.tar.gz +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:48b3e3e9ee079d6b5295c65cbe255b36a3026afc6dde3fb49c085cd0c004bbcf -size 24617 diff --git a/threadpoolctl-2.1.0.tar.gz b/threadpoolctl-2.1.0.tar.gz new file mode 100644 index 0000000..dbfff72 --- /dev/null +++ b/threadpoolctl-2.1.0.tar.gz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:ddc57c96a38beb63db45d6c159b5ab07b6bced12c45a1f07b2b92f272aebfa6b +size 26644