62723bbe60
This reverts commit 7446740638.
The change is not valid as setuptools have deprecated setup.py,
while distutils will be supported in existing point releases.
Python 3.12 support will require different solution.
PR: 268283
29 lines
761 B
Python
29 lines
761 B
Python
#!/usr/bin/env python
|
|
# To use:
|
|
# python setup.py install
|
|
#
|
|
|
|
try:
|
|
import distutils
|
|
from distutils import sysconfig
|
|
from distutils.command.install import install
|
|
from distutils.core import setup, Extension
|
|
except:
|
|
raise SystemExit("Distutils problem")
|
|
|
|
install.sub_commands = [x for x in install.sub_commands if 'egg' not in x[0]]
|
|
|
|
prefix = sysconfig.PREFIX
|
|
inc_dirs = [prefix + "/include"]
|
|
lib_dirs = [prefix + "/lib"]
|
|
libs = ["gdbm"]
|
|
|
|
setup(name = "gdbm",
|
|
description = "GDBM Extension to Python",
|
|
|
|
ext_modules = [Extension('_gdbm', ['_gdbmmodule.c'],
|
|
include_dirs = inc_dirs,
|
|
libraries = libs,
|
|
library_dirs = lib_dirs)]
|
|
)
|