[meld] setup: Work around downstream's insane broken defaults



commit f31a2413eb56299d95c1a5d29bd5008cd4c0190f
Author: Kai Willadsen <kai willadsen gmail com>
Date:   Sun May 25 08:21:35 2014 +1000

    setup: Work around downstream's insane broken defaults
    
    This still won't work for everyone, and prefix installs definitely
    won't work.

 README   |    4 ++++
 setup.py |    6 ++++++
 2 files changed, 10 insertions(+), 0 deletions(-)
---
diff --git a/README b/README
index 23352c9..6aa2064 100644
--- a/README
+++ b/README
@@ -34,6 +34,10 @@ Alternatively, you can install Meld system-wide by running:
 
  * `python setup.py install`
 
+or if you're on Ubuntu, instead try:
+
+ * `python setup.py install --prefix=/usr`
+
 ...but you should probably just get a RPM/deb/installer instead, depending on
 your system. Meld packages are available for just about every *nix
 distribution, and can be installed on OSX using MacPorts/Fink/etc. See the wiki
diff --git a/setup.py b/setup.py
index 593a5ec..0ccc526 100644
--- a/setup.py
+++ b/setup.py
@@ -2,11 +2,17 @@
 
 from distutils.core import setup
 import glob
+import platform
+import sys
 
 import meld.build_helpers
 import meld.conf
 
 
+if (platform.system() == 'Linux' and
+        platform.linux_distribution()[0] == 'Ubuntu'):
+    sys.argv.append('--install-layout=deb')
+
 setup(
     name=meld.conf.__package__,
     version=meld.conf.__version__,


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]