diff --git a/pyconcrete-admin.py b/pyconcrete-admin.py index f31e826..eb255fe 100755 --- a/pyconcrete-admin.py +++ b/pyconcrete-admin.py @@ -100,7 +100,7 @@ def parse_arg(self): else: try: args = parser.parse_args() - self.verbose = args.verbose or IS_TEST_VERBOSE + self.verbose = getattr(args, 'verbose', False) or IS_TEST_VERBOSE args.func(args) except PyConcreteError as e: print('Error: ' + str(e)) diff --git a/setup.py b/setup.py index 740724c..057db21 100644 --- a/setup.py +++ b/setup.py @@ -17,7 +17,6 @@ import hashlib import imp import os -import subprocess import sys import sysconfig from distutils.command.build import build @@ -359,9 +358,8 @@ def get_exe_link_args(): # add -Lxxxx for link correct lib -lpython3.x if is_mac(): - ldflags = subprocess.check_output('python{ver}-config --ldflags'.format(ver=ver), shell=True) - ldflags = ldflags.decode('utf8') - return [ld for ld in ldflags.split() if ld.startswith('-L')] + if not sysconfig.get_config_var('Py_ENABLE_SHARED'): # reference from `python-config --ldflags` + return ['-L' + sysconfig.get_config_var('LIBPL')] return None