make sure the python extension gets the final resting place of the rrdlibrary compile...
[rrdtool.git] / bindings / python / setup.py
1 #! /usr/bin/env python
2 #
3 # setup.py
4 #
5 # py-rrdtool distutil setup
6 #
7 # Author  : Hye-Shik Chang <perky@fallin.lv>
8 # Date    : $Date: 2003/02/14 02:38:16 $
9 # Created : 24 May 2002
10 #
11 # $Revision: 1.7 $
12 #
13 #  ==========================================================================
14 #  This file is part of py-rrdtool.
15 #
16 #  py-rrdtool is free software; you can redistribute it and/or modify
17 #  it under the terms of the GNU Lesser General Public License as published
18 #  by the Free Software Foundation; either version 2 of the License, or
19 #  (at your option) any later version.
20 #
21 #  py-rrdtool is distributed in the hope that it will be useful,
22 #  but WITHOUT ANY WARRANTY; without even the implied warranty of
23 #  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
24 #  GNU Lesser General Public License for more details.
25 #
26 #  You should have received a copy of the GNU Lesser General Public License
27 #  along with Foobar; if not, write to the Free Software
28 #  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
29 #
30
31 from distutils.core import setup, Extension
32 import sys, os
33
34 RRDBASE = os.environ.get('LOCALBASE', '../../src')
35 runtime_library_dir = os.environ.get('RUNTIMELIBDIR')
36 library_dir = os.environ.get('BUILDLIBDIR', os.path.join(RRDBASE, 'lib'))
37 include_dir = os.environ.get('INCDIR', RRDBASE)
38
39 setup(name = "py-rrdtool",
40       version = "0.2.1",
41       description = "Python Interface to RRDTool",
42       author = "Hye-Shik Chang",
43       author_email = "perky@fallin.lv",
44       license = "LGPL",
45       url = "http://oss.oetiker.ch/rrdtool",
46       #packages = ['rrdtool'],
47       ext_modules = [
48           Extension(
49             "rrdtoolmodule",
50             ["rrdtoolmodule.c"],
51             libraries=['rrd'],
52             runtime_library_dirs=[runtime_library_dir],
53             library_dirs=[library_dir],
54             include_dirs=[include_dir],
55           )
56       ]
57 )