setup.py update
This commit is contained in:
parent
fdfc74521b
commit
3bd7655203
1 changed files with 14 additions and 1 deletions
13
setup.py
13
setup.py
|
@ -3,6 +3,7 @@ from setuptools.command.install import install
|
|||
from platform import system
|
||||
from subprocess import call
|
||||
from toxygen.util import program_version
|
||||
import sys
|
||||
|
||||
|
||||
version = program_version + '.0'
|
||||
|
@ -28,6 +29,18 @@ class InstallScript(install):
|
|||
call(["toxygen", "--configure"])
|
||||
else:
|
||||
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:
|
||||
pass
|
||||
|
||||
|
|
Loading…
Reference in a new issue