Opened 7 years ago
Closed 7 years ago
#56139 closed update (fixed)
update to pymol 2.1.0 with PyQt interface support
Reported by: | jwhowarth | Owned by: | |
---|---|---|---|
Priority: | Normal | Milestone: | |
Component: | ports | Version: | |
Keywords: | haspatch maintainer | Cc: | g5pw (Aljaž Srebrnič) |
Port: | pymol |
Description (last modified by jwhowarth)
The attached Portfile.diff switches the build of pymol to use the new PyQt interface. The package retains the dependencies to build the legacy plugins against the tk interface so the apbs tools plugin is still usable. Note that pmw and pdb2pqr are still python 2.7-centric so that the apbs tools plugin is only usable for the default python27 variant of pymol.
Attachments (4)
Change History (27)
comment:1 Changed 7 years ago by jwhowarth
Description: | modified (diff) |
---|
Changed 7 years ago by jwhowarth
Attachment: | pmg_tk_platform.patch added |
---|
comment:2 Changed 7 years ago by jwhowarth
Tested on 10.13 with MacPorts 2.4.3 for the default +python27 as well as the +python34, +python35 and a newly added +python36 variant.
comment:3 Changed 7 years ago by jwhowarth
A few notes on how upstream has wired in the PyQt support. Pymol defaults to using PyQt if available and reverts to the Tk interface if it can't be found. However on darwin, the pymol display window only renders properly under PyQt if pymol is built with the --osx-frameworks option passed to setup.py. So on darwin, a single build really can't render properly on both PyQt and Tk/X11. If the packaging were enhanced to support a -x11 variant that would have to be built without the --osx-frameworks setup.py option. Also, since pymol now defaults to using PyQt if available, such a -x11 variant would have to explicity pass '-N pmg_tk' to the shell script that starts up pymol in order to suppress the use of PyQt.
comment:4 Changed 7 years ago by jwhowarth
Note that the 'legacy plugins' in pymol 2.1.0 don't use PyQt. Hence the need to build with all of the previous tcl/tk dependencies in order to support running those legacy plugins.
comment:5 Changed 7 years ago by jwhowarth
Note that you can test the apbstools plugin functionality for the default python27 variant of pymol by installing apbs and pdb2pqr and following the instructions at https://pymolwiki.org/index.php/Apbsplugin under the section 'Example 1'.
comment:6 Changed 7 years ago by mojca (Mojca Miklavec)
Keywords: | haspatch maintainer added |
---|
comment:7 Changed 7 years ago by jwhowarth
Added notes that Pymol can be run in the classic Tk GUI by appending the '-N pmg_tk' runtime option.
comment:8 Changed 7 years ago by g5pw (Aljaž Srebrnič)
Hello! from a quick glance the submission looks OK. in the file pdb2pqr.patch, the prefix is hardcoded to /opt/local (and it shouldn't be). Use a placeholder like @@PREFIX@@
and replace it inside a reinplace
block in the portfile.
Changed 7 years ago by jwhowarth
Attachment: | pdb2pqr.patch added |
---|
new pdb2pqr.patch to allow apbs-tools plugin to find required pdb2pqr.py from MacPorts pdb2pqr package
comment:9 Changed 7 years ago by jwhowarth
Updated pdb2pqr.patch to remove hard-coded patch with placeholder and Portfile.diff to substitute it post-patch.
comment:10 Changed 7 years ago by jwhowarth
Tweaked Portfile to make sure all the installed python scripts are compiled and also compile them optimized as well. Specifically, the current packaging misses compiling files in those directories like 'modules' which are manually installed.
Changed 7 years ago by jwhowarth
Attachment: | pymol_shell.diff added |
---|
Fix pymol_shell.diff to properly set PYMOL_PATH=@@PYTHON_PKGDIR@@/pymol/pymol_path
comment:11 Changed 7 years ago by jwhowarth
Properly set PYMOL_PATH=@@PYTHON_PKGDIR@@/pymol/pymol_path in pymol_shell.diff so that redundant installations of data, modules, examples, test and scripts subdirectories can be dropped.
comment:12 Changed 7 years ago by reneeotten (Renee Otten)
thanks jwhowarth for keeping the pymol port up-to-date! The Portfile and patches in this ticket work perfectly for me - I like the PyQt interface. Anyway, while you're changing things perhaps you can also make the livecheck work - for me adding livecheck.regex v(\[0-9.\]+).tar.bz2
makes it behave as expected.
comment:13 Changed 7 years ago by jwhowarth
Add lines for svn livecheck...
$ sudo port -d livecheck pymol DEBUG: Copying /Users/howarth/Library/Preferences/com.apple.dt.Xcode.plist to /opt/local/var/macports/home/Library/Preferences DEBUG: Changing to port directory: /Users/howarth/ports/science/pymol DEBUG: OS darwin/17.5.0 (Mac OS X 10.13) arch i386 DEBUG: Re-registering default for build.cmd DEBUG: Re-registering default for destroot.cmd DEBUG: Re-registering default for destroot.destdir DEBUG: Sourcing PortGroup python 1.0 from /opt/local/var/macports/sources/rsync.macports.org/macports/release/tarballs/ports/_resources/port1.0/group/python-1.0.tcl DEBUG: Sourcing PortGroup active_variants 1.1 from /opt/local/var/macports/sources/rsync.macports.org/macports/release/tarballs/ports/_resources/port1.0/group/active_variants-1.1.tcl DEBUG: Sourcing PortGroup active_variants 1.1 from /opt/local/var/macports/sources/rsync.macports.org/macports/release/tarballs/ports/_resources/port1.0/group/active_variants-1.1.tcl DEBUG: Sourcing PortGroup compilers 1.0 from /opt/local/var/macports/sources/rsync.macports.org/macports/release/tarballs/ports/_resources/port1.0/group/compilers-1.0.tcl DEBUG: universal_variant is false, so not adding the default universal variant DEBUG: Executing variant python27 provides python27 DEBUG: Running callback portconfigure::add_automatic_compiler_dependencies DEBUG: Finished running callback portconfigure::add_automatic_compiler_dependencies DEBUG: Running callback portbuild::add_automatic_buildsystem_dependencies DEBUG: Finished running callback portbuild::add_automatic_buildsystem_dependencies DEBUG: Starting logging for pymol DEBUG: Executing org.macports.main (pymol) DEBUG: livecheck phase started at Sat Apr 21 15:57:22 EDT 2018 DEBUG: Executing org.macports.livecheck (pymol) DEBUG: Port (livecheck) version is 4187 DEBUG: Fetching http://svn.code.sf.net/p/pymol/code/trunk/pymol DEBUG: The regex is "Revision (\d+):" DEBUG: The regex matched "Revision 4187:", extracted "4187" DEBUG: The regex matched "Revision 4187:", extracted "4187" pymol seems to be up to date
comment:14 Changed 7 years ago by jwhowarth
Note that release version doesn't mean a whole lot upstream as the Pymol open source version gets lax treatment with regard to tagging release branches and religiously creating release tar balls.
Changed 7 years ago by jwhowarth
Attachment: | Portfile.diff added |
---|
Portfile diff for support of PyQt interface in pymol
comment:15 Changed 7 years ago by jwhowarth
Add support for running the pymol testsuite (which produces the same results as seen for the debian linux pymol packaging).
comment:16 Changed 7 years ago by g5pw (Aljaž Srebrnič)
Is the or
in the second chunk of pmg_tk_platform.patch intentional?
comment:17 Changed 7 years ago by g5pw (Aljaž Srebrnič)
Cc: | g5pw added |
---|
comment:18 Changed 7 years ago by jwhowarth
The rationale of the pmg_tk_platform.patch changes is that python always reports linux2 on modern linux releases and no longer uses the hack for pymol under Gnome and KDE. Since we ware using the same X11 server as a modern linux release, there is no reason to keep using that hack on Darwin.
comment:19 Changed 7 years ago by g5pw (Aljaž Srebrnič)
Oh yeah, I get the reason, I was just wondering if there was a typo (since all the other instance use the "and" operator, but I didn't see the code so it may be correct, of course.
comment:21 Changed 7 years ago by jwhowarth
FYI, I added the pmg_tk_platform.patch to track the behavior of the linux build on Darwin as closely as possible as upstream really only tests the open source builds on linux AFAIK. So are we okay for the commit now?
comment:22 Changed 7 years ago by g5pw (Aljaž Srebrnič)
Commited in [00a4f52bcba6decfdb3ff9e0b5a69f81ccebf5fe/macports-ports] and [753d76539512c705a501d4934cd2cd74297aa9b4/macports-ports] (sorry for the double commit). Thanks for your contribution to MacPorts!
comment:23 Changed 7 years ago by g5pw (Aljaž Srebrnič)
Resolution: | → fixed |
---|---|
Status: | new → closed |
revised pmg_tk_platform.patch to adjust for upstream context changes