python bindings patch by Martin Renold (official mailing list). http://old.homeip...
authorChristian Andreetta <satya@gentoo.org>
Tue, 4 Jan 2005 11:37:55 +0000 (11:37 +0000)
committerChristian Andreetta <satya@gentoo.org>
Tue, 4 Jan 2005 11:37:55 +0000 (11:37 +0000)
sci-mathematics/fann/ChangeLog
sci-mathematics/fann/Manifest
sci-mathematics/fann/fann-1.2.0-r1.ebuild [new file with mode: 0644]
sci-mathematics/fann/fann-1.2.0.ebuild
sci-mathematics/fann/files/digest-fann-1.2.0-r1 [new file with mode: 0644]
sci-mathematics/fann/files/fann-1.2.0-r1.patch [new file with mode: 0644]

index 2e3940c894a36c7db82d4694a973a55cc87f6644..bccafc0d84daf584bc7da0f0f573bc319a67d723 100644 (file)
@@ -1,6 +1,13 @@
 # ChangeLog for sci-mathematics/fann
-# Copyright 1999-2004 Gentoo Foundation; Distributed under the GPL v2
-# $Header: /var/cvsroot/gentoo-x86/sci-mathematics/fann/ChangeLog,v 1.2 2004/12/29 00:35:52 swegener Exp $
+# Copyright 1999-2005 Gentoo Foundation; Distributed under the GPL v2
+# $Header: /var/cvsroot/gentoo-x86/sci-mathematics/fann/ChangeLog,v 1.3 2005/01/04 11:37:55 satya Exp $
+
+*fann-1.2.0-r1 (04 Jan 2005)
+
+  04 Jan 2005; Christian Andreetta <satya@gentoo.org>
+  +files/fann-1.2.0-r1.patch, +fann-1.2.0-r1.ebuild:
+  python bindings patch by Martin Renold.
+  (http://old.homeip.net/martin/fann-python-bindings.patch)
 
 *fann-1.2.0 (28 Dec 2004)
 
index 1329c7dbd19e1c5f6995db41b7fe39b6328930d1..8cbdc684bdc47d9be81750cab999c413a8795990 100644 (file)
@@ -1,15 +1,8 @@
------BEGIN PGP SIGNED MESSAGE-----
-Hash: SHA1
-
-MD5 2884afb4418de42291f1537002abe1a1 ChangeLog 576
+MD5 d002ee3574971800805fe59e671a20b1 fann-1.2.0-r1.ebuild 2494
+MD5 f65454d942a31e0d238c0e85efdb48d2 ChangeLog 813
 MD5 a1a8f7b84e93c6954c7a492419204578 metadata.xml 700
-MD5 1f624f514103a1b160f872a906a6fa44 fann-1.2.0.ebuild 2429
+MD5 5b06bf734ddd34cdaa6ef4ee0837ee1c fann-1.2.0.ebuild 2426
+MD5 2f3e1ec485ad30450d503501c4d67912 files/digest-fann-1.2.0-r1 64
 MD5 2f3e1ec485ad30450d503501c4d67912 files/digest-fann-1.2.0 64
+MD5 b5581af0afa35074fc76a910ae6e9b5c files/fann-1.2.0-r1.patch 14130
 MD5 c3136d6017e2e2debb0c8518543a9900 files/fann-1.2.0-setup.py 1503
------BEGIN PGP SIGNATURE-----
-Version: GnuPG v1.9.10 (GNU/Linux)
-
-iD8DBQFB0fvuI1lqEGTUzyQRAjpkAKCMNYIEXhfJfp9TVw1ygs8N5Xz6vACZAXOw
-TUS+LHdxJueCEmew6+GIZMM=
-=/99e
------END PGP SIGNATURE-----
diff --git a/sci-mathematics/fann/fann-1.2.0-r1.ebuild b/sci-mathematics/fann/fann-1.2.0-r1.ebuild
new file mode 100644 (file)
index 0000000..3e0cf7c
--- /dev/null
@@ -0,0 +1,74 @@
+# Copyright 1999-2005 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/sci-mathematics/fann/fann-1.2.0-r1.ebuild,v 1.1 2005/01/04 11:37:55 satya Exp $
+
+inherit eutils
+#-----------------------------------------------------------------------------
+MY_PKG_NAME=${PN}-${PV/-.*/}
+DESCRIPTION="Fast Artificial Neural Network Library implements multilayer artificial neural networks in C"
+HOMEPAGE="http://fann.sourceforge.net/"
+SRC_URI="mirror://sourceforge/fann/${MY_PKG_NAME}.tar.bz2"
+#-----------------------------------------------------------------------------
+LICENSE="LGPL-2"
+SLOT="0"
+KEYWORDS="~x86"
+IUSE="doc python"
+#-----------------------------------------------------------------------------
+DEPEND="sys-devel/autoconf
+       sys-apps/sed
+       doc? ( app-text/docbook-sgml-utils )
+       python? ( dev-lang/python dev-lang/swig )"
+#-----------------------------------------------------------------------------
+S=${WORKDIR}/${MY_PKG_NAME}
+#=============================================================================
+src_unpack() {
+       unpack ${A} || die
+       cd ${S} || die
+       epatch ${FILESDIR}/${PF}.patch
+}
+#=============================================================================
+src_compile() {
+       local myconf
+       myconf="--prefix=/usr"
+       cd ${S} || die
+       econf ${myconf} || die
+       emake || die
+       if use python; then
+               einfo "python ------------------------------"
+               cd ${S}/python || die
+               #mkdir fann
+               #for f in `ls *py |grep -v setup.py`; do
+               #       mv $f fann || die
+               #done
+               python setup_unix.py build
+       fi
+}
+#=============================================================================
+src_install() {
+       cd ${S}
+       make install DESTDIR=${D} || die
+       if use doc; then
+               einfo "doc ---------------------------------"
+               dodoc AUTHORS COPYING ChangeLog INSTALL NEWS README TODO
+               insinto /usr/share/doc/${PF}/benchmarks
+               cp -a ${S}/benchmarks/* ${D}/usr/share/doc/${PF}/benchmarks
+               insinto /usr/share/doc/${PF}/examples/c
+               doins ${S}/examples/*
+               insinto /usr/share/doc/${PF}/html
+               cp -a doc/html/* ${D}/usr/share/doc/${PF}/html
+               insinto /usr/share/doc/${PF}/pdf
+               doins doc/*pdf
+       fi
+       if use python; then
+               einfo "python ------------------------------"
+               cd ${S}/python || die
+               python setup_unix.py install --root=${D} || die "No python"
+               if use doc; then
+                       local python_doc_dir="/usr/share/doc/${PF}/examples/python"
+                       insinto ${python_doc_dir}
+                       doins examples/*py
+                       dosym ../../benchmarks/datasets ${python_doc_dir}/
+               fi
+       fi
+}
+
index f64c7f31f068cbd0d95e514aa1d88bd916e59f6d..cc8787c07aed63a28c031ac1bdc324854beea43f 100644 (file)
@@ -1,6 +1,6 @@
-# Copyright 1999-2004 Gentoo Foundation
+# Copyright 1999-2005 Gentoo Foundation
 # Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/sci-mathematics/fann/fann-1.2.0.ebuild,v 1.1 2004/12/28 21:57:36 ribosome Exp $
+# $Header: /var/cvsroot/gentoo-x86/sci-mathematics/fann/fann-1.2.0.ebuild,v 1.2 2005/01/04 11:37:55 satya Exp $
 
 inherit eutils
 #-----------------------------------------------------------------------------
diff --git a/sci-mathematics/fann/files/digest-fann-1.2.0-r1 b/sci-mathematics/fann/files/digest-fann-1.2.0-r1
new file mode 100644 (file)
index 0000000..24559c7
--- /dev/null
@@ -0,0 +1 @@
+MD5 d655f82d4a47e4b697b0083fdaa78c71 fann-1.2.0.tar.bz2 2082660
diff --git a/sci-mathematics/fann/files/fann-1.2.0-r1.patch b/sci-mathematics/fann/files/fann-1.2.0-r1.patch
new file mode 100644 (file)
index 0000000..12aae86
--- /dev/null
@@ -0,0 +1,417 @@
+diff -N -u -r fann-1.2.0.orig/python/examples/mushroom.py fann-1.2.0.my/python/examples/mushroom.py
+--- fann-1.2.0.orig/python/examples/mushroom.py        2004-07-24 01:36:04.000000000 +0200
++++ fann-1.2.0.my/python/examples/mushroom.py  2005-01-03 20:48:21.000000000 +0100
+@@ -20,9 +20,9 @@
+ 
+ # start training the network
+ print "Training network"
+-ann.set_activation_function_hidden(fann.FANN_SIGMOID_SYMMETRIC_STEPWISE)
+-ann.set_activation_function_output(fann.FANN_SIGMOID_STEPWISE)
+-ann.set_training_algorithm(fann.FANN_TRAIN_INCREMENTAL)
++ann.set_activation_function_hidden(fann.SIGMOID_SYMMETRIC_STEPWISE)
++ann.set_activation_function_output(fann.SIGMOID_STEPWISE)
++ann.set_training_algorithm(fann.TRAIN_INCREMENTAL)
+       
+ ann.train_on_data(train_data, max_iterations, iterations_between_reports, desired_error)
+       
+@@ -40,9 +40,3 @@
+ print "Saving network"
+ ann.save("mushroom_float.net")
+ 
+-# blow it all up
+-print "Cleaning up."
+-ann.destroy()
+-test_data.destroy()
+-train_data.destroy()
+-
+diff -N -u -r fann-1.2.0.orig/python/examples/simple_train.py fann-1.2.0.my/python/examples/simple_train.py
+--- fann-1.2.0.orig/python/examples/simple_train.py    2004-07-24 01:35:58.000000000 +0200
++++ fann-1.2.0.my/python/examples/simple_train.py      2005-01-03 20:48:01.000000000 +0100
+@@ -12,9 +12,9 @@
+ iterations_between_reports = 1000
+ 
+ ann = fann.create(connection_rate, learning_rate, (num_input, num_neurons_hidden, num_output))
++ann.set_activation_function_output(fann.SIGMOID_SYMMETRIC_STEPWISE)
+ 
+ ann.train_on_file("datasets/xor.data", max_iterations, iterations_between_reports, desired_error)
+ 
+ ann.save("xor_float.net")
+ 
+-ann.destroy()
+diff -N -u -r fann-1.2.0.orig/python/fann_helper.c fann-1.2.0.my/python/fann_helper.c
+--- fann-1.2.0.orig/python/fann_helper.c       2004-07-26 09:52:30.000000000 +0200
++++ fann-1.2.0.my/python/fann_helper.c 2005-01-03 22:13:09.000000000 +0100
+@@ -68,3 +68,8 @@
+       return get_row_from_double_array(t->output, row, t->num_output);\r
+ }\r
+ \r
++\r
++int fann_is_NULL(struct fann *ann)\r
++{\r
++      return ann == NULL ? 1 : 0;\r
++}\r
+diff -N -u -r fann-1.2.0.orig/python/fann.py fann-1.2.0.my/python/fann.py
+--- fann-1.2.0.orig/python/fann.py     2004-07-26 09:46:04.000000000 +0200
++++ fann-1.2.0.my/python/fann.py       2005-01-03 22:32:49.000000000 +0100
+@@ -21,30 +21,23 @@
+ 
+ import libfann
+ 
+-# Activation function
+-FANN_LINEAR = 0
+-FANN_THRESHOLD = 1
+-FANN_THRESHOLD_SYMMETRIC = 2
+-FANN_SIGMOID = 3
+-FANN_SIGMOID_STEPWISE = 4                # default
+-FANN_SIGMOID_SYMMETRIC = 5
+-FANN_SIGMOID_SYMMETRIC_STEPWISE = 6
+-FANN_GAUSSIAN = 7
+-FANN_GAUSSIAN_STEPWISE = 8
+-FANN_ELLIOT = 9                          # not implemented yet
+-FANN_ELLIOT_SYMMETRIC = 10               # not implemented yet
+-
+-# Training algorithm
+-FANN_TRAIN_INCREMENTAL = 0
+-FANN_TRAIN_BATCH = 1
+-FANN_TRAIN_RPROP = 2
+-FANN_TRAIN_QUICKPROP = 3
++# import all FANN_ constants without FANN_ prefix
++for name, value in libfann.__dict__.iteritems():
++    if name.startswith('FANN_') and not name.endswith('_NAMES'):
++        globals()[name[5:]] = value
++del name, value
+ 
+ class fann_class:
+ 
+     def __init__(self, ann):
++        """
++        Never call this directly.
++        """
+         self.__ann = ann
+-    
++
++    def __del__(self):
++        libfann.fann_destroy(self.__ann)
++
+     def get_native_object(self):
+         return self.__train_data
+ 
+@@ -54,13 +47,6 @@
+         """
+         return libfann.fann_run(self.__ann, input)
+ 
+-    def destroy(self):
+-        """ 
+-        Destructs the entire network.
+-        Be sure to call this function after finished using the network.
+-        """
+-        libfann.fann_destroy(self.__ann)
+-
+     def randomize_weights(self, min_weight, max_weight):
+         """
+         Randomize weights (from the beginning the weights are random between -0.1 and 0.1)
+@@ -198,31 +184,31 @@
+         """
+         libfann.fann_set_activation_function_output(self.__ann, activation_function)
+ 
+-    def get_activation_hidden_steepness(self):
++    def get_activation_steepness_hidden(self):
+         """
+         Get the steepness parameter for the sigmoid function used in the hidden layers.
+         """
+-        return libfann.get_activation_hidden_steepness(self.__ann)
++        return libfann.get_activation_steepness_hidden(self.__ann)
+ 
+-    def set_activation_hidden_steepness(self, steepness):
++    def set_activation_steepness_hidden(self, steepness):
+         """
+         Set the steepness of the sigmoid function used in the hidden layers.
+         Only usefull if sigmoid function is used in the hidden layers (default 0.5).
+         """
+-        libfann.fann_set_activation_hidden_steepness(self.__ann, steepness)
++        libfann.fann_set_activation_steepness_hidden(self.__ann, steepness)
+ 
+-    def get_activation_output_steepness(self):
++    def get_activation_steepness_output(self):
+         """
+         Get the steepness parameter for the sigmoid function used in the output layer.
+         """
+-        return libfann.fann_get_activation_output_steepness(self.__ann)
++        return libfann.fann_get_activation_steepness_output(self.__ann)
+ 
+-    def set_activation_output_steepness(self, steepness):
++    def set_activation_steepness_output(self, steepness):
+         """
+         Set the steepness of the sigmoid function used in the output layer.
+         Only usefull if sigmoid function is used in the output layer (default 0.5).
+         """
+-        libfann.fann_set_activation_output_steepness(self.__ann, steepness)
++        libfann.fann_set_activation_steepness_output(self.__ann, steepness)
+ 
+     def train_on_data(self, data, max_epochs, epochs_between_reports, desired_error):
+         """
+@@ -269,7 +255,12 @@
+ class train_class:
+ 
+     def __init__(self, train_data):
++        """
++        Never call this directly.
++        """
+         self.__train_data = train_data
++    def __del__(self):
++        libfann.fann_destroy_train(self.__train_data)
+ 
+     def get_native_object(self):
+         return self.__train_data
+@@ -289,13 +280,6 @@
+     def get_output(self, index):
+       return libfann.get_train_data_output(self.__train_data, index);
+ 
+-    def destroy(self):
+-        """
+-        Destructs the training data
+-        Be sure to call this function after finished using the training data.
+-        """
+-        libfann.fann_destroy_train(self.__train_data)
+-
+     def shuffle(self):
+         """
+         Shuffles training data, randomizing the order
+@@ -317,12 +301,10 @@
+ 
+     def merge(self, other):
+         """
+-        Merges training data into a single struct
++        Merges training data into a new struct
+         """
+         outcome = libfann.fann_merge_train_data(self.__train_data, other.get_native_object())
+-        self.destroy()
+-        self.__train_data = outcome
+-        return self
++        return train_class(outcome)
+ 
+     def duplicate(self):
+         """
+@@ -345,6 +327,8 @@
+     When running the network, the bias nodes always emits 1
+     """
+     ann = libfann.fann_create_array(connection_rate, learning_rate, len(layers), layers)
++    if libfann.fann_is_NULL(ann):
++        return None # probably won't happen
+     return fann_class(ann)
+ 
+ def create_from_file(filename):
+@@ -352,6 +336,8 @@
+     Constructs a backpropagation neural network from a configuration file.
+     """
+     ann = libfann.fann_create_from_file(filename)
++    if libfann.fann_is_NULL(ann):
++        raise IOError, "Could not load ann from file '%s'" + filename
+     return fann_class(ann)
+ 
+ def read_train_from_file(filename):
+diff -N -u -r fann-1.2.0.orig/python/libfann.i fann-1.2.0.my/python/libfann.i
+--- fann-1.2.0.orig/python/libfann.i   2004-07-20 00:21:20.000000000 +0200
++++ fann-1.2.0.my/python/libfann.i     2005-01-03 22:58:56.000000000 +0100
+@@ -7,15 +7,16 @@
+ #include "../src/include/fann.h"\r
+ %}\r
+ \r
+-%typemap(in) fann_type[ANY] {\r
++%define CHECKED_FLOAT_ARRAY(typemap_name, expected_length)\r
++%typemap(in) typemap_name {\r
+   int i;\r
+   if (!PySequence_Check($input)) {\r
+     PyErr_SetString(PyExc_ValueError,"Expected a sequence");\r
+-    return NULL;\r
++    SWIG_fail;\r
+   }\r
+-  if (PySequence_Length($input) == 0) {\r
+-    PyErr_SetString(PyExc_ValueError,"Size mismatch. Expected some elements");\r
+-    return NULL;\r
++  if (PySequence_Length($input) != expected_length) {\r
++    PyErr_SetString(PyExc_ValueError,"Sequence has wrong length");\r
++    SWIG_fail;\r
+   }\r
+   $1 = (float *) malloc(PySequence_Length($input)*sizeof(float));\r
+   for (i = 0; i < PySequence_Length($input); i++) {\r
+@@ -24,20 +25,29 @@
+       $1[i] = (float) PyFloat_AsDouble(o);\r
+     } else {\r
+       PyErr_SetString(PyExc_ValueError,"Sequence elements must be numbers");      \r
+-      return NULL;\r
++      Py_DECREF(o);\r
++      SWIG_fail;\r
+     }\r
++    Py_DECREF(o);\r
+   }\r
+ }\r
++%typemap(freearg) typemap_name {\r
++   if ($1) free($1);\r
++}\r
++%enddef\r
++\r
++CHECKED_FLOAT_ARRAY(fann_type *input, arg1->num_input)\r
++CHECKED_FLOAT_ARRAY(fann_type *desired_output, arg1->num_output)\r
+ \r
+ %typemap(in) int[ANY] {\r
+   int i;\r
+   if (!PySequence_Check($input)) {\r
+     PyErr_SetString(PyExc_ValueError,"Expected a sequence");\r
+-    return NULL;\r
++    SWIG_fail;\r
+   }\r
+   if (PySequence_Length($input) == 0) {\r
+     PyErr_SetString(PyExc_ValueError,"Size mismatch. Expected some elements");\r
+-    return NULL;\r
++    SWIG_fail;\r
+   }\r
+   $1 = (unsigned int *) malloc(PySequence_Length($input)*sizeof(unsigned int));\r
+   for (i = 0; i < PySequence_Length($input); i++) {\r
+@@ -46,37 +56,41 @@
+       $1[i] = (int) PyInt_AsLong(o);\r
+     } else {\r
+       PyErr_SetString(PyExc_ValueError,"Sequence elements must be numbers");      \r
+-      return NULL;\r
++      Py_DECREF(o);\r
++      SWIG_fail;\r
+     }\r
++    Py_DECREF(o);\r
+   }\r
+ }\r
+-\r
+-%typemap(freearg) fann_type* {\r
++%typemap(freearg) int[ANY] {\r
+    if ($1) free($1);\r
+ }\r
++%apply int[ANY] {int *, unsigned int*};\r
++\r
++typedef double fann_type; \r
+ \r
+ %typemap(out) PyObject* {\r
+   $result = $1;\r
+ }\r
+ \r
+-%apply fann_type[ANY] {fann_type *};\r
+-%apply int[ANY] {int *, unsigned int*};\r
++// create_array is used instead\r
++%ignore fann_create;\r
++%ignore fann_create_shortcut;\r
+ \r
+-#define FANN_INCLUDE\r
+-%varargs(10,int n = 0) fann_create;\r
+ %rename(fann_run_old) fann_run;\r
+ %rename(fann_run) fann_run2;\r
+ \r
+ %rename(fann_test_old) fann_test;\r
+ %rename(fann_test) fann_test2;\r
+ \r
++#define FANN_INCLUDE\r
+ %include "../src/include/fann.h"\r
+ %include "../src/include/fann_data.h"\r
++%include "../src/include/fann_activation.h"\r
+ \r
+ // Helper functions\r
+ PyObject* fann_run2(struct fann *ann, fann_type *input);\r
+ PyObject* fann_test2(struct fann *ann, fann_type *input, fann_type *desired_output);\r
+ PyObject* get_train_data_input(struct fann_train_data *ann, int row);\r
+ PyObject* get_train_data_output(struct fann_train_data *ann, int row);\r
+-\r
+-\r
++int fann_is_NULL(struct fann *ann);\r
+diff -N -u -r fann-1.2.0.orig/python/makefile.gnu fann-1.2.0.my/python/makefile.gnu
+--- fann-1.2.0.orig/python/makefile.gnu        2004-10-09 13:56:57.000000000 +0200
++++ fann-1.2.0.my/python/makefile.gnu  2005-01-02 16:52:23.000000000 +0100
+@@ -1,5 +1,7 @@
+ # This makefile was written to compile a distribution of pyfann for
+ # GNU platforms (cygwin included.)
++#
++# This is NOT needed for Linux/Unix, use setup_unix.py instead.
+ 
+ TARGETS = _libfann.dll
+ 
+diff -N -u -r fann-1.2.0.orig/python/README fann-1.2.0.my/python/README
+--- fann-1.2.0.orig/python/README      2004-08-06 10:54:13.000000000 +0200
++++ fann-1.2.0.my/python/README        2005-01-02 17:00:28.000000000 +0100
+@@ -1,6 +1,9 @@
+ This python binding is provided by Vincenzo Di Massa <hawk.it@tiscalinet.it>
+ and Gil Megidish <gil@megidish.net>
+ 
++Instructions for Windows:
++^^^^^^^^^^^^^^^^^^^^^^^^^
++
+ MAKE
+ Make sure to make the fann library first. You are required to have
+ swig and python development files installed. After you compiled the
+@@ -24,3 +27,17 @@
+ 
+ USAGE
+ Just import fann.
++
++Instructions for Unix/Linux:
++^^^^^^^^^^^^^^^^^^^^^^^^^^^^
++
++First build and install the fann library. Then run:
++
++./setup_unix.py build
++./setup_unix.py install
++
++Install alone will work too, if you run it twice (a small bug).
++The examples/ (not installed) should work now after you copy the datasets:
++
++mkdir examples/datasets
++cp ../examples/xor.data ../benchmarks/datasets/mushroom.* examples/datasets/
+diff -N -u -r fann-1.2.0.orig/python/setup.py fann-1.2.0.my/python/setup.py
+--- fann-1.2.0.orig/python/setup.py    2004-07-26 09:56:59.000000000 +0200
++++ fann-1.2.0.my/python/setup.py      2005-01-02 16:49:45.000000000 +0100
+@@ -22,7 +22,7 @@
+     """\r
+     override default distutils install_data, so we can copy\r
+     files directly, without splitting into modules, scripts,\r
+-    packages, and extensions."\r
++    packages, and extensions.\r
+     """\r
+     def run(self):\r
+         # need to change self.install_dir to the actual library dir\r
+diff -N -u -r fann-1.2.0.orig/python/setup_unix.py fann-1.2.0.my/python/setup_unix.py
+--- fann-1.2.0.orig/python/setup_unix.py       1970-01-01 01:00:00.000000000 +0100
++++ fann-1.2.0.my/python/setup_unix.py 2005-01-02 16:27:17.000000000 +0100
+@@ -0,0 +1,38 @@
++#!/usr/bin/env python
++from distutils.core import setup, Extension
++#from glob import glob
++
++VERSION='1.2.0'
++
++LONG_DESCRIPTION="""\
++Fast Artificial Neural Network Library implements multilayer
++artificial neural networks with support for both fully connected
++and sparsely connected networks. It includes a framework for easy 
++handling of training data sets. It is easy to use, versatile, well 
++documented, and fast. 
++"""
++
++module1 = Extension(
++    '_libfann', 
++    sources = ['libfann.i', 'fann_helper.c'], 
++    libraries = ['fann'],
++    #extra_objects = glob('../src/fann*.o'),
++    )
++
++setup(
++    name='pyfann',
++    version=VERSION,
++    description='Fast Artificial Neural Network Library (fann)',
++    long_description=LONG_DESCRIPTION,
++    author='Steffen Nissen',
++    author_email='lukesky@diku.dk',
++    maintainer='Gil Megidish',
++    maintainer_email='gil@megidish.net',
++    url='http://sourceforge.net/projects/fann/',
++    license='GNU LESSER GENERAL PUBLIC LICENSE (LGPL)',
++    platforms='UNIX',
++
++    ext_modules = [module1],
++    py_modules = ['libfann', 'fann']
++    )
++