Skip to content

Commit

Permalink
- adapt for virtual environment
Browse files Browse the repository at this point in the history
  • Loading branch information
fbergmann committed Oct 28, 2022
1 parent 57779dd commit 49f11ba
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -45,9 +45,12 @@ def get_python_include():

def get_win_python_lib():
vars = sysconfig.get_config_vars()
path = os.path.join(vars['prefix'], 'libs', 'python' + vars['py_version_nodot'] + '.lib')
if os.path.exists(path):
return path
for k in ['prefix', 'installed_base', 'installed_platbase']:
if k not in vars:
continue
path = os.path.join(vars[k], 'libs', 'python' + vars['py_version_nodot'] + '.lib')
if os.path.exists(path):
return path
return None

def prepend_variables(args, variables):
Expand Down

0 comments on commit 49f11ba

Please sign in to comment.