You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
 

193 lines
6.6 KiB

# --- SDE-COPYRIGHT-NOTE-BEGIN ---
# This copyright note is auto-generated by ./scripts/Create-CopyPatch.
#
# Filename: package/.../rrdtool/rrdtool-1.2.19-setuppy.patch
# Copyright (C) 2007 The OpenSDE Project
#
# More information can be found in the files COPYING and README.
#
# This patch file is dual-licensed. It is available under the license the
# patched project is licensed under, as long as it is an OpenSource license
# as defined at http://www.opensource.org/ (e.g. BSD, X11) or under the terms
# of the GNU General Public License as published by the Free Software
# Foundation; either version 2 of the License, or (at your option) any later
# version.
# --- SDE-COPYRIGHT-NOTE-END ---
use setup.py for python install and build work instad of trying todo
it on our own
--- /dev/null 2007-03-06 16:53:58.620152249 +0200
+++ ./bindings/python/setup.py 2007-03-08 14:42:01.000000000 +0200
@@ -0,0 +1,56 @@
+#! /usr/bin/env python
+#
+# setup.py
+#
+# py-rrdtool distutil setup
+#
+# Author : Hye-Shik Chang <perky@fallin.lv>
+# Date : $Date: 2003/02/14 02:38:16 $
+# Created : 24 May 2002
+#
+# $Revision: 1.7 $
+#
+# ==========================================================================
+# This file is part of py-rrdtool.
+#
+# py-rrdtool is free software; you can redistribute it and/or modify
+# it under the terms of the GNU Lesser General Public License as published
+# by the Free Software Foundation; either version 2 of the License, or
+# (at your option) any later version.
+#
+# py-rrdtool is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU Lesser General Public License for more details.
+#
+# You should have received a copy of the GNU Lesser General Public License
+# along with Foobar; if not, write to the Free Software
+# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+#
+
+from distutils.core import setup, Extension
+import sys, os
+
+RRDBASE = os.environ.get('LOCALBASE', '../../src')
+library_dir = os.environ.get('LIBDIR', os.path.join(RRDBASE, 'lib'))
+include_dir = os.environ.get('INCDIR', RRDBASE)
+
+setup(name = "py-rrdtool",
+ version = "0.2.1",
+ description = "Python Interface to RRDTool",
+ author = "Hye-Shik Chang",
+ author_email = "perky@fallin.lv",
+ license = "LGPL",
+ url = "http://oss.oetiker.ch/rrdtool",
+ #packages = ['rrdtool'],
+ ext_modules = [
+ Extension(
+ "rrdtoolmodule",
+ ["rrdtoolmodule.c"],
+ libraries=['rrd'],
+ runtime_library_dirs=[library_dir],
+ library_dirs=[library_dir],
+ include_dirs=[include_dir],
+ )
+ ]
+)
--- ./bindings/python/Makefile.am (Revision 990)
+++ ./bindings/python/Makefile.am (Revision 993)
@@ -1,12 +0,0 @@
-AM_CPPFLAGS = @CFLAGS@ -I$(top_srcdir)/src @PYTHON_INCLUDES@
-
-pyexec_PROGRAMS = rrdtoolmodule.so
-
-rrdtoolmodule_so_LDADD = $(top_builddir)/src/librrd.la
-rrdtoolmodule_so_SOURCES = rrdtoolmodule.c
-
-noinst_HEADERS = rrd_extra.h
-
-clean-local:
- rm -rf build
-
--- ./bindings/Makefile.am (Revision 990)
+++ ./bindings/Makefile.am (Revision 993)
@@ -1,3 +1,5 @@
+.PHONY: python ruby
+
if BUILD_TCL
SUB_tcl = tcl
endif
@@ -2,16 +4,13 @@
-if BUILD_PYTHON
-SUB_python = python
-endif
+SUBDIRS = $(SUB_tcl)
-SUBDIRS = $(SUB_tcl) $(SUB_python)
-
# the following files are not mentioned in any other Makefile
EXTRA_DIST = perl-piped/MANIFEST perl-piped/README perl-piped/Makefile.PL perl-piped/RRDp.pm perl-piped/t/base.t \
- perl-shared/ntmake.pl perl-shared/MANIFEST perl-shared/README perl-shared/Makefile.PL perl-shared/RRDs.pm perl-shared/RRDs.xs perl-shared/t/base.t \
- ruby/CHANGES ruby/README ruby/extconf.rb ruby/main.c ruby/test.rb
+ perl-shared/ntmake.pl perl-shared/MANIFEST perl-shared/README perl-shared/Makefile.PL perl-shared/RRDs.pm perl-shared/RRDs.xs perl-shared/t/base.t \
+ ruby/CHANGES ruby/README ruby/extconf.rb ruby/main.c ruby/test.rb \
+ python/ACKNOWLEDGEMENT python/AUTHORS python/COPYING python/README python/rrd_extra.h python/rrdtoolmodule.c python/setup.py
# add the following to the all target
-all-local: @COMP_PERL@ @COMP_RUBY@
+all-local: @COMP_PERL@ @COMP_RUBY@ @COMP_PYTHON@
@@ -21,11 +20,16 @@
test -f perl-piped/Makefile && cd perl-piped && $(MAKE) install || true
test -f perl-shared/Makefile && cd perl-shared && $(MAKE) install || true
test -f ruby/Makefile && cd ruby && $(MAKE) EPREFIX=$(exec_prefix) $(RUBY_MAKE_OPTIONS) install || true
+ test -d python/build && cd python && rm -rf build && env LIBDIR=$(libdir) $(PYTHON) setup.py install --prefix=$(prefix) --exec-prefix=$(exec_prefix) || true
# rules for buildung the ruby module
ruby:
cd ruby && $(RUBY) extconf.rb && $(MAKE) EPREFIX=$(exec_prefix) $(RUBY_MAKE_OPTIONS)
+# rules for buildung the pyton module
+python:
+ cd python && env LIBDIR=../../src/.libs $(PYTHON) setup.py build
+
# rules for building the perl module
perl_piped: perl-piped/Makefile
cd perl-piped && $(MAKE)
@@ -46,5 +50,5 @@
test -f perl-shared/Makefile && cd perl-shared && $(MAKE) clean || true
test -f perl-shared/Makefile && rm -f perl-shared/Makefile || true
test -f ruby/Makefile && cd ruby && $(MAKE) clean && rm Makefile || true
-
+ test -d python/build && cd python && rm -rf build || true
##END##
--- ./configure.ac (Revision 990)
+++ ./configure.ac (Revision 993)
@@ -504,6 +504,7 @@
fi
+
AC_MSG_CHECKING(Ruby Modules to build)
AC_MSG_RESULT(${COMP_RUBY:-No Ruby Modules will be built})
@@ -583,8 +584,14 @@
AM_CHECK_PYTHON_HEADERS(,[enable_python=no;AC_MSG_WARN(could not find Python headers)])
fi
-AM_CONDITIONAL(BUILD_PYTHON,[test "$enable_python" = "yes"])
+if test x$enable_python = xno; then
+ COMP_PYTHON=
+else
+ COMP_PYTHON="python"
+fi
+AC_SUBST(COMP_PYTHON)
+
dnl Check for nroff
AC_PATH_PROGS(NROFF, gnroff nroff)
AC_PATH_PROGS(TROFF, groff troff)
--- ./Makefile.am (Revision 990)
+++ ./Makefile.am (Revision 993)
@@ -45,6 +45,6 @@
cd bindings/tcl && $(MAKE) tcl-install
site-python-install: all
- cd bindings/python && $(MAKE) python-install
+ cd bindings/python && $(PYTHON) setup.py install
##END##
--- ./configure.ac (Revision 994)
+++ ./configure.ac (Revision 995)
@@ -616,7 +616,6 @@
AC_CONFIG_FILES([bindings/Makefile])
AC_CONFIG_FILES([bindings/tcl/Makefile])
AC_CONFIG_FILES([bindings/tcl/ifOctets.tcl])
-AC_CONFIG_FILES([bindings/python/Makefile])
AC_CONFIG_FILES([Makefile])
AC_CONFIG_COMMANDS([default],[[ chmod +x examples/*.pl]],[[]])