homebrew-core/Formula/platformio.rb
2016-08-04 11:28:48 +01:00

65 lines
2.5 KiB
Ruby

class Platformio < Formula
desc "Ecosystem for IoT development (Arduino and ARM mbed compatible)"
homepage "http://platformio.org"
url "https://pypi.python.org/packages/6e/09/204d1e5638e50897093ca2b2d9f58ccf268ef486c527bda5cf2f9348eb19/platformio-2.11.2.tar.gz"
sha256 "28d0911f6898d2d5ecad4457634c2a01d3fd7c476e8afa4635a7d507dec08073"
bottle do
cellar :any_skip_relocation
sha256 "5d45f91af97d9f33506242698c46aedda6980533ce47c27de877214bf12a79ee" => :el_capitan
sha256 "ff3353c2c28952b50d27031555fbe7c33bf94c517725f40feee2bcdea9f37d50" => :yosemite
sha256 "4bfd207f3c466e00fab1f4136c4cc9a28aa0759cebd5b4850eda96d42731dac0" => :mavericks
end
depends_on :python if MacOS.version <= :snow_leopard
resource "bottle" do
url "https://pypi.python.org/packages/source/b/bottle/bottle-0.12.9.tar.gz"
sha256 "fe0a24b59385596d02df7ae7845fe7d7135eea73799d03348aeb9f3771500051"
end
resource "click" do
url "https://pypi.python.org/packages/source/c/click/click-5.1.tar.gz"
sha256 "678c98275431fad324275dec63791e4a17558b40e5a110e20a82866139a85a5a"
end
resource "colorama" do
url "https://pypi.python.org/packages/f0/d0/21c6449df0ca9da74859edc40208b3a57df9aca7323118c913e58d442030/colorama-0.3.7.tar.gz"
sha256 "e043c8d32527607223652021ff648fbb394d5e19cba9f1a698670b338c9d782b"
end
resource "lockfile" do
url "https://pypi.python.org/packages/source/l/lockfile/lockfile-0.12.2.tar.gz"
sha256 "6aed02de03cba24efabcd600b30540140634fc06cfa603822d508d5361e9f799"
end
resource "pyserial" do
url "https://pypi.python.org/packages/3c/d8/a9fa247ca60b02b3bebbd61766b4f321393b57b13c53b18f6f62cf172c08/pyserial-3.1.1.tar.gz"
sha256 "d657051249ce3cbd0446bcfb2be07a435e1029da4d63f53ed9b4cdde7373364c"
end
resource "requests" do
url "https://pypi.python.org/packages/49/6f/183063f01aae1e025cf0130772b55848750a2f3a89bfa11b385b35d7329d/requests-2.10.0.tar.gz"
sha256 "63f1815788157130cee16a933b2ee184038e975f0017306d723ac326b5525b54"
end
def install
ENV.prepend_create_path "PYTHONPATH", libexec/"vendor/lib/python2.7/site-packages"
resources.each do |r|
r.stage do
system "python", *Language::Python.setup_install_args(libexec/"vendor")
end
end
ENV.prepend_create_path "PYTHONPATH", libexec/"lib/python2.7/site-packages"
system "python", *Language::Python.setup_install_args(libexec)
bin.install Dir[libexec/"bin/*"]
bin.env_script_all_files(libexec/"bin", :PYTHONPATH => ENV["PYTHONPATH"])
end
test do
system bin/"platformio"
system bin/"pio"
end
end