Skip to content

Commit 15c6cc4

Browse files
authored
Merge pull request Homebrew#206285 from Homebrew/bump-pymol-3.1.0
pymol 3.1.0
2 parents d984b48 + c0eda1b commit 15c6cc4

File tree

1 file changed

+19
-32
lines changed

1 file changed

+19
-32
lines changed

Formula/p/pymol.rb

Lines changed: 19 additions & 32 deletions
Original file line numberDiff line numberDiff line change
@@ -3,19 +3,17 @@ 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

1111
bottle do
12-
rebuild 3
13-
sha256 cellar: :any, arm64_sequoia: "904c051cb45e268db9779fdad63d78be5fdf06e9e27b232226539ea1b705a456"
14-
sha256 cellar: :any, arm64_sonoma: "8833b94cf1eeac4270c8493a45cf7834f8f504d2fa7035797eff676aa82848b8"
15-
sha256 cellar: :any, arm64_ventura: "a36682e5f1db804e7c5b4b2f2a9e62d555e9651b25b3c3afe5d62f0f7af7c6c1"
16-
sha256 cellar: :any, sonoma: "a92d1debd4a4c78fe3d71e3ea29c4a074e8be8d06178b61b306521d31cdb1fbc"
17-
sha256 cellar: :any, ventura: "b32a2ef527361c088669ed0dacccc16c25b0040a3f54613337ecc3ea58603f77"
18-
sha256 cellar: :any_skip_relocation, x86_64_linux: "233778acd8b74666d8b104390355f5657b47dd87007ee2c13a2b83710cecd4dd"
12+
sha256 cellar: :any, arm64_sonoma: "3ee1fac3f4acfa49378b961e039ae07201634d853fcbd0df352b72f0fd5f442b"
13+
sha256 cellar: :any, arm64_ventura: "12a69a6eb48451e7030a5893caf3edca8ab8a5f43f145f6ad48cbdeab6eba387"
14+
sha256 cellar: :any, sonoma: "f4e51d98c5be2c035a5225dfb7af2a0fe0ade4841e38fa31953108ab4b3b8d9c"
15+
sha256 cellar: :any, ventura: "6b1c6d37c398ae95cc03502d7053f1a62c549101306ec7fd56b4216772a1535c"
16+
sha256 cellar: :any_skip_relocation, x86_64_linux: "06a9e125e347c9159dfa6e598fc200bdee34f1512e5d269c942f4fc64717b74c"
1917
end
2018

2119
depends_on "cmake" => :build
@@ -28,12 +26,13 @@ class Pymol < Formula
2826
depends_on "libpng"
2927
depends_on "netcdf"
3028
depends_on "numpy"
31-
depends_on "pyqt@5"
29+
depends_on "pyqt"
3230
depends_on "[email protected]"
3331

3432
uses_from_macos "libxml2"
3533

3634
on_linux do
35+
depends_on "patchelf" => :build
3736
depends_on "freeglut"
3837
depends_on "mesa"
3938
end
@@ -44,8 +43,8 @@ class Pymol < Formula
4443
end
4544

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

5150
resource "mmtf-python" do
@@ -58,12 +57,6 @@ class Pymol < Formula
5857
sha256 "3a59e6d33857733d0a8ff0c968140b8728f8e27aaa51306160ae6ab13cea26d3"
5958
end
6059

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-
6760
def python3
6861
which("python3.13")
6962
end
@@ -75,20 +68,14 @@ def install
7568
system "cmake", "--install", "build"
7669
end
7770

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
71+
inreplace "setup.py" do |s|
72+
s.gsub!(/ no_glut = True$/, " no_glut = False")
73+
s.gsub!(/ use_msgpackc = "guess"$/, ' use_msgpackc = "c++11"')
74+
end
9075

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

9481
def caveats
@@ -104,7 +91,7 @@ def caveats
10491
PYTHON
10592

10693
system bin/"pymol", "-cq", testpath/"test.py"
107-
assert_predicate testpath/"test.png", :exist?, "Amino acid image should exist"
94+
assert_path_exists testpath/"test.png", "Amino acid image should exist"
10895
system python3, "-c", "import pymol"
10996
end
11097
end

0 commit comments

Comments
 (0)