summaryrefslogtreecommitdiffstats
path: root/setup.py
diff options
context:
space:
mode:
authorMichele Calgaro <[email protected]>2023-01-04 23:56:58 +0900
committerMichele Calgaro <[email protected]>2023-01-05 13:49:33 +0900
commitf75fae3bd1cfb04d64d797d22a9881ba7e27402e (patch)
tree20b590028ccea2fc87403d9609c1ea5050faf799 /setup.py
parenta635b7dc1520361feb00c21c2a40d4a9cbaf9778 (diff)
downloadpytdeextensions-f75fae3bd1cfb04d64d797d22a9881ba7e27402e.tar.gz
pytdeextensions-f75fae3bd1cfb04d64d797d22a9881ba7e27402e.zip
Drop python2 support.
Signed-off-by: Michele Calgaro <[email protected]>
Diffstat (limited to 'setup.py')
-rwxr-xr-xsetup.py19
1 files changed, 9 insertions, 10 deletions
diff --git a/setup.py b/setup.py
index 98e8dd1..c0997fd 100755
--- a/setup.py
+++ b/setup.py
@@ -21,9 +21,8 @@ from distutils import dir_util
import sys
import os
import glob
-sys.path.insert(0,"src") # We need this for the import statement below.
-import tdedistutils
+from src import tdedistutils
def main():
tdedistutils.setup(name="pytdeextensions",
@@ -115,7 +114,7 @@ class BuildLibpythonize(Command):
# Python dir
if self.python_dir is None:
- self.python_dir = os.path.split(sysconfig.get_config_var("LIBP"))[0]
+ self.python_dir = os.path.split(sysconfig.get_config_var("LIBPL"))[0]
self.announce("Using %s for the python directory" % self.python_dir)
# Python include dir.
@@ -135,12 +134,12 @@ class BuildLibpythonize(Command):
if self.clib!=None:
self.clib = glob.glob(os.path.join(self.clib,'libgcc*.a'))[0]
if self.clib is None:
- raise SystemExit, "setup.py: Failed to find a suitable libgcc library"
+ raise SystemExit("setup.py: Failed to find a suitable libgcc library")
self.announce("Using %s for clib" % self.clib)
# Make a list of places to look for python .so modules
self.python_sub_dirs = sysconfig.get_config_var("LIBSUBDIRS").split()
- base = sysconfig.get_config_var("LIBP")
+ base = sysconfig.get_config_var("LIBPL")
self.python_sub_dirs = [ os.path.join(base,item) for item in self.python_sub_dirs ]
self.python_sub_dirs.append(base)
@@ -184,7 +183,7 @@ class BuildLibpythonize(Command):
lines = raw.readlines()
if len(lines):
cflags = lines[0].split('"')[1].split()
- print "Got CFLAGS from emerge info."
+ print("Got CFLAGS from emerge info.")
cmdlist.extend(cflags)
else:
# Still no CFLAGS found, use these ...
@@ -202,7 +201,7 @@ class BuildLibpythonize(Command):
cmdlist.append("-o")
cmdlist.append(outputfile)
spawn(cmdlist) # Execute!!!
- print
+ print()
# Link the resulting object file to create a shared library.
cmdlist = ['libtool']
@@ -231,7 +230,7 @@ class BuildLibpythonize(Command):
cmdlist.extend(linklist)
spawn(cmdlist) # Execute!!
- print
+ print()
###########################################################################
class InstallLibpythonize(Command):
@@ -298,7 +297,7 @@ class InstallLibpythonize(Command):
cmdlist.append(os.path.join(self.build_dir,"libpythonize.la"))
cmdlist.append(os.path.join(self.install_dir,"libpythonize.la"))
spawn(cmdlist) # Execute!!
- print
+ print()
# Work the names of the files that were installed.
self.outfiles = []
@@ -317,7 +316,7 @@ class InstallLibpythonize(Command):
def get_outputs(self):
return self.outfiles
- def mkpath(self, name, mode=0777):
+ def mkpath(self, name, mode=0o777):
return dir_util.mkpath(name, mode, dry_run=self.dry_run)
main()