diff options
author | Gabor Kovesdan <gabor@FreeBSD.org> | 2011-05-03 19:33:09 +0000 |
---|---|---|
committer | Gabor Kovesdan <gabor@FreeBSD.org> | 2011-05-03 19:33:09 +0000 |
commit | 7e370ebd64e43d1ac59181c51ed9065a094d39d7 (patch) | |
tree | 28a6b48ed3f1eff1d6eab2af016c684746c58035 /python/setup.py |
Diffstat (limited to 'python/setup.py')
-rw-r--r-- | python/setup.py | 37 |
1 files changed, 37 insertions, 0 deletions
diff --git a/python/setup.py b/python/setup.py new file mode 100644 index 0000000000000..b420a4cac3704 --- /dev/null +++ b/python/setup.py @@ -0,0 +1,37 @@ +# setup.py - Builds and installs the TRE Python language bindings module +# +# Copyright (c) 2009 Ville Laurikari <ville@laurikari.net> +# + +from distutils.core import setup, Extension +import sys +import os +import shutil + +version = "0.8.0" +data_files = [] +include_dirs = ["../lib"] +libraries = ["tre"] + +if sys.platform == "win32": + data_files = ["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 + ), + ], + ) |