pyqt-3d: simplify the formula

master
PaperChalice 2021-03-24 17:52:59 +08:00 committed by Carlo Cabrera
parent 83d468221d
commit 11851d997b
1 changed files with 4 additions and 4 deletions

View File

@ -21,17 +21,17 @@ class Pyqt3d < Formula
def install
pyqt = Formula["pyqt"]
xy = Language::Python.major_minor_version Formula["python@3.9"].opt_bin/"python3"
python = Formula["python@3.9"]
site_packages = Language::Python.site_packages(python)
open("pyproject.toml", "a") do |f|
f.puts <<~EOS
[tool.sip.project]
sip-include-dirs = ["#{pyqt.opt_lib}/python#{xy}/site-packages/PyQt#{pyqt.version.major}/bindings"]
sip-include-dirs = ["#{pyqt.prefix/site_packages}/PyQt#{pyqt.version.major}/bindings"]
EOS
end
system "sip-install", "--target-dir", prefix
(lib/"python#{xy}/site-packages").install %W[#{prefix}/PyQt#{pyqt.version.major} #{prefix}/PyQt#{pyqt.version.major}_3D-#{version}.dist-info]
system "sip-install", "--target-dir", prefix/site_packages
end
test do