freebsd-ports/databases/py-gdbm/files/setup3.py
Li-Wen Hsu 4e54190b40 - Install standard libraries separated as other ports to the same place
with other standard libraries (${PYTHON_LIBDIR}/lib-dynload)
- Improve consistency of the Makefile(s)
- Whitespace cleanup for the patches
2013-03-01 20:12:01 +00:00

30 lines
787 B
Python

#!/usr/bin/env python
# To use:
# python setup.py install
#
__version__ = "$FreeBSD$"
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)]
)