SHA256
1
0
forked from pool/python-pymol

17 Commits

Author SHA256 Message Date
bc81fc62c4 Accepting request 1284017 from devel:languages:python:numeric
OBS-URL: https://build.opensuse.org/request/show/1284017
OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/python-pymol?expand=0&rev=17
2025-06-10 07:07:05 +00:00
ad6a41c6e2 - Enable test suite for x86_64
OBS-URL: https://build.opensuse.org/package/show/devel:languages:python:numeric/python-pymol?expand=0&rev=35
2025-06-09 08:23:19 +00:00
627048d5c9 require Mesa-libGL-devel to build, require one of PyQt6 or PySide6 to run, recommend Pmw (for legacy plugin manager)
OBS-URL: https://build.opensuse.org/package/show/devel:languages:python:numeric/python-pymol?expand=0&rev=34
2025-06-08 15:35:19 +00:00
e086ab1d7a Accepting request 1253250 from devel:languages:python:numeric
- changes to .spec file:
  * to make build work on leap 15.6, add sle15_python_module_pythons
    and conditional BuildRequires: gcc12-c++
  * drop skip_python2 and oldpython

OBS-URL: https://build.opensuse.org/request/show/1253250
OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/python-pymol?expand=0&rev=16
2025-03-15 15:16:36 +00:00
1a8f98886e OBS-URL: https://build.opensuse.org/package/show/devel:languages:python:numeric/python-pymol?expand=0&rev=32 2025-03-14 20:03:05 +00:00
9d3ed9c0dd changes to .spec file to make build work on leap 15.6
OBS-URL: https://build.opensuse.org/package/show/devel:languages:python:numeric/python-pymol?expand=0&rev=31
2025-03-14 20:01:39 +00:00
99fdbbd0ce Accepting request 1252760 from devel:languages:python:numeric
OBS-URL: https://build.opensuse.org/request/show/1252760
OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/python-pymol?expand=0&rev=15
2025-03-13 21:04:44 +00:00
fd782c7b2c update to 3.1.0
OBS-URL: https://build.opensuse.org/package/show/devel:languages:python:numeric/python-pymol?expand=0&rev=29
2025-03-13 12:47:15 +00:00
f84d93c4f6 Accepting request 1223790 from devel:languages:python:numeric
Forwarded request #1223726 from bmwiedemann

