howdoi.rb 2.2 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556
  1. require 'formula'
  2. class Howdoi < Formula
  3. include Language::Python::Virtualenv
  4. homepage 'https://github.com/gleitz/howdoi/'
  5. url 'https://pypi.python.org/packages/67/e0/18ca30a65aeed25c6d6fe7171d71601b3a772bf0b7b8235b9e98d3cb889e/howdoi-1.1.12.tar.gz'
  6. sha256 'c8676cea5155a8bb3d996f3555942e2726029338c606e36ed32775717a5e7bac'
  7. depends_on :python if MacOS.version <= :snow_leopard
  8. depends_on "libxslt" unless OS.mac?
  9. resource "Pygments" do
  10. url "https://pypi.python.org/packages/3d/7d/8d40fd42c16f9a9b1081857cef99b651743a86766e77b10bb59208f4d575/Pygments-2.1.1.tar.gz"
  11. sha256 "2df7d9a85b56e54c7c021dc98fc877bd216ead652c10da170779c004fb59c01b"
  12. end
  13. resource "argparse" do
  14. url "https://pypi.python.org/packages/18/dd/e617cfc3f6210ae183374cd9f6a26b20514bbb5a792af97949c5aacddf0f/argparse-1.4.0.tar.gz"
  15. sha256 "62b089a55be1d8949cd2bc7e0df0bddb9e028faefc8c32038cc84862aefdd6e4"
  16. end
  17. resource "cssselect" do
  18. url "https://pypi.python.org/packages/aa/e5/9ee1460d485b94a6d55732eb7ad5b6c084caf73dd6f9cb0bb7d2a78fafe8/cssselect-0.9.1.tar.gz"
  19. sha256 "0535a7e27014874b27ae3a4d33e8749e345bdfa62766195208b7996bf1100682"
  20. end
  21. resource "lxml" do
  22. url "https://pypi.python.org/packages/8b/be/ed850baac891aca25c832fb8d7b9c0e7a5077a30e336d95ffc7d649aaa06/lxml-3.5.0.tar.gz"
  23. sha256 "349f93e3a4b09cc59418854ab8013d027d246757c51744bf20069bc89016f578"
  24. end
  25. resource "pyquery" do
  26. url "https://pypi.python.org/packages/e6/77/05b500811e360e53a254ca1f452e1e2f38b5284367e1172867b921d8020d/pyquery-1.2.11.tar.gz"
  27. sha256 "4a832ba73bfba03486f5445c75993a26bf62d38d26ff5fcfbde06a7bd0087fc6"
  28. end
  29. resource "requests" do
  30. url "https://pypi.python.org/packages/f9/6d/07c44fb1ebe04d069459a189e7dab9e4abfe9432adcd4477367c25332748/requests-2.9.1.tar.gz"
  31. sha256 "c577815dd00f1394203fc44eb979724b098f88264a9ef898ee45b8e5e9cf587f"
  32. end
  33. resource "requests-cache" do
  34. url "https://pypi.python.org/packages/8b/1a/873fafaff8bca751eee63e0827827bbc16bfce36ff8c368bb539a136d1b4/requests-cache-0.4.11.tar.gz"
  35. sha256 "d846e741a7c55ca8d586b4d3c437144fbd9cd680d1f6727c9bbbe3c29894187e"
  36. end
  37. def install
  38. virtualenv_install_with_resources
  39. end
  40. test do
  41. ENV["LANG"] = "en_US.UTF-8"
  42. assert_match version.to_s, shell_output("#{bin}/howdoi --version 2>&1")
  43. end
  44. end