homebrew-core/Formula/platformio.rb
2016-06-29 03:15:19 +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/71/76/05dd805502dc5f9adadc7cdfd91f89320f505038884d97d0c05024a98e0f/platformio-2.11.0.tar.gz"
sha256 "11775c303fc3cb82fd353574bd2258b4ec6504855dcde6c557624a963a88fe08"
bottle do
cellar :any_skip_relocation
sha256 "4f559f10ec30f8ad034adde2951f2a2cafe63697f68e4175e11178cdf3f79ad8" => :el_capitan
sha256 "e3752e600bc40d7d9b632ef61a18f959f541d5317dd324a30e40cf9276ef87bf" => :yosemite
sha256 "ca4f8deddf960ce82761815d145dc27abbc8e0d28711779884e9e0c6ceb68f35" => :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