Commits

Alborz Geramifard committed 210a077 Merge

Merge branch 'master' of https://bitbucket.org/rlpy/rlpy

Comments (0)

Files changed (3)

 doc/_build/*
 build/*
 Results/*
-Representations/FastCythonKiFDD.cpp
-Representations/hashing.c
-Representations/kernels.cpp
-Domains/HIVTreatment_dynamics.c
+rlpy/Representations/FastCythonKiFDD.cpp
+rlpy/Representations/hashing.c
+rlpy/Representations/kernels.cpp
+rlpy/Domains/HIVTreatment_dynamics.c
 *.so
 *.swp
 .project
 Config.py
 .ropeproject
 .nfs*
+dist
+*.egg-info

rlpy/Tools/transformations.py

 req_version = (2, 7)
 cur_version = sys.version_info
 if cur_version >= req_version:
-    _import_module('_transformations', package="Tools")
+    _import_module('_transformations', package="rlpy.Tools")
 
 if __name__ == "__main__":
     import doctest
 python setup.py build_ext --inplace
 """
 
-from distutils.core import setup, Extension
+from setuptools import setup, Extension, find_packages
 from Cython.Distutils import build_ext
-from Cython.Build import cythonize
 import numpy
 import os
 import sys
+
+# Grab the version string from the documentation.
+sys.path.insert(0, 'doc')
+import conf
+version = conf.version
+sys.path.remove('doc')
+
 if sys.platform == 'darwin':
     # by default use clang++ as this most likely to have c++11 support
     # on OSX
 else:
     extra_args = []
 
-setup(name="_transformations",
-      cmdclass={"build_ext": build_ext},
+setup(name="rlpy",
+      version=version,
+      description="The Reinforcement Learning Library for Education and Research",
+      url="http://acl.mit.edu/RLPy/",
+      packages=find_packages(),
+      package_data={'rlpy': [
+          'Domains/GridWorldMaps/*.txt',
+          'Domains/IntruderMonitoringMaps/*.txt',
+          'Domains/PinballConfigs/*.cfg',
+          'Domains/PacmanPackage/layouts/*.lay',
+          'Domains/SystemAdministratorMaps/*.txt',
+      ]},
+      install_requires=[
+          'numpy >= 1.7',
+          'scipy',
+          'matplotlib >= 1.2',
+          'networkx',
+          'scikit-learn',
+          'joblib',
+          'hyperopt'
+      ],
+      extras_require={'cython_extensions': ['cython']},
+      cmdclass={'build_ext': build_ext},
       ext_modules=[
           Extension("rlpy.Representations.hashing",
                     ["rlpy/Representations/hashing.pyx"],
-                    include_dirs=[numpy.get_include(
-                    ), "rlpy/Representations"]),
+                    include_dirs=[numpy.get_include(), "rlpy/Representations"]),
           Extension("rlpy.Domains.HIVTreatment_dynamics",
                     ["rlpy/Domains/HIVTreatment_dynamics.pyx"],
-                    include_dirs=[numpy.get_include(
-                    ), "rlpy/Representations"]),
+                    include_dirs=[numpy.get_include(), "rlpy/Representations"]),
           Extension("rlpy.Representations.kernels",
                     ["rlpy/Representations/kernels.pyx",
                      "rlpy/Representations/c_kernels.cc",
                      "rlpy/Representations/c_kernels.pxd"],
                     language="c++",
                     #extra_compile_args=extra_args + ["-std=c++0x"],
-                    include_dirs=[numpy.get_include(
-                    ), "rlpy.Representations"]),
+                    include_dirs=[numpy.get_include(), "rlpy.Representations"]),
           Extension("rlpy.Tools._transformations",
                     ["rlpy/Tools/transformations.c"],
                     include_dirs=[numpy.get_include()]),
                     language="c++",
                     extra_compile_args=["-std=c++0x"] + extra_args,
                     include_dirs=[
-                        numpy.get_include(
-                        ),
-                        "rlpy/Representations"],
-                    ), ])
+                        numpy.get_include(), "rlpy/Representations"],
+                    )],
+      test_suite='tests'
+      )