83f35b6caff85cdc1492d6fcffba62bfe6029f29
[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 library_dir = os.environ.get('BUILDLIBDIR', os.path.join(RRDBASE, '.libs'))
36 include_dir = os.environ.get('INCDIR', RRDBASE)
37
38 setup(name = "py-rrdtool",
39       version = "0.2.1",
40       description = "Python Interface to RRDTool",
41       author = "Hye-Shik Chang",
42       author_email = "perky@fallin.lv",
43       license = "LGPL",
44       url = "http://oss.oetiker.ch/rrdtool",
45       #packages = ['rrdtool'],
46       ext_modules = [
47           Extension(
48             "rrdtoolmodule",
49             ["rrdtoolmodule.c"],
50             libraries=['rrd'],
51             library_dirs=[library_dir],
52             include_dirs=[include_dir],
53           )
54       ]
55 )