forked from codedreality/homebrew-python
-
Notifications
You must be signed in to change notification settings - Fork 0
/
pymummer.rb
44 lines (36 loc) · 1.8 KB
/
pymummer.rb
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
class Pymummer < Formula
desc "Python3 wrapper for running MUMmer and parsing the output"
homepage "https://github.com/sanger-pathogens/pymummer"
url "https://github.com/sanger-pathogens/pymummer/archive/v0.10.1.tar.gz"
sha256 "8c358227b842a61477889db50af0918ea3e793fddc56f6a9900e6820f2712b20"
head "https://github.com/sanger-pathogens/pymummer.git"
bottle do
cellar :any_skip_relocation
sha256 "1eb65fbdc94b549e4be82893aca2ab43863150d8f16378e7e5dfeecd385c2993" => :sierra
sha256 "1eb65fbdc94b549e4be82893aca2ab43863150d8f16378e7e5dfeecd385c2993" => :el_capitan
sha256 "1eb65fbdc94b549e4be82893aca2ab43863150d8f16378e7e5dfeecd385c2993" => :yosemite
end
# tag "bioinformatics"
depends_on :python3
depends_on "homebrew/science/mummer"
resource "pyfastaq" do
url "https://files.pythonhosted.org/packages/0e/5d/8b39442b62c43da835c89f4c244d037bc7fcd8b47b0c0fff6e8d9097a035/pyfastaq-3.14.0.tar.gz"
sha256 "54dc8cc8b3d24111f6939cf563833b8e9e78777b9cf7b82ca8ddec04aa1c05f2"
end
def install
version = Language::Python.major_minor_version "python3"
ENV.prepend_create_path "PYTHONPATH", libexec/"vendor/lib/python#{version}/site-packages"
resource("pyfastaq").stage do
system "python3", *Language::Python.setup_install_args(libexec/"vendor")
pyfastaq_path = libexec/"vendor/lib/python#{version}/site-packages"
dest_path = lib/"python#{version}/site-packages"
mkdir_p dest_path
(dest_path/"homebrew-pymummer-pyfastaq.pth").write "#{pyfastaq_path}\n"
end
ENV.prepend_create_path "PYTHONPATH", prefix/"lib/python#{version}/site-packages"
system "python3", *Language::Python.setup_install_args(prefix)
end
test do
system "python3", "-c", "from pymummer import coords_file, alignment, nucmer; nucmer.Runner('ref', 'qry', 'outfile')"
end
end