[BACK]Return to setup.py.in CVS log [TXT][DIR] Up to [cvs.NetBSD.org] / src / external / bsd / tre / dist / python

File: [cvs.NetBSD.org] / src / external / bsd / tre / dist / python / setup.py.in (download)

Revision 1.1, Fri Nov 17 16:11:12 2017 UTC (2 years, 11 months ago) by rin
Branch point for: MAIN

Initial revision

# setup.py - Builds and installs the TRE Python language bindings module
#
# Copyright (c) 2009 Ville Laurikari <ville@laurikari.net>
#

import distutils.sysconfig
from distutils.core import setup, Extension
import sys
import os
import shutil

version = "@TRE_VERSION@"
data_files = []
include_dirs = ["../lib"]
libraries = ["tre"]

if sys.platform == "win32":
    # Place tre.dll in site-packages, next to tre.pyd.
    data_files = [(distutils.sysconfig.get_python_lib(), ["tre.dll"])]
    include_dirs += ["../win32"]
    shutil.copy("../win32/Release/tre.dll", ".")
    libraries = ["../win32/Release/tre"]

setup(name = "tre",
      version = version,
      description = "Python module for TRE",
      author = "Ville Laurikari",
      author_email = "ville@laurikari.net",
      license = "2-clause BSD",
      url = "http://laurikari.net/tre/",
      data_files = data_files,
      ext_modules = [Extension("tre",
                               sources = ["tre-python.c"],
                               define_macros = [("HAVE_CONFIG_H", None)],
                               include_dirs = include_dirs,
                               libraries = libraries
                               ),
                     ],
      )