-
Notifications
You must be signed in to change notification settings - Fork 13
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Homebrew is migrating formulas to [email protected] Homebrew/homebrew-core#47274 Our homebrew dependencies have already migrated as well. Also, properly install the six python package.
- Loading branch information
Showing
1 changed file
with
20 additions
and
11 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -17,14 +17,14 @@ class Essentia < Formula | |
depends_on "gaia" => :optional | ||
depends_on "tensorflow" => :optional | ||
|
||
option "without-python", "Build without python3 support" | ||
option "without-python", "Build without Python 3.8 support" | ||
|
||
depends_on "python" if build.with? "python" | ||
depends_on "python@3.8" if build.with? "python" | ||
depends_on "numpy" if build.with? "python" | ||
|
||
resource "six" do | ||
url "https://files.pythonhosted.org/packages/16/d8/bc6316cf98419719bd59c91742194c111b6f2e85abac88e496adefaf7afe/six-1.11.0.tar.gz" | ||
sha256 "70e8a77beed4562e7f14fe23a786b54f6296e34344c23bc42f07b15018ff98e9" | ||
url "https://files.pythonhosted.org/packages/21/9f/b251f7f8a76dec1d6651be194dfba8fb8d7781d10ab3987190de8391d08e/six-1.14.0.tar.gz" | ||
sha256 "236bdbdce46e6e6a3d61a337c0f8b763ca1e8717c03b369e87a7ec7ce1319c0a" | ||
end | ||
|
||
def install | ||
|
@@ -44,9 +44,9 @@ def install | |
build_flags += ["--with-tensorflow"] | ||
end | ||
|
||
system "python3", "waf", "configure", *build_flags | ||
system "python3", "waf" | ||
system "python3", "waf", "install" | ||
system Formula["[email protected]"].opt_bin/"python3", "waf", "configure", *build_flags | ||
system Formula["[email protected]"].opt_bin/"python3", "waf" | ||
system Formula["[email protected]"].opt_bin/"python3", "waf", "install" | ||
|
||
python_flags = [ | ||
"--mode=release", | ||
|
@@ -58,9 +58,18 @@ def install | |
ENV['PKG_CONFIG_PATH'] = "#{prefix}/lib/pkgconfig:" + ENV['PKG_CONFIG_PATH'] | ||
|
||
if build.with? "python" | ||
system "python3", "waf", "configure", *python_flags | ||
system "python3", "waf" | ||
system "python3", "waf", "install" | ||
system Formula["[email protected]"].opt_bin/"python3", "waf", "configure", *python_flags | ||
system Formula["[email protected]"].opt_bin/"python3", "waf" | ||
system Formula["[email protected]"].opt_bin/"python3", "waf", "install" | ||
|
||
resource("six").stage do | ||
system Formula["[email protected]"].opt_bin/"python3", *Language::Python.setup_install_args(libexec) | ||
end | ||
|
||
version = Language::Python.major_minor_version Formula["[email protected]"].opt_bin/"python3" | ||
site_packages = "lib/python#{version}/site-packages" | ||
pth_contents = "import site; site.addsitedir('#{libexec/site_packages}')\n" | ||
(prefix/site_packages/"homebrew-essentia.pth").write pth_contents | ||
end | ||
end | ||
|
||
|
@@ -76,7 +85,7 @@ def install | |
EOS | ||
|
||
if build.with? "python" | ||
system "python3", "-c", "#{py_test}" | ||
system Formula["[email protected]"].opt_bin/"python3", "-c", "#{py_test}" | ||
end | ||
end | ||
end |