Skip to content

Commit ec6f9ce

Browse files
BrewTestBotiMichka
authored andcommitted
pymol 3.1.0
1 parent 01f1694 commit ec6f9ce

File tree

1 file changed

+14
-25
lines changed

1 file changed

+14
-25
lines changed

Formula/p/pymol.rb

Lines changed: 14 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,8 @@ class Pymol < Formula
33

44
desc "Molecular visualization system"
55
homepage "https://pymol.org/"
6-
url "https://github.com/schrodinger/pymol-open-source/archive/refs/tags/v3.0.0.tar.gz"
7-
sha256 "45e800a02680cec62dff7a0f92283f4be7978c13a02934a43ac6bb01f67622cf"
6+
url "https://github.com/schrodinger/pymol-open-source/archive/refs/tags/v3.1.0.tar.gz"
7+
sha256 "54306d65060bd58ed8b3dab1a8af521aeb4fd417871f15f463ff05ccb4e121fe"
88
license :cannot_represent
99
head "https://github.com/schrodinger/pymol-open-source.git", branch: "master"
1010

@@ -28,12 +28,13 @@ class Pymol < Formula
2828
depends_on "libpng"
2929
depends_on "netcdf"
3030
depends_on "numpy"
31-
depends_on "pyqt@5"
31+
depends_on "pyqt"
3232
depends_on "[email protected]"
3333

3434
uses_from_macos "libxml2"
3535

3636
on_linux do
37+
depends_on "patchelf" => :build
3738
depends_on "freeglut"
3839
depends_on "mesa"
3940
end
@@ -44,8 +45,8 @@ class Pymol < Formula
4445
end
4546

4647
resource "msgpack" do
47-
url "https://files.pythonhosted.org/packages/08/4c/17adf86a8fbb02c144c7569dc4919483c01a2ac270307e2d59e1ce394087/msgpack-1.0.8.tar.gz"
48-
sha256 "95c02b0e27e706e48d0e5426d1710ca78e0f0628d6e89d5b5a5b91a5f12274f3"
48+
url "https://files.pythonhosted.org/packages/cb/d0/7555686ae7ff5731205df1012ede15dd9d927f6227ea151e901c7406af4f/msgpack-1.1.0.tar.gz"
49+
sha256 "dd432ccc2c72b914e4cb77afce64aab761c1137cc698be3984eee260bcb2896e"
4950
end
5051

5152
resource "mmtf-python" do
@@ -58,12 +59,6 @@ class Pymol < Formula
5859
sha256 "3a59e6d33857733d0a8ff0c968140b8728f8e27aaa51306160ae6ab13cea26d3"
5960
end
6061

61-
# Drop distutils: https://github.com/schrodinger/pymol-open-source/pull/362
62-
patch do
63-
url "https://github.com/schrodinger/pymol-open-source/commit/4d81b4a8537421e9a1c4647934d1a16e24bc51dd.patch?full_index=1"
64-
sha256 "ee5895ecd3bf731fc1ad714cc6cea17cb5dbb81cd4dab62e77554219fe7ae1ec"
65-
end
66-
6762
def python3
6863
which("python3.13")
6964
end
@@ -75,20 +70,14 @@ def install
7570
system "cmake", "--install", "build"
7671
end
7772

78-
venv = virtualenv_create(libexec, python3)
79-
venv.pip_install resources.reject { |r| r.name == "mmtf-cpp" }
80-
81-
site_packages = Language::Python.site_packages(python3)
82-
ENV.prepend_path "PYTHONPATH", Formula["numpy"].opt_prefix/site_packages
83-
ENV.append_path "PREFIX_PATH", buildpath/"mmtf"
84-
ENV.append_path "PREFIX_PATH", Formula["freetype"].opt_prefix
85-
ENV.append_path "PREFIX_PATH", Formula["libxml2"].opt_prefix if OS.linux?
86-
ENV["PIP_CONFIG_SETTINGS"] = "--build-option=--glut --use-msgpackc=c++11"
87-
# setup.py incorrectly handles --install-lib='' set by bdist_wheel
88-
inreplace "setup.py", "self.install_libbase", "'#{venv.site_packages}'"
89-
venv.pip_install_and_link buildpath
73+
inreplace "setup.py" do |s|
74+
s.gsub!(/ no_glut = True$/, " no_glut = False")
75+
s.gsub!(/ use_msgpackc = "guess"$/, ' use_msgpackc = "c++11"')
76+
end
9077

91-
(prefix/site_packages/"homebrew-pymol.pth").write venv.site_packages
78+
ENV["PREFIX_PATH"] = "#{buildpath}/mmtf:#{ENV["CMAKE_PREFIX_PATH"]}"
79+
venv = virtualenv_install_with_resources without: "mmtf-cpp"
80+
(prefix/Language::Python.site_packages(python3)/"homebrew-pymol.pth").write venv.site_packages
9281
end
9382

9483
def caveats
@@ -104,7 +93,7 @@ def caveats
10493
PYTHON
10594

10695
system bin/"pymol", "-cq", testpath/"test.py"
107-
assert_predicate testpath/"test.png", :exist?, "Amino acid image should exist"
96+
assert_path_exists testpath/"test.png", "Amino acid image should exist"
10897
system python3, "-c", "import pymol"
10998
end
11099
end

0 commit comments

Comments
 (0)