homebrew-core/Formula/duplicity.rb
Charlie Sharpsteen e3126bf25d duplicity: Fix installation with distutils.cfg
The Homebrew Python installations place a `distutils.cfg` file that can override
arguments passed on the command line. Specifically, our `distutils.cfg` sets a
value for `install-lib`, so `--install-lib` needs to be passed to `setup.py` to
override this default. Passing `--install-purelib` and `--install-platlib` is
not sufficient.
2012-12-06 15:29:56 -08:00

26 lines
791 B
Ruby

require 'formula'
class Duplicity < Formula
homepage 'http://www.nongnu.org/duplicity/'
url 'http://code.launchpad.net/duplicity/0.6-series/0.6.20/+download/duplicity-0.6.20.tar.gz'
sha1 '5781fa325c846fd8453c68a33ede3c7a0d105a80'
depends_on 'librsync'
depends_on 'gnupg'
def install
ENV.universal_binary
# Install mostly into libexec
system "python", "setup.py", "install",
"--prefix=#{prefix}",
"--install-lib=#{libexec}",
"--install-scripts=#{bin}"
# Shift files around to avoid needing a PYTHONPATH
mv bin+'duplicity', bin+'duplicity.py'
mv Dir[bin+'*'], libexec
bin.install_symlink "#{libexec}/duplicity.py" => "duplicity"
bin.install_symlink "#{libexec}/rdiffdir"
end
end