Script 'mail_helper' called by obssrc Hello community, here is the log from the commit of package python-pymol for openSUSE:Factory checked in at 2024-10-06 17:52:37 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/python-pymol (Old) and /work/SRC/openSUSE:Factory/.python-pymol.new.19354 (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "python-pymol" Sun Oct 6 17:52:37 2024 rev:12 rq:1205768 version:3.0.0 Changes: -------- --- /work/SRC/openSUSE:Factory/python-pymol/python-pymol.changes 2024-06-27 16:02:08.624058692 +0200 +++ /work/SRC/openSUSE:Factory/.python-pymol.new.19354/python-pymol.changes 2024-10-06 17:52:50.411269676 +0200 @@ -1,0 +2,7 @@ +Tue Oct 1 19:23:57 UTC 2024 - <hs...@mail.de> + +- add patches: + * pymol3-numpy2.patch: add numpy-2 compatability + * pymol3-version-compare.patch: fix tests/helpers/test_utils.py + +------------------------------------------------------------------- New: ---- pymol3-numpy2.patch pymol3-version-compare.patch BETA DEBUG BEGIN: New:- add patches: * pymol3-numpy2.patch: add numpy-2 compatability * pymol3-version-compare.patch: fix tests/helpers/test_utils.py New: * pymol3-numpy2.patch: add numpy-2 compatability * pymol3-version-compare.patch: fix tests/helpers/test_utils.py BETA DEBUG END: ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ python-pymol.spec ++++++ --- /var/tmp/diff_new_pack.nug28X/_old 2024-10-06 17:52:50.995293945 +0200 +++ /var/tmp/diff_new_pack.nug28X/_new 2024-10-06 17:52:50.999294112 +0200 @@ -16,11 +16,10 @@ # -%bcond_with test -%{?!python_module:%define python_module() python-%{**} python3-%{**}} %define skip_python2 1 %define oldpython python %define modname pymol-open-source +%bcond_with test Name: python-pymol Version: 3.0.0 Release: 0 @@ -33,6 +32,10 @@ Patch0: no-build-date.patch # PATCH-FIX-OPENSUSE no-o3.patch tchva...@suse.com -- do not add O3 to the code Patch1: no-o3.patch +# PATCH-FIX-UPSTREAM pymol3-numpy2.patch +Patch10: pymol3-numpy2.patch +# PATCH-FIX-UPSTREAM pymol3-version-compare.patch +Patch11: pymol3-version-compare.patch BuildRequires: %{python_module devel} BuildRequires: %{python_module numpy-devel} BuildRequires: %{python_module qt5-devel} @@ -42,29 +45,29 @@ BuildRequires: gcc-c++ BuildRequires: glew-devel BuildRequires: glm-devel -BuildRequires: msgpack-cxx-devel BuildRequires: libpng-devel BuildRequires: libxml2-devel BuildRequires: mmtf-cpp-devel +BuildRequires: msgpack-cxx-devel BuildRequires: netcdf-devel BuildRequires: python-rpm-macros +Requires: python-numpy +Requires: python-pmw +Requires: python-qt5 +Requires(post): update-alternatives +Requires(postun): update-alternatives +Obsoletes: pymol < %{version} +Provides: pymol = %{version} %if %{with test} -BuildRequires: Catch2-2-devel BuildRequires: %{python_module Pillow} +BuildRequires: %{python_module pytest} +BuildRequires: Catch2-2-devel ## tests need recent biopython not available in Leap %if 0%{?sle_version} >= 150500 && 0%{?is_opensuse} %else BuildRequires: %{python_module biopython} %endif -BuildRequires: %{python_module pytest} %endif -Requires: python-numpy -Requires: python-qt5 -Requires: python-pmw -Requires(post): update-alternatives -Requires(postun):update-alternatives -Obsoletes: pymol < %{version} -Provides: pymol = %{version} %python_subpackages %description @@ -103,11 +106,11 @@ %if 0%{?sle_version} >= 150500 && 0%{?is_opensuse} ## TestSeqalign needs recent biopython not available in Leap rm testing/tests/api/seqalign.py -## fails on Leap, but freemol is unused anyway -rm testing/tests/system/freemol_.py ## default pytest / python on leap are too old... sed -e '/--import-mode=importlib/d' -i testing/pytest.ini %endif +## succeeds when run separately, but fails when run after ..../api/viewing.py +rm testing/tests/api/test_editing.py ## pymol -ckqy testing/testing.py --run all PYTHONPATH=%{buildroot}%{python_sitearch} python%{python_version} -m pymol -ckqy testing/testing.py --offline --run all %endif ++++++ pymol3-numpy2.patch ++++++ >From 758cec338057b23007ffd14c960634ff0ee24af1 Mon Sep 17 00:00:00 2001 From: Jarrett Johnson <jarrett.john...@schrodinger.com> Date: Tue, 27 Aug 2024 20:06:57 -0400 Subject: [PATCH] Make numpy2 compatible --- layer2/ObjectMap.cpp | 1 + modules/chempy/brick.py | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/layer2/ObjectMap.cpp b/layer2/ObjectMap.cpp index ada826f8a..62e3457a4 100644 --- a/layer2/ObjectMap.cpp +++ b/layer2/ObjectMap.cpp @@ -5596,6 +5596,7 @@ static int ObjectMapNumPyArrayToMapState(PyMOLGlobals * G, ObjectMapState * ms, void * ptr; #ifdef _PYMOL_NUMPY + import_array1(0); PyArrayObject * pao = (PyArrayObject *) ary; const int itemsize = PyArray_ITEMSIZE(pao); #endif diff --git a/modules/chempy/brick.py b/modules/chempy/brick.py index fc514eb3a..e4c0f1bbb 100644 --- a/modules/chempy/brick.py +++ b/modules/chempy/brick.py @@ -31,7 +31,7 @@ def from_numpy(cls, data, grid, origin=(0.0, 0.0, 0.0)): @param range: 3f sequence @param origin: 3f sequence ''' - data = numpy.asfarray(data) + data = numpy.asarray(data, dtype=numpy.float64) assert len(data.shape) == 3 self = cls() ++++++ pymol3-version-compare.patch ++++++ cf. https://github.com/schrodinger/pymol-open-source/issues/370 fixed by https://github.com/schrodinger/pymol-open-source/pull/372 >From 9d01072cacb7d5151b7ed9387b3048f55462c31a Mon Sep 17 00:00:00 2001 From: Thomas Holder <tho...@thomas-holder.de> Date: Mon, 10 Jun 2024 17:31:59 +0200 Subject: [PATCH] Fix test_utils.compatible_with (#372) Fixes https://github.com/schrodinger/pymol-open-source/issues/370 --- testing/tests/helpers/test_utils.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/testing/tests/helpers/test_utils.py b/testing/tests/helpers/test_utils.py index 301b44747..f4d4340d9 100644 --- a/testing/tests/helpers/test_utils.py +++ b/testing/tests/helpers/test_utils.py @@ -111,7 +111,7 @@ def assert_in_names_undo(cmd, name: str) -> None: def compatible_with(version: str) -> bool: def tupleize_version(str_: str): - return tuple(int(x) for x in str_.partition('.')[0::2] if x.isdigit()) + return tuple(int(x) for x in str_.split('.') if x.isdigit()) PYMOL_VERSION = cmd.get_version() PYMOL_VERSION_TUPLE = tupleize_version(PYMOL_VERSION[0])