aboutsummaryrefslogtreecommitdiff
path: root/setup.py
diff options
context:
space:
mode:
authorMattias Andrée <maandree@operamail.com>2012-08-27 17:33:28 +0200
committerMattias Andrée <maandree@operamail.com>2012-08-27 17:33:28 +0200
commit9ba9e9a264b1ca731e50befe28efbcc2f126cda7 (patch)
tree651cf64179921453cdbff6044369b1ce44b3f84d /setup.py
parent9d4f5a8104b9539d65303a6f63517ba5eb037725 (diff)
parent1c4108284509c1950d3b208aa27df9d768149841 (diff)
downloadponysay-9ba9e9a264b1ca731e50befe28efbcc2f126cda7.tar.gz
ponysay-9ba9e9a264b1ca731e50befe28efbcc2f126cda7.tar.bz2
ponysay-9ba9e9a264b1ca731e50befe28efbcc2f126cda7.zip
Merge branch 'develop'
Diffstat (limited to 'setup.py')
-rwxr-xr-xsetup.py17
1 files changed, 15 insertions, 2 deletions
diff --git a/setup.py b/setup.py
index 891ee9c..ad416ba 100755
--- a/setup.py
+++ b/setup.py
@@ -8,7 +8,7 @@ from subprocess import Popen, PIPE
-PONYSAY_VERSION = '2.5'
+PONYSAY_VERSION = '2.5.1'
@@ -64,6 +64,8 @@ class Setup():
opts.add_argumentless(alternatives = ['--help'])
opts.add_argumentless(alternatives = ['--version'])
+ opts.add_argumented (alternatives = ['---DESTDIR'], arg="DESTDIR")
+ opts.add_argumented (alternatives = ['---PREFIX'], arg="PREFIX")
opts.add_argumentless(help = 'Install everything that is not explicity excluded', alternatives = ['--everything', '--with-everything'])
opts.add_argumentless(help = 'Install only the essentials\nNote that this can vary depending on version', alternatives = ['--minimal'])
@@ -137,6 +139,17 @@ class Setup():
self.linking = opts.opts['--linking'][0]
+ if (opts.opts['---DESTDIR'] is not None) and (opts.opts['--dest-dir'] is not None):
+ destdir = opts.opts['---DESTDIR'][0]
+ if len(destdir) > 0:
+ opts.opts['--dest-dir'] = [destdir]
+
+ if (opts.opts['---PREFIX'] is not None) and (opts.opts['--prefix'] is not None):
+ prefix = opts.opts['---PREFIX'][0]
+ if len(prefix) > 0:
+ opts.opts['--prefix'] = [prefix]
+
+
if (len(opts.files) > 1) or (opts.opts['--help'] is not None) or ((len(opts.files) == 1) and (opts.files[0] == 'help')):
opts.help()
elif (opts.opts['--version'] is not None) or ((len(opts.files) == 1) and (opts.files[0] == 'version')):
@@ -784,7 +797,7 @@ class Setup():
destdir = opts['--dest-dir'][0]
for key in conf:
if conf[key] not in (None, False, True):
- if conf.startswith('/'):
+ if conf[key].startswith('/'):
conf[key] = destdir + conf[key]
return conf