OpenSDE Packages Database (without history before r20070)
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

  1. # --- SDE-COPYRIGHT-NOTE-BEGIN ---
  2. # This copyright note is auto-generated by ./scripts/Create-CopyPatch.
  3. #
  4. # Filename: package/.../rrdtool/rrdtool-1.2.19-setuppy.patch
  5. # Copyright (C) 2007 The OpenSDE Project
  6. #
  7. # More information can be found in the files COPYING and README.
  8. #
  9. # This patch file is dual-licensed. It is available under the license the
  10. # patched project is licensed under, as long as it is an OpenSource license
  11. # as defined at http://www.opensource.org/ (e.g. BSD, X11) or under the terms
  12. # of the GNU General Public License as published by the Free Software
  13. # Foundation; either version 2 of the License, or (at your option) any later
  14. # version.
  15. # --- SDE-COPYRIGHT-NOTE-END ---
  16. use setup.py for python install and build work instad of trying todo
  17. it on our own
  18. --- /dev/null 2007-03-06 16:53:58.620152249 +0200
  19. +++ ./bindings/python/setup.py 2007-03-08 14:42:01.000000000 +0200
  20. @@ -0,0 +1,56 @@
  21. +#! /usr/bin/env python
  22. +#
  23. +# setup.py
  24. +#
  25. +# py-rrdtool distutil setup
  26. +#
  27. +# Author : Hye-Shik Chang <perky@fallin.lv>
  28. +# Date : $Date: 2003/02/14 02:38:16 $
  29. +# Created : 24 May 2002
  30. +#
  31. +# $Revision: 1.7 $
  32. +#
  33. +# ==========================================================================
  34. +# This file is part of py-rrdtool.
  35. +#
  36. +# py-rrdtool is free software; you can redistribute it and/or modify
  37. +# it under the terms of the GNU Lesser General Public License as published
  38. +# by the Free Software Foundation; either version 2 of the License, or
  39. +# (at your option) any later version.
  40. +#
  41. +# py-rrdtool is distributed in the hope that it will be useful,
  42. +# but WITHOUT ANY WARRANTY; without even the implied warranty of
  43. +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  44. +# GNU Lesser General Public License for more details.
  45. +#
  46. +# You should have received a copy of the GNU Lesser General Public License
  47. +# along with Foobar; if not, write to the Free Software
  48. +# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
  49. +#
  50. +
  51. +from distutils.core import setup, Extension
  52. +import sys, os
  53. +
  54. +RRDBASE = os.environ.get('LOCALBASE', '../../src')
  55. +library_dir = os.environ.get('LIBDIR', os.path.join(RRDBASE, 'lib'))
  56. +include_dir = os.environ.get('INCDIR', RRDBASE)
  57. +
  58. +setup(name = "py-rrdtool",
  59. + version = "0.2.1",
  60. + description = "Python Interface to RRDTool",
  61. + author = "Hye-Shik Chang",
  62. + author_email = "perky@fallin.lv",
  63. + license = "LGPL",
  64. + url = "http://oss.oetiker.ch/rrdtool",
  65. + #packages = ['rrdtool'],
  66. + ext_modules = [
  67. + Extension(
  68. + "rrdtoolmodule",
  69. + ["rrdtoolmodule.c"],
  70. + libraries=['rrd'],
  71. + runtime_library_dirs=[library_dir],
  72. + library_dirs=[library_dir],
  73. + include_dirs=[include_dir],
  74. + )
  75. + ]
  76. +)
  77. --- ./bindings/python/Makefile.am (Revision 990)
  78. +++ ./bindings/python/Makefile.am (Revision 993)
  79. @@ -1,12 +0,0 @@
  80. -AM_CPPFLAGS = @CFLAGS@ -I$(top_srcdir)/src @PYTHON_INCLUDES@
  81. -
  82. -pyexec_PROGRAMS = rrdtoolmodule.so
  83. -
  84. -rrdtoolmodule_so_LDADD = $(top_builddir)/src/librrd.la
  85. -rrdtoolmodule_so_SOURCES = rrdtoolmodule.c
  86. -
  87. -noinst_HEADERS = rrd_extra.h
  88. -
  89. -clean-local:
  90. - rm -rf build
  91. -
  92. --- ./bindings/Makefile.am (Revision 990)
  93. +++ ./bindings/Makefile.am (Revision 993)
  94. @@ -1,3 +1,5 @@
  95. +.PHONY: python ruby
  96. +
  97. if BUILD_TCL
  98. SUB_tcl = tcl
  99. endif
  100. @@ -2,16 +4,13 @@
  101. -if BUILD_PYTHON
  102. -SUB_python = python
  103. -endif
  104. +SUBDIRS = $(SUB_tcl)
  105. -SUBDIRS = $(SUB_tcl) $(SUB_python)
  106. -
  107. # the following files are not mentioned in any other Makefile
  108. EXTRA_DIST = perl-piped/MANIFEST perl-piped/README perl-piped/Makefile.PL perl-piped/RRDp.pm perl-piped/t/base.t \
  109. - 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 \
  110. - ruby/CHANGES ruby/README ruby/extconf.rb ruby/main.c ruby/test.rb
  111. + 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 \
  112. + ruby/CHANGES ruby/README ruby/extconf.rb ruby/main.c ruby/test.rb \
  113. + python/ACKNOWLEDGEMENT python/AUTHORS python/COPYING python/README python/rrd_extra.h python/rrdtoolmodule.c python/setup.py
  114. # add the following to the all target
  115. -all-local: @COMP_PERL@ @COMP_RUBY@
  116. +all-local: @COMP_PERL@ @COMP_RUBY@ @COMP_PYTHON@
  117. @@ -21,11 +20,16 @@
  118. test -f perl-piped/Makefile && cd perl-piped && $(MAKE) install || true
  119. test -f perl-shared/Makefile && cd perl-shared && $(MAKE) install || true
  120. test -f ruby/Makefile && cd ruby && $(MAKE) EPREFIX=$(exec_prefix) $(RUBY_MAKE_OPTIONS) install || true
  121. + test -d python/build && cd python && rm -rf build && env LIBDIR=$(libdir) $(PYTHON) setup.py install --prefix=$(prefix) --exec-prefix=$(exec_prefix) || true
  122. # rules for buildung the ruby module
  123. ruby:
  124. cd ruby && $(RUBY) extconf.rb && $(MAKE) EPREFIX=$(exec_prefix) $(RUBY_MAKE_OPTIONS)
  125. +# rules for buildung the pyton module
  126. +python:
  127. + cd python && env LIBDIR=../../src/.libs $(PYTHON) setup.py build
  128. +
  129. # rules for building the perl module
  130. perl_piped: perl-piped/Makefile
  131. cd perl-piped && $(MAKE)
  132. @@ -46,5 +50,5 @@
  133. test -f perl-shared/Makefile && cd perl-shared && $(MAKE) clean || true
  134. test -f perl-shared/Makefile && rm -f perl-shared/Makefile || true
  135. test -f ruby/Makefile && cd ruby && $(MAKE) clean && rm Makefile || true
  136. -
  137. + test -d python/build && cd python && rm -rf build || true
  138. ##END##
  139. --- ./configure.ac (Revision 990)
  140. +++ ./configure.ac (Revision 993)
  141. @@ -504,6 +504,7 @@
  142. fi
  143. +
  144. AC_MSG_CHECKING(Ruby Modules to build)
  145. AC_MSG_RESULT(${COMP_RUBY:-No Ruby Modules will be built})
  146. @@ -583,8 +584,14 @@
  147. AM_CHECK_PYTHON_HEADERS(,[enable_python=no;AC_MSG_WARN(could not find Python headers)])
  148. fi
  149. -AM_CONDITIONAL(BUILD_PYTHON,[test "$enable_python" = "yes"])
  150. +if test x$enable_python = xno; then
  151. + COMP_PYTHON=
  152. +else
  153. + COMP_PYTHON="python"
  154. +fi
  155. +AC_SUBST(COMP_PYTHON)
  156. +
  157. dnl Check for nroff
  158. AC_PATH_PROGS(NROFF, gnroff nroff)
  159. AC_PATH_PROGS(TROFF, groff troff)
  160. --- ./Makefile.am (Revision 990)
  161. +++ ./Makefile.am (Revision 993)
  162. @@ -45,6 +45,6 @@
  163. cd bindings/tcl && $(MAKE) tcl-install
  164. site-python-install: all
  165. - cd bindings/python && $(MAKE) python-install
  166. + cd bindings/python && $(PYTHON) setup.py install
  167. ##END##
  168. --- ./configure.ac (Revision 994)
  169. +++ ./configure.ac (Revision 995)
  170. @@ -616,7 +616,6 @@
  171. AC_CONFIG_FILES([bindings/Makefile])
  172. AC_CONFIG_FILES([bindings/tcl/Makefile])
  173. AC_CONFIG_FILES([bindings/tcl/ifOctets.tcl])
  174. -AC_CONFIG_FILES([bindings/python/Makefile])
  175. AC_CONFIG_FILES([Makefile])
  176. AC_CONFIG_COMMANDS([default],[[ chmod +x examples/*.pl]],[[]])