Skip to content

Commit

Permalink
cython: revision bump for [email protected]
Browse files Browse the repository at this point in the history
  • Loading branch information
bayandin authored and iMichka committed Apr 5, 2020
1 parent c6321c8 commit 5f9062c
Showing 1 changed file with 7 additions and 6 deletions.
13 changes: 7 additions & 6 deletions Formula/cython.rb
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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"
Expand All @@ -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

0 comments on commit 5f9062c

Please sign in to comment.