This repository has been archived by the owner on Jul 4, 2023. It is now read-only.
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Synchronize calendars and contacts https://vdirsyncer.readthedocs.org/
- Loading branch information
1 parent
7d33150
commit 02d554d
Showing
1 changed file
with
64 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,64 @@ | ||
class Vdirsyncer < Formula | ||
desc "Synchronize calendars and contacts" | ||
homepage "https://github.com/untitaker/vdirsyncer" | ||
url "https://pypi.python.org/packages/source/v/vdirsyncer/vdirsyncer-0.5.2.tar.gz" | ||
sha256 "2aefa499cca5073364dee12ea55c28e68cd417dd6bda99f6d9b447a3cac02162" | ||
head "https://github.com/untitaker/vdirsyncer.git" | ||
|
||
option "without-keyring", "Build without python-keyring support" | ||
|
||
depends_on :python if MacOS.version <= :snow_leopard | ||
|
||
resource "keyring" do | ||
url "https://pypi.python.org/packages/source/k/keyring/keyring-5.3.zip" | ||
sha256 "ac2b4dc17e6edfb804b09ade15df79f251522e442976ea0c8ea0051474502cf5" | ||
end | ||
|
||
resource "click" do | ||
url "https://pypi.python.org/packages/source/c/click/click-4.0.tar.gz" | ||
sha256 "f49e03611f5f2557788ceeb80710b1c67110f97c5e6740b97edf70245eea2409" | ||
end | ||
|
||
resource "requests" do | ||
url "https://pypi.python.org/packages/source/r/requests/requests-2.7.0.tar.gz" | ||
sha256 "398a3db6d61899d25fd4a06c6ca12051b0ce171d705decd7ed5511517b4bb93d" | ||
end | ||
|
||
resource "lxml" do | ||
url "https://pypi.python.org/packages/source/l/lxml/lxml-3.4.4.tar.gz" | ||
sha256 "b3d362bac471172747cda3513238f115cbd6c5f8b8e6319bf6a97a7892724099" | ||
end | ||
|
||
resource "requests-toolbelt" do | ||
url "https://pypi.python.org/packages/source/r/requests-toolbelt/requests-toolbelt-0.4.0.tar.gz" | ||
sha256 "15b74b90a63841b8430d6301e5062cd92929b1074b0c95bf62166b8239db1a96" | ||
end | ||
|
||
resource "atomicwrites" do | ||
url "https://pypi.python.org/packages/source/a/atomicwrites/atomicwrites-0.1.5.tar.gz" | ||
sha256 "9b16a8f1d366fb550f3d5a5ed4587022735f139a4187735466f34cf4577e4eaa" | ||
end | ||
|
||
def install | ||
ENV.prepend_create_path "PYTHONPATH", libexec/"vendor/lib/python2.7/site-packages" | ||
rs = %w[click requests lxml requests-toolbelt atomicwrites] | ||
rs << "keyring" if build.with? "keyring" | ||
rs.each do |r| | ||
resource(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 | ||
ENV["LC_ALL"] = "en_US.UTF-8" | ||
ENV["LANG"] = "en_US.UTF-8" | ||
system "#{bin}/vdirsyncer", "--version" | ||
end | ||
end |