pyqt: 6.0.3
parent
fa9908bb00
commit
2f5840aa6e
|
@ -0,0 +1 @@
|
||||||
|
../Formula/pyqt.rb
|
|
@ -1,10 +1,9 @@
|
||||||
class Pyqt < Formula
|
class Pyqt < Formula
|
||||||
desc "Python bindings for v5 of Qt"
|
desc "Python bindings for v6 of Qt"
|
||||||
homepage "https://www.riverbankcomputing.com/software/pyqt/download5"
|
homepage "https://www.riverbankcomputing.com/software/pyqt/intro"
|
||||||
url "https://files.pythonhosted.org/packages/28/6c/640e3f5c734c296a7193079a86842a789edb7988dca39eab44579088a1d1/PyQt5-5.15.2.tar.gz"
|
url "https://files.pythonhosted.org/packages/29/4c/2f98c98536b957117ac02c3ffe027c3a66937c027f6b3506d6dd4aca3389/PyQt6-6.0.3.tar.gz"
|
||||||
sha256 "372b08dc9321d1201e4690182697c5e7ffb2e0770e6b4a45519025134b12e4fc"
|
sha256 "bfe5946a667080f7f755fb5acb92706c3e029bf7679d77fc3898f900f69f768a"
|
||||||
license "GPL-3.0-only"
|
license "GPL-3.0-only"
|
||||||
revision 1
|
|
||||||
|
|
||||||
bottle do
|
bottle do
|
||||||
sha256 cellar: :any, arm64_big_sur: "62dd04f103f14e2e1eaddf86a910150010272f3dbc65ccdc0f8a46b5c42838fb"
|
sha256 cellar: :any, arm64_big_sur: "62dd04f103f14e2e1eaddf86a910150010272f3dbc65ccdc0f8a46b5c42838fb"
|
||||||
|
@ -13,51 +12,55 @@ class Pyqt < Formula
|
||||||
sha256 cellar: :any, mojave: "0ad16dcf14f820bb1ecbd96974264d04f9c58ee8f8068cd7f47de88b275d8c1e"
|
sha256 cellar: :any, mojave: "0ad16dcf14f820bb1ecbd96974264d04f9c58ee8f8068cd7f47de88b275d8c1e"
|
||||||
end
|
end
|
||||||
|
|
||||||
|
depends_on "pyqt-builder" => :build
|
||||||
depends_on "python@3.9"
|
depends_on "python@3.9"
|
||||||
depends_on "qt@5"
|
depends_on "qt"
|
||||||
depends_on "sip"
|
depends_on "sip"
|
||||||
|
|
||||||
resource "PyQt5-sip" do
|
resource "PyQt6-sip" do
|
||||||
url "https://files.pythonhosted.org/packages/73/8c/c662b7ebc4b2407d8679da68e11c2a2eb275f5f2242a92610f6e5024c1f2/PyQt5_sip-12.8.1.tar.gz"
|
url "https://files.pythonhosted.org/packages/95/7e/495d128a62a9f03bbfd71d764baccd44699cdcdeedb8db1dd4429e0646b2/PyQt6_sip-13.0.1.tar.gz"
|
||||||
sha256 "30e944db9abee9cc757aea16906d4198129558533eb7fadbe48c5da2bd18e0bd"
|
sha256 "310d0c0efdbc086ef913f4ecdfaf8e62f2b70cadeacb42536bfe943c19709987"
|
||||||
end
|
end
|
||||||
|
|
||||||
def install
|
def install
|
||||||
version = Language::Python.major_minor_version Formula["python@3.9"].opt_bin/"python3"
|
python = Formula["python@3.9"]
|
||||||
args = ["--confirm-license",
|
args = %W[
|
||||||
"--bindir=#{bin}",
|
--target-dir #{prefix}
|
||||||
"--destdir=#{lib}/python#{version}/site-packages",
|
--no-make
|
||||||
"--stubsdir=#{lib}/python#{version}/site-packages/PyQt5",
|
--confirm-license
|
||||||
"--sipdir=#{share}/sip/Qt5",
|
]
|
||||||
# sip.h could not be found automatically
|
system "sip-build", *args
|
||||||
"--sip-incdir=#{Formula["sip"].opt_include}",
|
cd "build" do
|
||||||
"--qmake=#{Formula["qt@5"].bin}/qmake",
|
qt_prefix = Formula["qt"].prefix Formula["qt"].version
|
||||||
# Force deployment target to avoid libc++ issues
|
inreplace "inventory.txt", python.opt_prefix, prefix
|
||||||
"QMAKE_MACOSX_DEPLOYMENT_TARGET=#{MacOS.version}",
|
inreplace "inventory.txt", qt_prefix, prefix
|
||||||
"--designer-plugindir=#{pkgshare}/plugins",
|
inreplace "Makefile", /(?<=\$\(INSTALL_ROOT\))#{Regexp.escape(python.opt_prefix)}/, prefix
|
||||||
"--qml-plugindir=#{pkgshare}/plugins",
|
inreplace "designer/Makefile", /(?<=\$\(INSTALL_ROOT\))#{Regexp.escape(qt_prefix)}/, prefix
|
||||||
"--pyuic5-interpreter=#{Formula["python@3.9"].opt_bin}/python3",
|
inreplace "qmlscene/Makefile", /(?<=\$\(INSTALL_ROOT\))#{Regexp.escape(qt_prefix)}/, prefix
|
||||||
"--verbose"]
|
system "make", "install"
|
||||||
|
end
|
||||||
|
|
||||||
system Formula["python@3.9"].opt_bin/"python3", "configure.py", *args
|
xy = Language::Python.major_minor_version python.bin/"python3"
|
||||||
system "make"
|
(lib/"python#{xy}/site-packages").install %W[#{prefix}/PyQt#{version.major} #{prefix}/PyQt#{version.major}-#{version}.dist-info]
|
||||||
ENV.deparallelize { system "make", "install" }
|
|
||||||
|
resource("PyQt6-sip").stage do
|
||||||
|
system Formula["python@3.9"].bin/"python3", *Language::Python.setup_install_args(prefix)
|
||||||
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
test do
|
test do
|
||||||
system "#{bin}/pyuic5", "--version"
|
system "#{bin}/pyuic#{version.major}", "-V"
|
||||||
system "#{bin}/pylupdate5", "-version"
|
system "#{bin}/pylupdate#{version.major}", "-V"
|
||||||
|
|
||||||
system Formula["python@3.9"].opt_bin/"python3", "-c", "import PyQt5"
|
system Formula["python@3.9"].opt_bin/"python3", "-c", "import PyQt#{version.major}"
|
||||||
|
# TODO: add additional libraries in future: Position, Multimedia
|
||||||
%w[
|
%w[
|
||||||
Gui
|
Gui
|
||||||
Location
|
|
||||||
Multimedia
|
|
||||||
Network
|
Network
|
||||||
Quick
|
Quick
|
||||||
Svg
|
Svg
|
||||||
Widgets
|
Widgets
|
||||||
Xml
|
Xml
|
||||||
].each { |mod| system Formula["python@3.9"].opt_bin/"python3", "-c", "import PyQt5.Qt#{mod}" }
|
].each { |mod| system Formula["python@3.9"].opt_bin/"python3", "-c", "import PyQt#{version.major}.Qt#{mod}" }
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
Loading…
Reference in New Issue