Add reproducible.patch to normalize build date (boo#1047218)
  Remove no-build-date.patch (replaced by reproducible.patch)

OBS-URL: https://build.opensuse.org/request/show/1223790
OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/python-pymol?expand=0&rev=14
2024-11-13 14:28:52 +00:00
0d6fc2ab75 Add reproducible.patch to normalize build date (boo#1047218)
Remove no-build-date.patch (replaced by reproducible.patch)

OBS-URL: https://build.opensuse.org/package/show/devel:languages:python:numeric/python-pymol?expand=0&rev=27
2024-11-12 21:01:38 +00:00
7f61994898 Accepting request 1207270 from devel:languages:python:numeric
- Update to version 3.0.0+git.1725549602.9d3061c:
  * Symbol renaming in molfile_plugin and internal linkage
  * New command: delete_states
  * mark bind() calls with override where needed
  * Separate CGO to VBO logic out into functions
  * Remove unused returnData
  * Use vector for memory alloc
  * Use struct for total vert counts in CGO.cpp
  * Remove _PYMOL_IOS (Discontinued; prep for MVK)
  * Python 3.12 TypeError: convert progress to int for progress bar
  * Fix ray/draw panel error when modifying units
- Remove upstream patches:
  * pymol3-version-compare.patch
  * no-o3.patch
  * pymol3-numpy2.patch

OBS-URL: https://build.opensuse.org/request/show/1207270
OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/python-pymol?expand=0&rev=13
2024-10-12 11:30:11 +00:00
2680dc5ead - Remove upstream patches:
* pymol3-version-compare.patch
  * no-o3.patch
  * pymol3-numpy2.patch

OBS-URL: https://build.opensuse.org/package/show/devel:languages:python:numeric/python-pymol?expand=0&rev=25
2024-10-11 15:06:22 +00:00
eb87c8ea81 CLean up SPEC
OBS-URL: https://build.opensuse.org/package/show/devel:languages:python:numeric/python-pymol?expand=0&rev=24
2024-10-10 23:57:04 +00:00
79a082b0b7 - Update to version 3.0.0+git.1725549602.9d3061c:
* Symbol renaming in molfile_plugin and internal linkage
  * New command: delete_states
  * mark bind() calls with override where needed
  * Separate CGO to VBO logic out into functions
  * Remove unused returnData
  * Use vector for memory alloc
  * Use struct for total vert counts in CGO.cpp
  * Remove _PYMOL_IOS (Discontinued; prep for MVK)
  * Python 3.12 TypeError: convert progress to int for progress bar
  * Fix ray/draw panel error when modifying units

OBS-URL: https://build.opensuse.org/package/show/devel:languages:python:numeric/python-pymol?expand=0&rev=23
2024-10-10 23:32:46 +00:00
9ce3f47d4e Accepting request 1205768 from devel:languages:python:numeric
- add patches:
  * pymol3-numpy2.patch:  add numpy-2 compatability
  * pymol3-version-compare.patch:  fix tests/helpers/test_utils.py

OBS-URL: https://build.opensuse.org/request/show/1205768
OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/python-pymol?expand=0&rev=12
2024-10-06 15:52:37 +00:00
22ba2880e0 Clean up the SPEC
OBS-URL: https://build.opensuse.org/package/show/devel:languages:python:numeric/python-pymol?expand=0&rev=21
2024-10-04 15:33:27 +00:00
8d0e76d284 add upstream patches adding numpy-2 compatability, and fixing tests/helpers/test_utils.py
OBS-URL: https://build.opensuse.org/package/show/devel:languages:python:numeric/python-pymol?expand=0&rev=20
2024-10-04 15:25:08 +00:00
7 changed files with 153 additions and 68 deletions

View File

@@ -1,23 +0,0 @@
From: David Hall <dhall@wustl.edu>
Date: 2013-11-11 12:41:00 -0500
Subject: do not include build date in package
References:
Upstream: never
Patch removes including build date in binary
---
create_shadertext.py | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
--- a/create_shadertext.py
+++ b/create_shadertext.py
@@ -133,7 +133,7 @@ def create_buildinfo(outputdir, pymoldir
print('''
#define _PyMOL_BUILD_DATE %d
#define _PYMOL_BUILD_GIT_SHA "%s"
- ''' % (time.time(), sha), file=out)
+ ''' % (0, sha), file=out)
if __name__ == "__main__":
create_shadertext(*sys.argv[1:6])

View File

@@ -1,11 +0,0 @@
--- a/setup.py
+++ b/setup.py
@@ -272,8 +272,6 @@ ext_comp_args = [
"-Wno-narrowing",
# legacy stuff
'-Wno-char-subscripts',
- # optimizations
- "-Og" if DEBUG else "-O3",
] if not WIN else []
ext_link_args = []
ext_objects = []

View File

@@ -1,3 +0,0 @@
version https://git-lfs.github.com/spec/v1
oid sha256:45e800a02680cec62dff7a0f92283f4be7978c13a02934a43ac6bb01f67622cf
size 29510174

View File

@@ -0,0 +1,3 @@
version https://git-lfs.github.com/spec/v1
oid sha256:54306d65060bd58ed8b3dab1a8af521aeb4fd417871f15f463ff05ccb4e121fe
size 29550866

View File

@@ -1,3 +1,69 @@
-------------------------------------------------------------------
Sun Jun 8 15:58:57 UTC 2025 - Ben Greiner <code@bnavigator.de>
- Enable test suite for x86_64
-------------------------------------------------------------------
Fri Jun 6 08:29:17 UTC 2025 - Friedrich Haubensak <hsk17@mail.de>
- require Mesa-libGL-devel to build, require one of PyQt6 or
PySide6 to run, recommend Pmw (for legacy plugin manager)
-------------------------------------------------------------------
Fri Mar 14 17:31:28 UTC 2025 - Friedrich Haubensak <hsk17@mail.de>
- changes to .spec file:
* to make build work on leap 15.6, add sle15_python_module_pythons
and conditional BuildRequires: gcc12-c++
* drop skip_python2 and oldpython
-------------------------------------------------------------------
Wed Mar 12 22:14:37 UTC 2025 - Friedrich Haubensak <hsk17@mail.de>
- update to 3.1.0
* File Support
- BCIF import support
- gzipped-compressed SDF (SDFGZ) import support
* Python API
- "delete_states" command (removal of one or more states)
- "declare_command" extension for improved ergonomics of introducing
and customizing PyMOL functionality
- "cell_color" setting for altering unit cell colors
* Developer & Infrastructure
- Migration from distutils to setuptools
-------------------------------------------------------------------
Tue Nov 12 14:18:22 UTC 2024 - Bernhard Wiedemann <bwiedemann@suse.com>
- Add reproducible.patch to normalize build date (boo#1047218)
- Remove no-build-date.patch
-------------------------------------------------------------------
Thu Oct 10 23:20:52 UTC 2024 - mcepl@cepl.eu
- Update to version 3.0.0+git.1725549602.9d3061c:
* Symbol renaming in molfile_plugin and internal linkage
* New command: delete_states
* mark bind() calls with override where needed
* Separate CGO to VBO logic out into functions
* Remove unused returnData
* Use vector for memory alloc
* Use struct for total vert counts in CGO.cpp
* Remove _PYMOL_IOS (Discontinued; prep for MVK)
* Python 3.12 TypeError: convert progress to int for progress bar
* Fix ray/draw panel error when modifying units
- Remove upstream patches:
* pymol3-version-compare.patch
* no-o3.patch
* pymol3-numpy2.patch
-------------------------------------------------------------------
Tue Oct 1 19:23:57 UTC 2024 - <hsk17@mail.de>
- add patches:
* pymol3-numpy2.patch: add numpy-2 compatability
* pymol3-version-compare.patch: fix tests/helpers/test_utils.py
-------------------------------------------------------------------
Tue Jun 18 15:42:12 UTC 2024 - <hsk17@mail.de>

View File

@@ -16,55 +16,61 @@
#
%ifarch x86_64
# Only thest on this platform
%bcond_without test
%else
%bcond_with test
%{?!python_module:%define python_module() python-%{**} python3-%{**}}
%define skip_python2 1
%define oldpython python
%define modname pymol-open-source
%endif
%{?sle15_python_module_pythons}
Name: python-pymol
Version: 3.0.0
Version: 3.1.0
Release: 0
Summary: A Molecular Viewer
License: Python-2.0
Group: Productivity/Scientific/Chemistry
URL: https://pymol.org/
Source0: https://github.com/schrodinger/%{modname}/archive/v%{version}/%{modname}-%{version}.tar.gz
# PATCH-FIX-OPENSUSE no-build-date.patch dhall@wustl.edu -- patch eliminates build date
Patch0: no-build-date.patch
# PATCH-FIX-OPENSUSE no-o3.patch tchvatal@suse.com -- do not add O3 to the code
Patch1: no-o3.patch
Source0: https://github.com/schrodinger/pymol-open-source/archive/v%{version}/pymol-open-source-%{version}.tar.gz
Patch0: https://github.com/schrodinger/pymol-open-source/pull/404.patch#/reproducible.patch
BuildRequires: %{python_module devel}
BuildRequires: %{python_module numpy-devel}
BuildRequires: %{python_module qt5-devel}
BuildRequires: %{python_module pip}
BuildRequires: %{python_module setuptools}
BuildRequires: %{python_module wheel}
BuildRequires: fdupes
BuildRequires: freetype2-devel
%if 0%{?sle_version} >= 150500 && 0%{?is_opensuse}
BuildRequires: gcc12-c++
%else
BuildRequires: gcc-c++
%endif
BuildRequires: glew-devel
BuildRequires: glm-devel
BuildRequires: msgpack-cxx-devel
BuildRequires: libpng-devel
BuildRequires: libxml2-devel
BuildRequires: Mesa-libGL-devel
BuildRequires: mmtf-cpp-devel
BuildRequires: msgpack-cxx-devel
BuildRequires: netcdf-devel
BuildRequires: python-rpm-macros
Requires: python-numpy
Requires: ( python-PyQt6 or python-pyside6 )
Recommends: python-pmw
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: %{python_module PyQt6}
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
@@ -84,15 +90,18 @@ The file formats PyMOL can read include PDB, XYZ, CIF, MDL Molfile,
ChemDraw, CCP4 maps, XPLOR maps and Gaussian cube maps.
%prep
%setup -q -n %{modname}-%{version}
%autopatch -p1
%autosetup -p1 -n pymol-open-source-%{version}
%build
%if 0%{?sle_version} >= 150500 && 0%{?is_opensuse}
export CC=gcc-12
export CXX=g++-12
%endif
export CXXFLAGS="%{optflags} -fno-strict-aliasing"
%python_build %{?with_test:--testing}
%pyproject_wheel
%install
%python_install
%pyproject_install
%python_clone -a %{buildroot}%{_bindir}/pymol
%python_expand %fdupes %{buildroot}%{$python_sitearch}
@@ -103,13 +112,11 @@ sed -e '/def testglTF(self):/,+7d' -i testing/tests/api/exporting.py
%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
PYTHONPATH=%{buildroot}%{python_sitearch} python%{python_bin_suffix} -m pymol -ckqy testing/testing.py --offline --run all
%endif
%post
@@ -122,6 +129,12 @@ PYTHONPATH=%{buildroot}%{python_sitearch} python%{python_version} -m pymol -ckqy
%doc README ChangeLog
%license LICENSE
%python_alternative %{_bindir}/pymol
%{python_sitearch}*
%{python_sitearch}/chempy
%{python_sitearch}/pmg_qt
%{python_sitearch}/pmg_tk
%{python_sitearch}/pymol
%{python_sitearch}/pymol-*-info
%{python_sitearch}/pymol2
%{python_sitearch}/web
%changelog

40
reproducible.patch Normal file
View File

@@ -0,0 +1,40 @@
From 1aa8682968dbc5df74e35fab224221a3829260f6 Mon Sep 17 00:00:00 2001
From: "Bernhard M. Wiedemann" <bwiedemann@suse.de>
Date: Sun, 20 Oct 2024 20:02:01 +0200
Subject: [PATCH] Allow to override build date with SOURCE_DATE_EPOCH
to make builds reproducible.
See https://reproducible-builds.org/ for why this is good
and https://reproducible-builds.org/specs/source-date-epoch/
for the definition of this variable.
---
create_shadertext.py | 2 +-
setup.py | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/create_shadertext.py b/create_shadertext.py
index f6857087e..ea68dc22e 100644
--- a/create_shadertext.py
+++ b/create_shadertext.py
@@ -127,7 +127,7 @@ def create_buildinfo(outputdir, pymoldir='.'):
print('''
#define _PyMOL_BUILD_DATE %d
#define _PYMOL_BUILD_GIT_SHA "%s"
- ''' % (time.time(), sha), file=out)
+ ''' % (int(os.environ.get('SOURCE_DATE_EPOCH', time.time())), sha), file=out)
if __name__ == "__main__":
create_shadertext(*sys.argv[1:6])
diff --git a/setup.py b/setup.py
index 507dd32d0..4cec85057 100644
--- a/setup.py
+++ b/setup.py
@@ -168,7 +168,7 @@ def create_buildinfo(outputdir, pymoldir="."):
#define _PyMOL_BUILD_DATE %d
#define _PYMOL_BUILD_GIT_SHA "%s"
"""
- % (time.time(), sha),
+ % (int(os.environ.get('SOURCE_DATE_EPOCH', time.time())), sha),
file=out,
)