setup.py update
This commit is contained in:
parent
fdfc74521b
commit
3bd7655203
1 changed files with 14 additions and 1 deletions
15
setup.py
15
setup.py
|
@ -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'
|
||||||
|
@ -29,7 +30,19 @@ class InstallScript(install):
|
||||||
else:
|
else:
|
||||||
call(["toxygen", "--clean"])
|
call(["toxygen", "--clean"])
|
||||||
except:
|
except:
|
||||||
pass
|
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
|
||||||
|
|
||||||
setup(name='Toxygen',
|
setup(name='Toxygen',
|
||||||
version=version,
|
version=version,
|
||||||
|
|
Loading…
Reference in a new issue