diff options
author | V3n3RiX <venerix@koprulu.sector> | 2024-09-29 01:25:46 +0100 |
---|---|---|
committer | V3n3RiX <venerix@koprulu.sector> | 2024-09-29 01:25:46 +0100 |
commit | 04ac238703da84168e02b06fb131d1d17d85be23 (patch) | |
tree | f32aa3a6b6a6c879a798006535ad544bf888df73 /sci-chemistry | |
parent | 6405cba4bf18141460bc9fcb8f5580532d4b46f8 (diff) |
gentoo auto-resync : 29:09:2024 - 01:25:46
Diffstat (limited to 'sci-chemistry')
-rw-r--r-- | sci-chemistry/Manifest.gz | bin | 8532 -> 8531 bytes | |||
-rw-r--r-- | sci-chemistry/pymol/Manifest | 7 | ||||
-rw-r--r-- | sci-chemistry/pymol/files/pymol-3.0.0-SceneGetDrawFlag-indexing.patch | 22 | ||||
-rw-r--r-- | sci-chemistry/pymol/files/pymol-3.0.0-distutils-py3.12.patch | 70 | ||||
-rw-r--r-- | sci-chemistry/pymol/files/pymol-3.0.0-eof-maeffplugin.patch | 22 | ||||
-rw-r--r-- | sci-chemistry/pymol/files/pymol-3.0.0-lto-molfile-plugin.patch | 187 | ||||
-rw-r--r-- | sci-chemistry/pymol/files/pymol-3.0.0-numpy2.patch | 35 | ||||
-rw-r--r-- | sci-chemistry/pymol/files/pymol-3.0.0-py3.12-progress.patch | 26 | ||||
-rw-r--r-- | sci-chemistry/pymol/pymol-3.0.0-r1.ebuild | 123 |
9 files changed, 492 insertions, 0 deletions
diff --git a/sci-chemistry/Manifest.gz b/sci-chemistry/Manifest.gz Binary files differindex e2d3b7d6c932..a46ec2c846c6 100644 --- a/sci-chemistry/Manifest.gz +++ b/sci-chemistry/Manifest.gz diff --git a/sci-chemistry/pymol/Manifest b/sci-chemistry/pymol/Manifest index c2aeb2fb9df4..1352ddf62ff9 100644 --- a/sci-chemistry/pymol/Manifest +++ b/sci-chemistry/pymol/Manifest @@ -1,5 +1,12 @@ AUX pymol-2.5.0-format-security.patch 562 BLAKE2B 566f653ca3abd4498f9ee5d7255e1b06d8df320bd25a569620b1ee33da0cfb6a969fd3e0a65fbce7116cd6567d9a544c57f4d6d399bec00b9effa8273a52153c SHA512 4e93a0449470abdbd2d943ef0a5fac7f302485ca42c6d9ccdf1ab9a879029d5185c3f1a3a2e237fd8b3b3bf0a306bce07db3226257360127c97546480c233c4f +AUX pymol-3.0.0-SceneGetDrawFlag-indexing.patch 821 BLAKE2B c854aa49441b308ab7f12265442961ddeb3633b71234bd554d45c3950c3ddcf457ac98e0aa1d226ec7ee3abbd2d0207cce97e40144cb81992f241c3a964b1bcc SHA512 326e04f988ff585a062a342b9553ab6b074102c0599b210a5dfa769cb8841e1619e74b670a2d673a80b81c5a9218e052829e0cc574049a1363741e762cac59e7 +AUX pymol-3.0.0-distutils-py3.12.patch 2620 BLAKE2B 802ef75cf22b408ff8e280c561f4954f7f4d816887107f8db36b85988c345948e7d2cfe97b099cb79794d61d3594666e12f90a64c1f0af2206458ade776a1a2b SHA512 3911207f1a03b19675105cd707d644e76258aa9ab58be3891833873d41b460f6161ac83d495a6bc58bf281831376d17186083d447269d755d2e69ee78e6fc5c2 +AUX pymol-3.0.0-eof-maeffplugin.patch 1071 BLAKE2B b28941bd3fddb534fe150b3d98ef6a17058b25b59717a15ca9a807812f05d98f3f7b2cedee9230eab0465c493bbf375325259260bb1cd0d03beafbb4a8f306d0 SHA512 b39846fa9b3b90d5952f22fdde323039bd09a5c43abdd7975bc72880854f22ae39a0d3d30a6640e98c6d7e8734306e00af3fdae555a4292e48ad7b46a83753f8 +AUX pymol-3.0.0-lto-molfile-plugin.patch 5585 BLAKE2B d9cedbb270184d562373fc9e8a2e1a75b08c5d1a956c28eac55662b424996a6770ea46d45b0645a7b96ab465af0f6aafac3120ed13a29f12daea5ab7c947da5d SHA512 babe47d4cbea390031d1880cf442c780f442d41bdeb181509df307550aa8d9c829af51a676665e8d55ed4cd6ab3f2cde363a087606cb064238bbc74be7e2fe51 +AUX pymol-3.0.0-numpy2.patch 1203 BLAKE2B bd06e70fea5a9a4940ecea226f2bd8d1f4753826ee246d6d418cd473c0ee738b9373c8f6e2f5e56e3708ab2934486286d43c33441e1e97f819c6ac0af731d060 SHA512 2c9445f013383fb534dca4306fa5f8ab8f55b33ed4bc53617e7765cb708a4ebc5380f8578ea1236f61e9e77a6d5a8e21588f7f081f6d6408195b9fa5b67c60b2 +AUX pymol-3.0.0-py3.12-progress.patch 985 BLAKE2B 77103dc94b2e9e304f65e429f5abb1cd2158d95a0b8b53e90d7e915b213a934ea8a598240355437b00cf95e0203c382d003034fa30a37dc00758351d13163e38 SHA512 ff7b75402a92d491145e1487fa018182a2a5a91f1736c63d07a194e6710d425f1bba59a7b4f0f49321e27db8c05e26feda7df12f42a66b1e1cdbf1e52f869a5b DIST pymol-1.8.4.0.png.xz 19528 BLAKE2B f3d23d4cedca3d8bb96b20646a548da4be570697e3346a11b01c5c3599b536ba4697be08472dfa8a4f6533167defc1a37a1de332931a73857319cb28fd42cd2b SHA512 40bb0d3f226476f6e047b5361956aad955232a97641474765eaa5204f0539aee3810e0266213618a45364f9f31f6eb18380b17e0c79f64065f7b62a9016caa7c DIST pymol-3.0.0.tar.gz 29510174 BLAKE2B b67818e408045e386e44a203f29cd94a0ce34ec706776d29f78f1720bdc5c79d88f3b3e178882295b5a636d97fe70ff49eb1b021a9a6b96f0f4216bc392219d1 SHA512 eab05a46220339a05d8d4facdce6bfa08c6fc8a858a7b228236ef6c4054207059ef0f53a26bedebe4084a74b510015937fb4477f99612b21412cd75bf0c376a2 +EBUILD pymol-3.0.0-r1.ebuild 3372 BLAKE2B 378b1587c25a4592b6e2e503e7280f38d44696a899d5931c6f3e5a2ef11ed5f28d2bd9ba2e8024e6ed223d6bf504a2b76f7b730926eac7bbdbfbb29f986b3287 SHA512 597918ca799ceb6b2a29704ddc96e2b67464d66dd27ce6d32b00294854d34a4abbeb340848f2d3101464b6f263fb4dd07314c54d14fb87be57b07a27ae06522a EBUILD pymol-3.0.0.ebuild 2958 BLAKE2B 2eac68b0cf15c3369e243b7456e00b1c1119f0d8399bea7321794981f41911bd56bc10713c9102475a054e6a52353cef63c0f9416974bb1db5d91ddd9f6d2dfa SHA512 ca7a597cd909d5a04e77c0afb7e2c07413b13dd42d5788db97defabee23370695299e17193b431eb6190c87a0e06d8e741d2067de973652d1749b244cfeb0254 MISC metadata.xml 495 BLAKE2B 32d321e92c7e7c226747660c314f5cff9aabf9ee41c8a864064432ac9554879db7bf60640993dadae6e00a9b7d1367cb8ab228b63b8797ca84e5618eeeb192cc SHA512 36ef956d111c76182c70c81a830885f540fb2710f696b2711837d4bf1055a8792226f38b827f389a3a3861f259bae1394d6da50c2b33a0ddb4e6940262e1b25d diff --git a/sci-chemistry/pymol/files/pymol-3.0.0-SceneGetDrawFlag-indexing.patch b/sci-chemistry/pymol/files/pymol-3.0.0-SceneGetDrawFlag-indexing.patch new file mode 100644 index 000000000000..c23bf79d6166 --- /dev/null +++ b/sci-chemistry/pymol/files/pymol-3.0.0-SceneGetDrawFlag-indexing.patch @@ -0,0 +1,22 @@ +From 50be59fb4bd6706c7939a659f4477041e2f0619e Mon Sep 17 00:00:00 2001 +From: Jarrett Johnson <36459667+JarrettSJohnson@users.noreply.github.com> +Date: Sat, 6 Apr 2024 22:49:41 -0400 +Subject: [PATCH] PYMOL-4849: Fix SceneGetDrawFlag slot indexing + +--- + layer1/Scene.cpp | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/layer1/Scene.cpp b/layer1/Scene.cpp +index e4888db6d..ed211bdd6 100644 +--- a/layer1/Scene.cpp ++++ b/layer1/Scene.cpp +@@ -4448,7 +4448,7 @@ int SceneGetDrawFlag(GridInfo * grid, int *slot_vla, int slot) + { + if(((slot < 0) && grid->slot) || + ((slot == 0) && (grid->slot == 0)) || +- (slot_vla && (slot_vla[slot] == grid->slot))) { ++ (slot_vla && (slot >= 0 && slot_vla[slot] == grid->slot))) { + draw_flag = true; + } + } diff --git a/sci-chemistry/pymol/files/pymol-3.0.0-distutils-py3.12.patch b/sci-chemistry/pymol/files/pymol-3.0.0-distutils-py3.12.patch new file mode 100644 index 000000000000..3ab0384bd5f6 --- /dev/null +++ b/sci-chemistry/pymol/files/pymol-3.0.0-distutils-py3.12.patch @@ -0,0 +1,70 @@ +From 3d3c8963798d426e70675c3c40df146e12869b0a Mon Sep 17 00:00:00 2001 +From: Branch Vincent <branchevincent@gmail.com> +Date: Fri, 10 May 2024 22:12:58 -0700 +Subject: [PATCH] replace distutils for python 3.12 (#362) + +Co-authored-by: Jarrett Johnson <jarrett.johnson@schrodinger.com> +--- + create_shadertext.py | 3 +-- + modules/pymol/plugins/installation.py | 7 +++---- + testing/tests/system/pymolwin.py | 1 - + 3 files changed, 4 insertions(+), 7 deletions(-) + +diff --git a/create_shadertext.py b/create_shadertext.py +index 7bae72180..f6857087e 100644 +--- a/create_shadertext.py ++++ b/create_shadertext.py +@@ -7,7 +7,6 @@ + from collections import defaultdict + from os.path import dirname + from subprocess import Popen, PIPE +-from distutils import dir_util + + def create_all(generated_dir, pymoldir="."): + ''' +@@ -30,7 +29,7 @@ def __init__(self, filename): + self.out = cStringIO.StringIO() + self.filename = filename + else: +- dir_util.mkpath(os.path.dirname(filename)) ++ os.makedirs(os.path.dirname(filename), exist_ok=True) + self.out = open(filename, "w") + self.filename = None + def close(self): +diff --git a/modules/pymol/plugins/installation.py b/modules/pymol/plugins/installation.py +index 3a980545b..2fb8f6f03 100644 +--- a/modules/pymol/plugins/installation.py ++++ b/modules/pymol/plugins/installation.py +@@ -45,8 +45,6 @@ def cmp_version(v1, v2): + ''' + Compares two version strings. An empty version string is always considered + smaller than a non-empty version string. +- +- Uses distutils.version.StrictVersion to evaluate non-empty version strings. + ''' + if v1 == v2: + return 0 +@@ -55,8 +53,9 @@ def cmp_version(v1, v2): + if v2 == '': + return 1 + try: +- from distutils.version import StrictVersion as Version +- return cmp(Version(v1), Version(v2)) ++ v1_parts = list(map(int, v1.split('.'))) ++ v2_parts = list(map(int, v2.split('.'))) ++ return (v1_parts > v2_parts) - (v1_parts < v2_parts) + except: + print(' Warning: Version parsing failed for', v1, 'and/or', v2) + return 0 +diff --git a/testing/tests/system/pymolwin.py b/testing/tests/system/pymolwin.py +index 429fd28aa..e7885bd38 100644 +--- a/testing/tests/system/pymolwin.py ++++ b/testing/tests/system/pymolwin.py +@@ -7,7 +7,6 @@ + import subprocess
+ import sys
+ import unittest
+-from distutils.spawn import find_executable
+ from pymol import cmd, CmdException, testing, stored
+
+ @unittest.skipIf(not sys.platform.startswith('win'), 'windows only')
diff --git a/sci-chemistry/pymol/files/pymol-3.0.0-eof-maeffplugin.patch b/sci-chemistry/pymol/files/pymol-3.0.0-eof-maeffplugin.patch new file mode 100644 index 000000000000..8eb8fbde318b --- /dev/null +++ b/sci-chemistry/pymol/files/pymol-3.0.0-eof-maeffplugin.patch @@ -0,0 +1,22 @@ +From f005dde377e3e50b6e3f405939435c5061fa8b63 Mon Sep 17 00:00:00 2001 +From: Jarrett Johnson <36459667+JarrettSJohnson@users.noreply.github.com> +Date: Mon, 22 Apr 2024 11:12:21 -0400 +Subject: [PATCH] PYMOL-4869: Only compare eof token in maeffplugin parser + +--- + contrib/uiuc/plugins/molfile_plugin/src/maeffplugin.cpp | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/contrib/uiuc/plugins/molfile_plugin/src/maeffplugin.cpp b/contrib/uiuc/plugins/molfile_plugin/src/maeffplugin.cpp +index efaede65b..0547ff91b 100644 +--- a/contrib/uiuc/plugins/molfile_plugin/src/maeffplugin.cpp ++++ b/contrib/uiuc/plugins/molfile_plugin/src/maeffplugin.cpp +@@ -248,7 +248,7 @@ const char * Tokenizer::token(bool ignore_single) { + char c = peek(); + bool good = false; + ssize_t diff; +- while(state != DONE && c >= 0) { ++ while(state != DONE && c != std::char_traits<char>::eof()) { + // make sure we have space in m_token for 2 more characters + if ((diff = ptr-m_token) >= max_token_size-1) { + m_token = (char *)realloc( m_token, 2*max_token_size ); diff --git a/sci-chemistry/pymol/files/pymol-3.0.0-lto-molfile-plugin.patch b/sci-chemistry/pymol/files/pymol-3.0.0-lto-molfile-plugin.patch new file mode 100644 index 000000000000..445fc6bc3a10 --- /dev/null +++ b/sci-chemistry/pymol/files/pymol-3.0.0-lto-molfile-plugin.patch @@ -0,0 +1,187 @@ +From 9d3061ca58d8b69d7dad74a68fc13fe81af0ff8e Mon Sep 17 00:00:00 2001 +From: Jarrett Johnson <jarrett.johnson@schrodinger.com> +Date: Thu, 5 Sep 2024 11:20:02 -0400 +Subject: [PATCH] Symbol renaming in molfile_plugin and internal linkage + +Fixes #395 +--- + contrib/uiuc/plugins/molfile_plugin/src/ReadPARM7.h | 10 +++++----- + .../uiuc/plugins/molfile_plugin/src/parm7plugin.cpp | 8 +++++--- + contrib/uiuc/plugins/molfile_plugin/src/parmplugin.cpp | 2 ++ + layer0/Isosurf.cpp | 6 ++++-- + layer0/Tetsurf.cpp | 6 ++++-- + ov/src/OVOneToAny.cpp | 2 ++ + ov/src/OVOneToOne.cpp | 2 ++ + 7 files changed, 24 insertions(+), 12 deletions(-) + +diff --git a/contrib/uiuc/plugins/molfile_plugin/src/ReadPARM7.h b/contrib/uiuc/plugins/molfile_plugin/src/ReadPARM7.h +index 21d967d79..6bd6ddb08 100644 +--- a/contrib/uiuc/plugins/molfile_plugin/src/ReadPARM7.h ++++ b/contrib/uiuc/plugins/molfile_plugin/src/ReadPARM7.h +@@ -59,7 +59,7 @@ + #endif + + +-typedef struct parm { ++typedef struct parm7 { + char title[85]; + char version[85]; + int IfBox, Nmxrs, IfCap, +@@ -70,7 +70,7 @@ typedef struct parm { + Ipatm, Natcap,Ifpert,Nbper,Ngper,Ndper,Mbper,Mgper,Mdper, + Numextra; + _REAL Box[3], Cutcap, Xcap, Ycap, Zcap; +-} parmstruct; ++} parm7struct; + + static int read_parm7_flag(FILE *file, const char *flag, const char *format) { + char buf[1024]; +@@ -359,10 +359,10 @@ static void close_parm7_file(FILE *fileptr, int popn) { + + static const char *parm7 = "%8d%8d%8d%8d%8d%8d%8d%8d%8d%8d\n"; + +-static parmstruct *read_parm7_header(FILE *file) { ++static parm7struct *read_parm7_header(FILE *file) { + char sdum[512]; +- parmstruct *prm; +- prm = new parmstruct; ++ parm7struct *prm; ++ prm = new parm7struct; + + /* READ VERSION */ + fgets(sdum, 512, file); +diff --git a/contrib/uiuc/plugins/molfile_plugin/src/parm7plugin.cpp b/contrib/uiuc/plugins/molfile_plugin/src/parm7plugin.cpp +index faf2717c6..2d46553b4 100644 +--- a/contrib/uiuc/plugins/molfile_plugin/src/parm7plugin.cpp ++++ b/contrib/uiuc/plugins/molfile_plugin/src/parm7plugin.cpp +@@ -24,13 +24,15 @@ + #include "molfile_plugin.h" + #include "ReadPARM7.h" + ++namespace { + typedef struct { +- parmstruct *prm; ++ parm7struct *prm; + int popn; + FILE *fd; + int nbonds; + int *from, *to; + } parmdata; ++} + + static void *open_parm7_read(const char *filename, const char *,int *natoms) { + FILE *fd; +@@ -39,7 +41,7 @@ static void *open_parm7_read(const char *filename, const char *,int *natoms) { + fprintf(stderr, "parm7plugin) Cannot open parm file '%s'\n", filename); + return NULL; + } +- parmstruct *prm = read_parm7_header(fd); ++ parm7struct *prm = read_parm7_header(fd); + if (!prm) { + close_parm7_file(fd, popn); + return NULL; +@@ -58,7 +60,7 @@ static void *open_parm7_read(const char *filename, const char *,int *natoms) { + + static int read_parm7_structure(void *mydata, int *optflags, molfile_atom_t *atoms) { + parmdata *p = (parmdata *)mydata; +- const parmstruct *prm = p->prm; ++ const parm7struct *prm = p->prm; + FILE *file = p->fd; + char buf[85]; + char field[85]; +diff --git a/contrib/uiuc/plugins/molfile_plugin/src/parmplugin.cpp b/contrib/uiuc/plugins/molfile_plugin/src/parmplugin.cpp +index acabcb1b5..4996383e1 100644 +--- a/contrib/uiuc/plugins/molfile_plugin/src/parmplugin.cpp ++++ b/contrib/uiuc/plugins/molfile_plugin/src/parmplugin.cpp +@@ -24,12 +24,14 @@ + #include "ReadPARM.h" + #include "molfile_plugin.h" + ++namespace { + typedef struct { + ReadPARM *rp; + FILE *parm; + int natoms; + int *from, *to; + } parmdata; ++} + + static void *open_parm_read(const char *filename, const char *, + int *natoms) { +diff --git a/layer0/Isosurf.cpp b/layer0/Isosurf.cpp +index 77cf42eeb..b2dfaedd7 100644 +--- a/layer0/Isosurf.cpp ++++ b/layer0/Isosurf.cpp +@@ -44,11 +44,13 @@ Z* ------------------------------------------------------------------- + + #define I4(field,P1,P2,P3,P4) ((field)->get<int>(P1,P2,P3,P4)) + +-typedef struct PointType { ++namespace { ++struct PointType { + float Point[3]; + int NLink; + struct PointType* Link[4]; +-} PointType; ++}; ++} + + #define EdgePtPtr(field,P2,P3,P4,P5) ((field)->ptr(P2,P3,P4,P5)) + +diff --git a/layer0/Tetsurf.cpp b/layer0/Tetsurf.cpp +index 0d78b535e..cb2f5b37b 100644 +--- a/layer0/Tetsurf.cpp ++++ b/layer0/Tetsurf.cpp +@@ -38,12 +38,14 @@ Z* ------------------------------------------------------------------- + + #define I3(field,P1,P2,P3) ((field)->get<int>(P1,P2,P3)) + +-typedef struct { ++namespace { ++struct PointType { + float Point[3]; + float Normal[3]; + int NormalFlag; + int Link; +-} PointType; ++}; ++} + + typedef struct { + PointType *p[3]; +diff --git a/ov/src/OVOneToAny.cpp b/ov/src/OVOneToAny.cpp +index 1a675a51b..5dbbc498c 100644 +--- a/ov/src/OVOneToAny.cpp ++++ b/ov/src/OVOneToAny.cpp +@@ -8,11 +8,13 @@ + + /* FYI: "up" stands for UniquePair -- a precursor to OneToAny */ + ++namespace { + typedef struct { + int active; + ov_word forward_value, reverse_value; + ov_size forward_next; + } up_element; ++} + + struct _OVOneToAny { + OVHeap *heap; +diff --git a/ov/src/OVOneToOne.cpp b/ov/src/OVOneToOne.cpp +index 6dfa8f457..4e9baf9c6 100644 +--- a/ov/src/OVOneToOne.cpp ++++ b/ov/src/OVOneToOne.cpp +@@ -8,11 +8,13 @@ + + /* FYI: "up" stands for UniquePair -- a precursor to OneToOne */ + ++namespace { + typedef struct { + int active; + ov_word forward_value, reverse_value; + ov_size forward_next, reverse_next; + } up_element; ++} + + struct _OVOneToOne { + OVHeap *heap; diff --git a/sci-chemistry/pymol/files/pymol-3.0.0-numpy2.patch b/sci-chemistry/pymol/files/pymol-3.0.0-numpy2.patch new file mode 100644 index 000000000000..7cf2884ee201 --- /dev/null +++ b/sci-chemistry/pymol/files/pymol-3.0.0-numpy2.patch @@ -0,0 +1,35 @@ +From 758cec338057b23007ffd14c960634ff0ee24af1 Mon Sep 17 00:00:00 2001 +From: Jarrett Johnson <jarrett.johnson@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() diff --git a/sci-chemistry/pymol/files/pymol-3.0.0-py3.12-progress.patch b/sci-chemistry/pymol/files/pymol-3.0.0-py3.12-progress.patch new file mode 100644 index 000000000000..b09f36048b20 --- /dev/null +++ b/sci-chemistry/pymol/files/pymol-3.0.0-py3.12-progress.patch @@ -0,0 +1,26 @@ +From 11325a6014565700be9673236c9b7b6c856ea6d9 Mon Sep 17 00:00:00 2001 +From: Jarrett Johnson <jarrett.johnson@schrodinger.com> +Date: Wed, 28 Aug 2024 22:07:15 -0400 +Subject: [PATCH] Python 3.12 TypeError: convert progress to int for progress + bar + +--- + modules/pmg_qt/pymol_qt_gui.py | 4 ++-- + 1 file changed, 2 insertions(+), 2 deletions(-) + +diff --git a/modules/pmg_qt/pymol_qt_gui.py b/modules/pmg_qt/pymol_qt_gui.py +index f2d663204..6e935b0d6 100644 +--- a/modules/pmg_qt/pymol_qt_gui.py ++++ b/modules/pmg_qt/pymol_qt_gui.py +@@ -929,9 +929,9 @@ def command_set_cursor(self, i): + return self.lineedit.setCursorPosition(i) + + def update_progress(self): +- progress = self.cmd.get_progress() ++ progress = int(self.cmd.get_progress() * 100) + if progress >= 0: +- self.progressbar.setValue(progress * 100) ++ self.progressbar.setValue(progress) + self.progressbar.show() + self.abortbutton.show() + else: diff --git a/sci-chemistry/pymol/pymol-3.0.0-r1.ebuild b/sci-chemistry/pymol/pymol-3.0.0-r1.ebuild new file mode 100644 index 000000000000..aeb6bc85c7e1 --- /dev/null +++ b/sci-chemistry/pymol/pymol-3.0.0-r1.ebuild @@ -0,0 +1,123 @@ +# Copyright 1999-2024 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=8 + +PYTHON_COMPAT=( python3_{9..12} ) +DISTUTILS_USE_PEP517="setuptools" +DISTUTILS_EXT=1 + +inherit desktop flag-o-matic xdg distutils-r1 + +DESCRIPTION="A Python-extensible molecular graphics system" +HOMEPAGE="https://www.pymol.org/" +SRC_URI="https://github.com/schrodinger/pymol-open-source/archive/v${PV}.tar.gz -> ${P}.tar.gz" + +S="${WORKDIR}"/${PN}-open-source-${PV} + +LICENSE="BitstreamVera BSD freedist HPND OFL-1.0 public-domain UoI-NCSA" #844991 +SLOT="0" +KEYWORDS="~amd64 ~x86 ~amd64-linux ~x86-linux ~x64-macos" +IUSE="+netcdf web" + +DEPEND=" + dev-cpp/msgpack-cxx + dev-libs/mmtf-cpp + dev-python/numpy[${PYTHON_USEDEP}] + sys-libs/zlib + media-libs/freetype:2 + media-libs/glew:0= + media-libs/glm + media-libs/libpng:0= + netcdf? ( sci-libs/netcdf:0= ) +" +BDEPEND="test? ( >=dev-cpp/catch-2:0 )" +RDEPEND=" + ${DEPEND} + media-video/mpeg-tools + dev-python/pyopengl[${PYTHON_USEDEP}] + dev-python/PyQt5[opengl,${PYTHON_USEDEP}] + dev-python/pmw[${PYTHON_USEDEP}] + sci-chemistry/chemical-mime-data +" + +distutils_enable_tests pytest + +# FIXME: We need to still figure out about how to make all the tests pass +# https://bugs.gentoo.org/932127 +RESTRICT="test" + +PATCHES=( + "${FILESDIR}/${P}-distutils-py3.12.patch" + "${FILESDIR}/${P}-SceneGetDrawFlag-indexing.patch" + "${FILESDIR}/${P}-eof-maeffplugin.patch" + "${FILESDIR}/${P}-numpy2.patch" + "${FILESDIR}/${P}-py3.12-progress.patch" + "${FILESDIR}/${P}-lto-molfile-plugin.patch" +) + +python_prepare_all() { + sed \ + -e "s:\"/usr:\"${EPREFIX}/usr:g" \ + -e "/ext_comp_args.*+=/s:\[.*\]$:\[\]:g" \ + -i setup.py || die + + sed \ + -e "s:/opt/local:${EPREFIX}/usr:g" \ + -e '/ext_comp_args/s:\[.*\]:[]:g' \ + -i setup.py || die + sed \ + -e "s:\['msgpackc'\]:\['msgpack'\]:g" \ + -i setup.py || die + + append-cxxflags -std=c++17 + + distutils-r1_python_prepare_all +} + +python_configure_all() { + use !netcdf && DISTUTILS_ARGS=( --no-vmd-plugins ) +} + +python_install() { + distutils-r1_python_install \ + --pymol-path="${EPREFIX}/usr/share/pymol" + + sed \ + -e '1i#!/usr/bin/env python' \ + "${D}/$(python_get_sitedir)"/pymol/__init__.py > "${T}"/${PN} || die + python_doscript "${T}"/${PN} +} + +python_test() { + "${EPYTHON}" -m pymol -ckqy testing/testing.py --offline --no-mmlibs --no-undo --run all || die +} + +python_install_all() { + distutils-r1_python_install_all + + # Move data to correct location + dodir /usr/share/pymol + mv "${D}/$(python_get_sitedir)"/pymol/pymol_path/* "${ED}/usr/share/pymol" || die + + # These environment variables should not go in the wrapper script, or else + # it will be impossible to use the PyMOL libraries from Python. + cat >> "${T}"/20pymol <<- EOF || die + PYMOL_PATH="${EPREFIX}/usr/share/pymol" + PYMOL_DATA="${EPREFIX}/usr/share/pymol/data" + PYMOL_SCRIPTS="${EPREFIX}/usr/share/pymol/scripts" + EOF + + doenvd "${T}"/20pymol + + newicon "${S}"/data/pymol/icons/icon2.svg ${PN}.svg + make_desktop_entry "${PN} %u" PyMol ${PN} \ + "Graphics;Education;Science;Chemistry;" \ + "MimeType=chemical/x-pdb;chemical/pdby;chemical/x-mdl-sdfile;chemical/x-mdl-molfile;chemical/x-mol2;chemical/seq-aa-fasta;chemical/seq-na-fasta;chemical/x-xyz;chemical/x-mdl-sdf;chemical/x-macromodel-input;chemical/x-vmd;" + + if ! use web; then + rm -rf "${D}/$(python_get_sitedir)/web" || die + fi + + rm -f "${ED}"/usr/share/${PN}/LICENSE || die +} |