diff --git a/.gitignore b/.gitignore index 4e225ad..33b4b49 100644 --- a/.gitignore +++ b/.gitignore @@ -17,3 +17,4 @@ pymol-1.4-20110402svn3938.tar.gz /pymol-2.1.0-20180321svn4187.tar.xz /pymol-open-source-2.3.0.tar.gz /pymol.png +/pymol-open-source-2.4.0.tar.gz diff --git a/pymol-2.3.0-python39_fix.patch b/pymol-2.3.0-python39_fix.patch deleted file mode 100644 index 91eb04d..0000000 --- a/pymol-2.3.0-python39_fix.patch +++ /dev/null @@ -1,93 +0,0 @@ -From 268d23ad99b1a449fd89aa3c9690d3f42d7994a5 Mon Sep 17 00:00:00 2001 -From: Thomas Holder -Date: Wed, 22 Jan 2020 19:57:58 +0100 -Subject: [PATCH] fix #78 replace "rU" file open modes with "r" - -Obsolete in Python 3 and removed in 3.9 ---- - create_shadertext.py | 2 +- - modules/pmg_qt/TextEditor.py | 2 +- - modules/pmg_tk/TextEditor.py | 2 +- - modules/pymol/invocation.py | 2 +- - modules/pymol/parser.py | 2 +- - modules/pymol/plugins/repository.py | 2 +- - 6 files changed, 6 insertions(+), 6 deletions(-) - -diff --git a/create_shadertext.py b/create_shadertext.py -index d29814035..f8bc97f8e 100644 ---- a/create_shadertext.py -+++ b/create_shadertext.py -@@ -82,7 +82,7 @@ def create_shadertext(shaderdir, shaderdir2, outputheader, outputfile): - if not os.path.exists(shaderfile): - shaderfile = os.path.join(shaderdir2, filename) - -- with open(shaderfile, 'rU') as handle: -+ with open(shaderfile, 'r') as handle: - contents = handle.read() - - if True: -diff --git a/modules/pmg_qt/TextEditor.py b/modules/pmg_qt/TextEditor.py -index 13af2123f..2b1af3250 100644 ---- a/modules/pmg_qt/TextEditor.py -+++ b/modules/pmg_qt/TextEditor.py -@@ -31,7 +31,7 @@ def _write(self, handle): - def _open(self, filename): - self.filename = filename or '' - if filename and os.path.exists(filename): -- with open(filename, 'rU') as handle: -+ with open(filename, 'r') as handle: - content = handle.read() - else: - content = '' -diff --git a/modules/pmg_tk/TextEditor.py b/modules/pmg_tk/TextEditor.py -index 14c1ae722..70526f94f 100644 ---- a/modules/pmg_tk/TextEditor.py -+++ b/modules/pmg_tk/TextEditor.py -@@ -26,7 +26,7 @@ def _write(self, handle): - def _open(self, filename): - self.filename = filename or '' - if filename and os.path.exists(filename): -- with open(filename, 'rU') as handle: -+ with open(filename, 'r') as handle: - content = handle.read() - else: - content = '' -diff --git a/modules/pymol/invocation.py b/modules/pymol/invocation.py -index a514091d8..5a4d21873 100644 ---- a/modules/pymol/invocation.py -+++ b/modules/pymol/invocation.py -@@ -191,7 +191,7 @@ class generic: - py_re = re.compile(r"\.py$|\.pym$|\.PY$|\.PYM$") - - def get_pwg_options(filename): -- for line in open(filename, 'rU'): -+ for line in open(filename, 'r'): - a = line.split() - if not a or a[0].startswith('#'): - continue -diff --git a/modules/pymol/parser.py b/modules/pymol/parser.py -index d348c6520..5768639f3 100644 ---- a/modules/pymol/parser.py -+++ b/modules/pymol/parser.py -@@ -397,7 +397,7 @@ - if re.search("\.py$|\.pym$",path) != None: - if self.cmd._feedback(fb_module.parser,fb_mask.warnings): - print("Warning: use 'run' instead of '@' with Python files?") -- layer.script = open(path,'rU') -+ layer.script = open(path,'r') - self.cmd._pymol.__script__ = path - self.nest=self.nest+1 - self.layer[self.nest] = NestLayer() -diff --git a/modules/pymol/plugins/repository.py b/modules/pymol/plugins/repository.py -index ec9a9b3c5..1ae536f3c 100644 ---- a/modules/pymol/plugins/repository.py -+++ b/modules/pymol/plugins/repository.py -@@ -224,7 +224,7 @@ def list_scan(self): - - def retrieve(self, name, binary=True): - url = self.get_full_url(name) -- handle = open(url, "rb" if binary else "rU") -+ handle = open(url, "rb" if binary else "r") - content = handle.read() - handle.close() - return content diff --git a/pymol-mmtf.patch b/pymol-mmtf.patch index 43febc1..cd60b83 100644 --- a/pymol-mmtf.patch +++ b/pymol-mmtf.patch @@ -10,5 +10,5 @@ diff -up pymol-open-source-2.3.0/contrib/mmtf-c/mmtf_parser.cpp.orig contrib/mmt +#endif + #include "mmtf_parser.h" - #include "mmtf_parser_private.h" + //*** Standard libs diff --git a/pymol-setup.py.patch b/pymol-setup.py.patch index a807e16..519e88d 100644 --- a/pymol-setup.py.patch +++ b/pymol-setup.py.patch @@ -1,14 +1,11 @@ --- pymol-open-source-2.3.0.orig/setup.py_orig 2016-10-07 10:52:09.874178679 -0400 +++ pymol-open-source-2.3.0/setup.py 2016-10-07 10:56:46.198125842 -0400 -@@ -255,10 +255,7 @@ +@@ -273,7 +273,7 @@ # legacy stuff '-Wno-char-subscripts', # optimizations -- "-ffast-math", -- "-funroll-loops", -- "-O0" if DEBUG else "-O3", -- "-fcommon", -+ "-O0" if DEBUG else "-O2", +- "-Og" if DEBUG else "-O3", ++ "-Og" if DEBUG else "-O2", ] ext_link_args = [] ext_objects = [] diff --git a/pymol-sip.patch b/pymol-sip.patch deleted file mode 100644 index 19286fe..0000000 --- a/pymol-sip.patch +++ /dev/null @@ -1,13 +0,0 @@ -diff -Nur a/modules/pymol/Qt/__init__.py b/modules/pymol/Qt/__init__.py ---- a/modules/pymol/Qt/__init__.py 2018-03-13 08:32:34.000000000 -0700 -+++ b/modules/pymol/Qt/__init__.py 2020-01-13 10:45:58.568900161 -0800 -@@ -30,7 +30,8 @@ - - if not PYQT_NAME: - try: -- __import__("sip").setapi("QString", 2) -+ from PyQt4 import sip -+ sip.setapi("QString", 2) - from PyQt4 import QtGui, QtCore, QtOpenGL - PYQT_NAME = 'PyQt4' - except ImportError: diff --git a/pymol.appdata.xml b/pymol.appdata.xml index 71ee7b1..3afdc8a 100644 --- a/pymol.appdata.xml +++ b/pymol.appdata.xml @@ -47,5 +47,5 @@ https://www.pymol.org/ - tim.fenn_at_gmail.com + pymol-owner@fedoraproject.org diff --git a/pymol.spec b/pymol.spec index eb3d37a..6c2c43e 100644 --- a/pymol.spec +++ b/pymol.spec @@ -1,7 +1,7 @@ Name: pymol Summary: PyMOL Molecular Graphics System -Version: 2.3.0 -Release: 9%{?dist} +Version: 2.4.0 +Release: 1%{?dist} # Which files use following license: # BSD: main license of open source PyMOL and some plugins @@ -27,13 +27,6 @@ Patch3: %{name}-mmtf.patch # Fix brp-python-bytecompile script Patch4: %{name}-python3.patch -# Compatibility fix for Python 3.9 -# https://github.com/schrodinger/pymol-open-source/issues/78 -Patch5: %{name}-%{version}-python39_fix.patch - -# rhbz#1794874 -Patch6: %{name}-sip.patch - BuildRequires: desktop-file-utils BuildRequires: libappstream-glib BuildRequires: freetype-devel @@ -44,6 +37,9 @@ BuildRequires: libGL-devel BuildRequires: libpng-devel BuildRequires: libxml2-devel BuildRequires: mmtf-cpp-devel +BuildRequires: msgpack-devel +BuildRequires: netcdf-devel +BuildRequires: catch-devel BuildRequires: python3-devel BuildRequires: python3-setuptools BuildRequires: python3-simplejson @@ -59,7 +55,6 @@ BuildRequires: freeglut-devel BuildRequires: python3-pyside2-devel %endif - Requires: apbs%{?_isa} Requires: python3-numpy%{?_isa} Requires: python3-mmtf @@ -81,17 +76,7 @@ perform many other valuable tasks (such as editing PDB files) to assist you in your research. %prep -%autosetup -n %{name}-open-source-%{version} -N - -%patch0 -p1 -%patch1 -p1 -%patch2 -p1 -%patch3 -p1 -%patch4 -p1 -%if 0%{?python3_version_nodots} == 39 -%patch5 -p1 -b .python39_fix -%endif -%patch6 -p1 -b .sip +%autosetup -n %{name}-open-source-%{version} -p1 ln -sr modules/web modules/pymol_web sed -i 1d modules/pmg_tk/startup/apbs_tools.py @@ -108,26 +93,26 @@ export CXXFLAGS="%{optflags}" # Create executable script for running PyMOL echo "#!/bin/sh" > pymol -echo "export PYMOL_PATH=%{python3_sitearch}/pymol" >> pymol -echo "exec %{__python3} %{python3_sitearch}/pymol/__init__.py \"\$@\"" >> pymol - -cp -a data examples test scripts %{buildroot}%{python3_sitearch}/pymol/ - -rm -f %{buildroot}%{python3_sitearch}/pymol/examples/devel/link_demo.py -rm -f %{buildroot}%{python3_sitearch}/pymol/examples/devel/particle01.py -rm -f %{buildroot}%{python3_sitearch}/pymol/examples/devel/particle02.py -rm -f %{buildroot}%{python3_sitearch}/pymol/test/inp/B03.py -rm -f %{buildroot}%{python3_sitearch}/pymol/test/inp/B05.py -rm -f %{buildroot}%{python3_sitearch}/pymol/test/inp/B11.py -rm -f %{buildroot}%{python3_sitearch}/pymol/test/ref/T01.log - -rm -f %{buildroot}%{python3_sitearch}/pymol/pymol_path/examples/devel/link_demo.py -rm -f %{buildroot}%{python3_sitearch}/pymol/pymol_path/examples/devel/particle01.py -rm -f %{buildroot}%{python3_sitearch}/pymol/pymol_path/examples/devel/particle02.py -rm -f %{buildroot}%{python3_sitearch}/pymol/pymol_path/test/inp/B03.py -rm -f %{buildroot}%{python3_sitearch}/pymol/pymol_path/test/inp/B05.py -rm -f %{buildroot}%{python3_sitearch}/pymol/pymol_path/test/inp/B11.py -rm -f %{buildroot}%{python3_sitearch}/pymol/pymol_path/test/ref/T01.log +echo "export PYMOL_PATH=%{python3_sitearch}/%{name}" >> %{name} +echo "exec %{__python3} %{python3_sitearch}/%{name}/__init__.py \"\$@\"" >> %{name} + +cp -a data examples test %{buildroot}%{python3_sitearch}/%{name}/ + +rm -f %{buildroot}%{python3_sitearch}/%{name}/examples/devel/link_demo.py +rm -f %{buildroot}%{python3_sitearch}/%{name}/examples/devel/particle01.py +rm -f %{buildroot}%{python3_sitearch}/%{name}/examples/devel/particle02.py +rm -f %{buildroot}%{python3_sitearch}/%{name}/test/inp/B03.py +rm -f %{buildroot}%{python3_sitearch}/%{name}/test/inp/B05.py +rm -f %{buildroot}%{python3_sitearch}/%{name}/test/inp/B11.py +rm -f %{buildroot}%{python3_sitearch}/%{name}/test/ref/T01.log + +rm -f %{buildroot}%{python3_sitearch}/%{name}/pymol_path/examples/devel/link_demo.py +rm -f %{buildroot}%{python3_sitearch}/%{name}/pymol_path/examples/devel/particle01.py +rm -f %{buildroot}%{python3_sitearch}/%{name}/pymol_path/examples/devel/particle02.py +rm -f %{buildroot}%{python3_sitearch}/%{name}/pymol_path/test/inp/B03.py +rm -f %{buildroot}%{python3_sitearch}/%{name}/pymol_path/test/inp/B05.py +rm -f %{buildroot}%{python3_sitearch}/%{name}/pymol_path/test/inp/B11.py +rm -f %{buildroot}%{python3_sitearch}/%{name}/pymol_path/test/ref/T01.log mkdir -p %{buildroot}%{_bindir} install -p -m 755 pymol %{buildroot}%{_bindir}/ @@ -141,20 +126,23 @@ install -p -m 644 %{SOURCE3} %{buildroot}%{_metainfodir}/ appstream-util validate-relax --nonet %{buildroot}/%{_metainfodir}/*.appdata.xml %files -%doc AUTHORS DEVELOPERS README +%doc AUTHORS DEVELOPERS README.* ChangeLog %license LICENSE %{python3_sitearch}/*.egg-info %{python3_sitearch}/chempy/ %{python3_sitearch}/pmg_tk/ %{python3_sitearch}/pmg_qt/ -%{python3_sitearch}/pymol/ -%{python3_sitearch}/pymol2/ -%{_bindir}/pymol -%{_datadir}/applications/pymol.desktop -%{_metainfodir}/pymol.appdata.xml -%{_datadir}/pixmaps/pymol.png +%{python3_sitearch}/%{name}/ +%{python3_sitearch}/%{name}2/ +%{_bindir}/%{name} +%{_datadir}/applications/%{name}.desktop +%{_metainfodir}/%{name}.appdata.xml +%{_datadir}/pixmaps/%{name}.png %changelog +* Thu Jun 18 2020 Antonio Trande 2.4.0-1 +- Release 2.4.0 + * Tue Jun 16 2020 Antonio Trande 2.3.0-9 - Patched for using Qt interface (rhbz#1794874) diff --git a/sources b/sources index 3482735..7ed419d 100644 --- a/sources +++ b/sources @@ -1,2 +1,2 @@ -SHA512 (pymol-open-source-2.3.0.tar.gz) = e1dcea1c97bcd9045d3543e92902f240e6affbf61a38e8d2a0be04309e3dbabfe1a869847d1423b3151008978d4c305bbf3ce994fc9d453c0063ce020100c133 +SHA512 (pymol-open-source-2.4.0.tar.gz) = 2b19294197d58a808bf7bb7fa9f829c2ec582ba47a4380783a2b1eedda2ce4118cd398e01885db8c449e7fd5e4c08a1c40508e679ef42d8e183a6a52b031c02a SHA512 (pymol.png) = 561f561905c1ef648b0c3b6779193dd056e676ccf0666f21affbf7eab32675e6e8eb91d3fff15e704e40806f5879ded001f1eb0c9251232c0e33235d70c2b6bc