From c8e5c28d1818e983cb598e5f727b44b0780da6fa Mon Sep 17 00:00:00 2001 From: "Alex J. Champandard" Date: Fri, 10 Apr 2015 23:52:29 +0200 Subject: [PATCH] The library now comes with its own setup.py, like all grown up Python projects! --- README.rst | 5 +---- setup.py | 55 ++++++++++++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 56 insertions(+), 4 deletions(-) create mode 100644 setup.py diff --git a/README.rst b/README.rst index 6827a76..910bffb 100644 --- a/README.rst +++ b/README.rst @@ -17,7 +17,7 @@ You'll need to first install some dependencies manually. Unfortunately, ``pylea > git clone https://github.com/lisa-lab/pylearn2.git > cd pylearn2; python setup.py develop -Once that's done, you can grab this repository and set your ``PYTHONPATH`` to point to the correct folder. A ``setup.py`` file is coming soon for the official version 0.1! +Once that's done, you can grab this repository and set your ``PYTHONPATH`` to point to the correct folder, or install from ``setup.py`` in the exact same way. Demonstration @@ -55,9 +55,6 @@ Upcoming Features v0.1 ---------------------- * Quick start in the README.rst file showing how to get an estimator. -* Allow using all layer types as hidden layers, not linear only for output. -* Better error checking for the layer specifications, useful messages otherwise. -* Installation using ``setup.py`` like all normal Python projects! .. |Build Status| image:: https://travis-ci.org/aigamedev/scikit-neuralnetwork.svg?branch=master diff --git a/setup.py b/setup.py new file mode 100644 index 0000000..4854a93 --- /dev/null +++ b/setup.py @@ -0,0 +1,55 @@ +import os +import sys +from setuptools import setup, find_packages + + +pwd = os.path.abspath(os.path.dirname(__file__)) +sys.path.append(pwd) + +try: + README = open(os.path.join(pwd, 'README.rst')).read() +except IOError: + README = '' + +try: + import sknn + VERSION = sknn.__version__ +except ImportError: + VERSION = 'N/A' + + +install_requires = [ + 'pylearn2', + 'scikit-learn', +] + +tests_require = [ + 'nosetests', +] + +docs_require = [ + 'Sphinx', +] + +setup(name='sknn', + version=VERSION, + description="Neural Network wrapper for pylearn2 compatible with scikit-learn.", + long_description=README, + classifiers=[ + "Development Status :: 3 - Alpha", + "Programming Language :: Python :: 2.7", + "Programming Language :: Python :: 3.4", + ], + keywords='deep learning, neural networks', + author='', + url='https://github.com/aigamedev/scikit-neuralnetwork', + license='BSD 3-clause license', + packages=find_packages(), + include_package_data=True, + zip_safe=False, + install_requires=install_requires, + extras_require={ + 'testing': tests_require, + 'docs': docs_require, + }, + )