-
-
Notifications
You must be signed in to change notification settings - Fork 12.5k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
cython: revision bump for [email protected]
- Loading branch information
Showing
1 changed file
with
7 additions
and
6 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 |
---|---|---|
|
@@ -3,6 +3,7 @@ class Cython < Formula | |
homepage "https://cython.org/" | ||
url "https://files.pythonhosted.org/packages/49/8a/6a4135469372da2e3d9f88f71c6d00d8a07ef65f121eeca0c7ae21697219/Cython-0.29.16.tar.gz" | ||
sha256 "232755284f942cbb3b43a06cd85974ef3c970a021aef19b5243c03ee2b08fa05" | ||
revision 1 | ||
|
||
bottle do | ||
cellar :any_skip_relocation | ||
|
@@ -16,19 +17,19 @@ class Cython < Formula | |
Users are advised to use `pip` to install cython | ||
EOS | ||
|
||
depends_on "python" | ||
depends_on "python@3.8" | ||
|
||
def install | ||
xy = Language::Python.major_minor_version "python3" | ||
xy = Language::Python.major_minor_version Formula["[email protected]"].opt_bin/"python3" | ||
ENV.prepend_create_path "PYTHONPATH", libexec/"lib/python#{xy}/site-packages" | ||
system "python3", *Language::Python.setup_install_args(libexec) | ||
system Formula["[email protected]"].opt_bin/"python3", *Language::Python.setup_install_args(libexec) | ||
|
||
bin.install Dir[libexec/"bin/*"] | ||
bin.env_script_all_files(libexec/"bin", :PYTHONPATH => ENV["PYTHONPATH"]) | ||
end | ||
|
||
test do | ||
xy = Language::Python.major_minor_version "python3" | ||
xy = Language::Python.major_minor_version Formula["[email protected]"].opt_bin/"python3" | ||
ENV.prepend_path "PYTHONPATH", libexec/"lib/python#{xy}/site-packages" | ||
|
||
phrase = "You are using Homebrew" | ||
|
@@ -41,7 +42,7 @@ def install | |
ext_modules = cythonize("package_manager.pyx") | ||
) | ||
EOS | ||
system "python3", "setup.py", "build_ext", "--inplace" | ||
assert_match phrase, shell_output("python3 -c 'import package_manager'") | ||
system Formula["[email protected]"].opt_bin/"python3", "setup.py", "build_ext", "--inplace" | ||
assert_match phrase, shell_output("#{Formula["[email protected]"].opt_bin}/python3 -c 'import package_manager'") | ||
end | ||
end |