2014-09-23 10:36:20 +00:00
|
|
|
class Jrnl < Formula
|
2015-05-19 00:00:59 +00:00
|
|
|
desc "Command-line note taker"
|
2015-07-10 20:54:51 +00:00
|
|
|
homepage "https://maebert.github.io/jrnl/"
|
2014-11-11 02:50:01 +00:00
|
|
|
url "https://github.com/maebert/jrnl/archive/1.9.7.tar.gz"
|
2015-08-03 12:55:31 +00:00
|
|
|
sha256 "789de4bffe0c22911a4968e525feeb20a6c7c4f4fe762a936ce2dac2213cd855"
|
2014-09-23 10:36:20 +00:00
|
|
|
|
2014-10-01 17:04:41 +00:00
|
|
|
bottle do
|
2015-09-24 19:47:43 +00:00
|
|
|
cellar :any_skip_relocation
|
|
|
|
sha256 "b5f24dc1ba2c58e7a9cebd7ae0492be6fbab0c05c3fa96e2f7cf9f9e9513bfd5" => :el_capitan
|
2014-11-11 03:01:04 +00:00
|
|
|
sha1 "85aeed5404abd7a962fe30cb68151f461e944070" => :yosemite
|
|
|
|
sha1 "cec814646e140a72c994c9e7a55a4428a6b7e336" => :mavericks
|
|
|
|
sha1 "127d73c4f50620bfab34bd398102c8f9f1821f12" => :mountain_lion
|
2014-10-01 17:04:41 +00:00
|
|
|
end
|
|
|
|
|
2014-09-23 10:36:20 +00:00
|
|
|
depends_on :python if MacOS.version <= :snow_leopard
|
|
|
|
|
|
|
|
resource "pycrypto" do
|
|
|
|
url "https://pypi.python.org/packages/source/p/pycrypto/pycrypto-2.6.tar.gz"
|
2015-08-03 12:55:31 +00:00
|
|
|
sha256 "7293c9d7e8af2e44a82f86eb9c3b058880f4bcc884bf3ad6c8a34b64986edde8"
|
2014-09-23 10:36:20 +00:00
|
|
|
end
|
|
|
|
|
2014-10-01 23:47:19 +00:00
|
|
|
resource "keyring" do
|
|
|
|
url "https://pypi.python.org/packages/source/k/keyring/keyring-4.0.zip"
|
2015-08-03 12:55:31 +00:00
|
|
|
sha256 "ea93c3cd9666c648263df4daadc5f34aeb27415dbf8e4d76579a8a737f1741cf"
|
2014-10-01 23:47:19 +00:00
|
|
|
end
|
|
|
|
|
|
|
|
resource "parsedatetime" do
|
|
|
|
url "https://pypi.python.org/packages/source/p/parsedatetime/parsedatetime-1.4.tar.gz"
|
2015-08-03 12:55:31 +00:00
|
|
|
sha256 "09bfcd8f3c239c75e77b3ff05d782ab2c1aed0892f250ce2adf948d4308fe9dc"
|
2014-10-01 23:47:19 +00:00
|
|
|
end
|
|
|
|
|
|
|
|
resource "python-dateutil" do
|
2014-10-01 23:47:19 +00:00
|
|
|
url "https://pypi.python.org/packages/source/p/python-dateutil/python-dateutil-1.5.tar.gz"
|
2015-08-03 12:55:31 +00:00
|
|
|
sha256 "6f197348b46fb8cdf9f3fcfc2a7d5a97da95db3e2e8667cf657216274fe1b009"
|
2014-10-01 23:47:19 +00:00
|
|
|
end
|
|
|
|
|
|
|
|
resource "pytz" do
|
|
|
|
url "https://pypi.python.org/packages/source/p/pytz/pytz-2014.7.tar.bz2"
|
2015-08-03 12:55:31 +00:00
|
|
|
sha256 "56dec1e94d2fad13d9009a140b816808086a79ddf7edf9eb4931c84f65abb12a"
|
2014-10-01 23:47:19 +00:00
|
|
|
end
|
|
|
|
|
|
|
|
resource "six" do
|
|
|
|
url "https://pypi.python.org/packages/source/s/six/six-1.8.0.tar.gz"
|
2015-08-03 12:55:31 +00:00
|
|
|
sha256 "047bbbba41bac37c444c75ddfdf0573dd6e2f1fbd824e6247bb26fa7d8fa3830"
|
2014-10-01 23:47:19 +00:00
|
|
|
end
|
|
|
|
|
|
|
|
resource "tzlocal" do
|
|
|
|
url "https://pypi.python.org/packages/source/t/tzlocal/tzlocal-1.1.1.zip"
|
2015-08-03 12:55:31 +00:00
|
|
|
sha256 "696bfd8d7c888de039af6c6fdf86fd52e32508277d89c75d200eb2c150487ed4"
|
2014-10-01 23:47:19 +00:00
|
|
|
end
|
|
|
|
|
2014-09-23 10:36:20 +00:00
|
|
|
def install
|
2014-11-11 02:50:01 +00:00
|
|
|
ENV.prepend_create_path "PYTHONPATH", libexec/"vendor/lib/python2.7/site-packages"
|
2014-10-01 23:47:19 +00:00
|
|
|
%w[six pycrypto keyring parsedatetime python-dateutil pytz tzlocal].each do |r|
|
2014-12-10 20:21:19 +00:00
|
|
|
resource(r).stage do
|
|
|
|
system "python", *Language::Python.setup_install_args(libexec/"vendor")
|
|
|
|
end
|
2014-10-01 23:47:19 +00:00
|
|
|
end
|
2014-09-23 10:36:20 +00:00
|
|
|
|
2014-11-11 02:50:01 +00:00
|
|
|
ENV.prepend_create_path "PYTHONPATH", libexec/"lib/python2.7/site-packages"
|
2014-12-10 20:21:19 +00:00
|
|
|
system "python", *Language::Python.setup_install_args(libexec)
|
2014-09-23 10:36:20 +00:00
|
|
|
|
2014-11-11 02:50:01 +00:00
|
|
|
bin.install Dir["#{libexec}/bin/*"]
|
|
|
|
bin.env_script_all_files(libexec/"bin", :PYTHONPATH => ENV["PYTHONPATH"])
|
2014-09-23 10:36:20 +00:00
|
|
|
end
|
|
|
|
|
|
|
|
test do
|
|
|
|
system "#{bin}/jrnl", "-v"
|
|
|
|
end
|
|
|
|
end
|