Skip to content

Commit

Permalink
Don't use deprecated distutils module.
Browse files Browse the repository at this point in the history
  • Loading branch information
sebastic committed Dec 7, 2024
1 parent 10315a6 commit 47102c3
Showing 1 changed file with 7 additions and 3 deletions.
10 changes: 7 additions & 3 deletions build.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import glob
import os
import sysconfig
from subprocess import Popen, PIPE
from distutils import sysconfig

Import('env')

Expand All @@ -14,11 +14,15 @@ def call(cmd, silent=True):


prefix = env['PREFIX']
target_path = os.path.normpath(sysconfig.get_python_lib() + os.path.sep + env['MAPNIK_NAME'])
if "deb_system" in sysconfig.get_scheme_names():
python_modules_dir = sysconfig.get_path("purelib", "deb_system")
else:
python_modules_dir = sysconfig.get_path("purelib")
target_path = os.path.normpath(python_modules_dir + os.path.sep + env['MAPNIK_NAME'])

py_env = env.Clone()

py_env.Append(CPPPATH = sysconfig.get_python_inc())
py_env.Append(CPPPATH = sysconfig.get_path('include'))

py_env.Append(CPPDEFINES = env['LIBMAPNIK_DEFINES'])

Expand Down

0 comments on commit 47102c3

Please sign in to comment.