snakemake: revision for python

This commit is contained in:
ilovezfs 2018-06-29 10:26:38 -07:00
parent a65ad9d90b
commit 2ffb6a92dd

View file

@ -3,6 +3,7 @@ class Snakemake < Formula
homepage "https://snakemake.readthedocs.io/"
url "https://files.pythonhosted.org/packages/a7/a0/ebafb2982558837824fd7a63ea73c68d07d81f99d1c1c0f3a05161da417c/snakemake-5.1.5.tar.gz"
sha256 "9e5d8ab6cba6c1e7cb2c6f4118dc6052b07480c90c9a68781d8482d151ebec2f"
revision 1
head "https://bitbucket.org/snakemake/snakemake.git"
bottle do
@ -14,6 +15,11 @@ class Snakemake < Formula
depends_on "python"
resource "Cython" do
url "https://files.pythonhosted.org/packages/b3/ae/971d3b936a7ad10e65cb7672356cff156000c5132cf406cb0f4d7a980fd3/Cython-0.28.3.tar.gz"
sha256 "1aae6d6e9858888144cea147eb5e677830f45faaff3d305d77378c3cba55f526"
end
resource "appdirs" do
url "https://files.pythonhosted.org/packages/48/69/d87c60746b393309ca30761f8e2b49473d43450b150cb08f3c6df5c11be5/appdirs-1.4.3.tar.gz"
sha256 "9e5896d1372858f8dd3344faf4e5014d21849c756c8d5701f78f8a103b372d92"
@ -75,8 +81,8 @@ class Snakemake < Formula
end
resource "PyYAML" do
url "https://files.pythonhosted.org/packages/4a/85/db5a2df477072b2902b0eb892feb37d88ac635d36245a72a6a69b23b383a/PyYAML-3.12.tar.gz"
sha256 "592766c6303207a20efc445587778322d7f73b161bd994f227adaa341ba212ab"
url "https://files.pythonhosted.org/packages/bd/da/0a49c1a31c60634b93fd1376b3b7966c4f81f2da8263f389cad5b6bbd6e8/PyYAML-4.2b1.tar.gz"
sha256 "ef3a0d5a5e950747f4a39ed7b204e036b37f9bddc7551c1a813b8727515a832e"
end
resource "ratelimiter" do
@ -100,9 +106,27 @@ class Snakemake < Formula
end
def install
inreplace "snakemake/shell.py", "async", "async_" # Python 3.7 compat
xy = Language::Python.major_minor_version "python3"
ENV.prepend_create_path "PYTHONPATH", libexec/"vendor/lib/python#{xy}/site-packages"
ENV.prepend_create_path "PYTHONPATH", buildpath/"cython/lib/python#{xy}/site-packages"
resource("Cython").stage do
system "python3", *Language::Python.setup_install_args(buildpath/"cython")
end
ENV.prepend_path "PATH", buildpath/"cython/bin"
resource("datrie").stage do
system "./update_c.sh"
ENV.delete "PYTHONPATH"
ENV.prepend_create_path "PYTHONPATH", libexec/"vendor/lib/python#{xy}/site-packages"
system "python3", *Language::Python.setup_install_args(libexec/"vendor")
end
resources.each do |r|
next if r.name == "datrie" || r.name == "Cython"
r.stage do
system "python3", *Language::Python.setup_install_args(libexec/"vendor")
end