From 3bd76552030e8c0987eecf11f39800d7a74050d3 Mon Sep 17 00:00:00 2001 From: ingvar1995 Date: Wed, 27 Jul 2016 15:45:34 +0300 Subject: [PATCH] setup.py update --- setup.py | 15 ++++++++++++++- 1 file changed, 14 insertions(+), 1 deletion(-) diff --git a/setup.py b/setup.py index 17468de..4eb163e 100644 --- a/setup.py +++ b/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' @@ -29,7 +30,19 @@ class InstallScript(install): else: call(["toxygen", "--clean"]) 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', version=version,