Jannis Leidel avatar Jannis Leidel committed 0ba47c6

Stick to the distutils.sysconfig.get_config_vars API and return either dict or list depending on the passed args

Comments (0)

Files changed (2)

support-files/distutils-init.py

 old_get_config_vars = sysconfig.get_config_vars
 def sysconfig_get_config_vars(*args):
     real_vars = old_get_config_vars(*args)
-    if sys.platform == 'win32' and 'LIBDIR' not in real_vars:
-        real_vars['LIBDIR'] = os.path.join(sys.real_prefix, "libs")
+    if sys.platform == 'win32':
+        lib_dir = os.path.join(sys.real_prefix, "libs")
+        if isinstance(real_vars, dict) and 'LIBDIR' not in real_vars:
+            real_vars['LIBDIR'] = lib_dir # asked for all
+        elif isinstance(real_vars, list) and 'LIBDIR' in args:
+            real_vars = real_vars + [lib_dir] # asked for list
     return real_vars
 sysconfig_get_config_vars.__doc__ = old_get_config_vars.__doc__
 sysconfig.get_config_vars = sysconfig_get_config_vars
 
 ##file distutils-init.py
 DISTUTILS_INIT = """
-eJytVtGq4zYQfddXDAnFdrlrSvu2EArtviwspZRCH5ZF6Npyoq4jGUm5Sfr1nZEcW7Kdtg813Iuj
-ORrNnJk5sjoPxnowjqn45u7T61VYrfTRwWPhZ6M7dfxVWCct7POfyoE2HgS8Kesvopf6Dc6mvfTy
-BZyBq4RGaLg4CcqDN9Ap3YI/SXC+7dUrY62yWpwlHDCYehD+VI8rZHL+4lXvOK0niD+N0uUCXqZh
-1Zx3qpecVy9QTG6KiqlucqKNPdNLmR9TwWEVSrnaM/mv3jPA58FZTS9lWKJn9ztmmjAzHQWDaL6K
-owTh4RsHYhgkBk4EvSJTOjJEtPSmEV4ZDcLFxbvz8jw7+nFXMdk7GcPgIQXOa6WRBV9+9wKL7AJM
-3mQDZpAziYHRHIrMca608uhuuBdVVVsp2rJij7YgeNI+TeCfMbbfY3a+OcHrRfUtlzcPs2tojXS6
-8PBVmyuc8A9zPkofksOGQICysvHG3kdHJ8Dsr9g25urgHbXRSdi2Ma2MjBAEGbTmMnZWOFy2FFM9
-WNmpG8Xcxd+98B0WkYp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TyeI+mxKOpI
+eC2KMSj6HKxd6Uudf/n886fPv+f++x1lbASlmjQuPz8OvGA0j7j2eCu/4bcW6SFeCuNJ0W1GQHI5
+iwC9Ey0bjtHd9P4dPA++XxLnZDVuxvFEtlm3lf5a2c02u2LRYXHH/AOs8pIa
 """.decode("base64").decode("zlib")
 
 ##file distutils.cfg
Tip: Filter by directory path e.g. /media app.js to search for public/media/app.js.
Tip: Use camelCasing e.g. ProjME to search for ProjectModifiedEvent.java.
Tip: Filter by extension type e.g. /repo .js to search for all .js files in the /repo directory.
Tip: Separate your search with spaces e.g. /ssh pom.xml to search for src/ssh/pom.xml.
Tip: Use ↑ and ↓ arrow keys to navigate and return to view the file.
Tip: You can also navigate files with Ctrl+j (next) and Ctrl+k (previous) and view the file with Ctrl+o.
Tip: You can also navigate files with Alt+j (next) and Alt+k (previous) and view the file with Alt+o.