setup.py update

This commit is contained in:
ingvar1995 2016-07-27 15:45:34 +03:00
parent fdfc74521b
commit 3bd7655203

View file

@ -3,6 +3,7 @@ from setuptools.command.install import install
from platform import system from platform import system
from subprocess import call from subprocess import call
from toxygen.util import program_version from toxygen.util import program_version
import sys
version = program_version + '.0' version = program_version + '.0'
@ -28,6 +29,18 @@ class InstallScript(install):
call(["toxygen", "--configure"]) call(["toxygen", "--configure"])
else: else:
call(["toxygen", "--clean"]) call(["toxygen", "--clean"])
except:
try:
params = list(filter(lambda x: x.startswith('--prefix='), sys.argv))
if params:
path = params[0][len('--prefix='):]
if path[-1] not in ('/', '\\'):
path += '/'
path += 'bin/toxygen'
if system() == 'Windows':
call([path, "--configure"])
else:
call([path, "--clean"])
except: except:
pass pass