From 307239b23435587007070b3a6179e4100d85158a Mon Sep 17 00:00:00 2001 From: Hugo van Kemenade Date: Tue, 21 Jul 2020 11:23:38 +0300 Subject: [PATCH] Replace distutils.sysconfig.get_config_var("prefix") with os.path.normpath(sys.prefix) --- setup.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/setup.py b/setup.py index 59f6d2970..0b8abaf80 100755 --- a/setup.py +++ b/setup.py @@ -14,7 +14,7 @@ import struct import subprocess import sys import warnings -from distutils import ccompiler, sysconfig +from distutils import ccompiler from distutils.command.build_ext import build_ext from setuptools import Extension, setup @@ -418,7 +418,7 @@ class pil_build_ext(build_ext): for d in os.environ[k].split(os.path.pathsep): _add_directory(library_dirs, d) - prefix = sysconfig.get_config_var("prefix") + prefix = os.path.normpath(sys.prefix) if prefix: _add_directory(library_dirs, os.path.join(prefix, "lib")) _add_directory(include_dirs, os.path.join(prefix, "include"))