# coding: utf-8

from __future__ import division, print_function

__author__ = "adrn <adrn@astro.columbia.edu>"

# Standard library
import os, sys
from distutils.core import setup
from distutils.extension import Extension

# Third-party
import numpy as np
from Cython.Distutils import build_ext
from Cython.Build import cythonize

# Get numpy path
numpy_base_path = os.path.split(np.__file__)[0]
numpy_incl_path = os.path.join(numpy_base_path, "core", "include")

extensions = []

potential = Extension("gary.potential.*",
                      ["gary/potential/*.pyx",
                       "gary/potential/_cbuiltin.c"],
                      include_dirs=[numpy_incl_path])
extensions.append(potential)

integrate = Extension("gary.integrate.*",
                      ["gary/integrate/*.pyx"],
                      include_dirs=[numpy_incl_path])
extensions.append(integrate)

dopri = Extension("gary.integrate.*",
                  ["gary/integrate/*.pyx",
                   "gary/integrate/dopri/dop853.h",
                   "gary/integrate/dopri/dop853.c"],
                  include_dirs=[numpy_incl_path])
extensions.append(dopri)

# dynamics = Extension("gary.dynamics.*",
#                      ["gary/dynamics/*.pyx"],
#                      include_dirs=[numpy_incl_path])
# extensions.append(dynamics)

setup(
    name="gary",
    version="0.1",
    author="Adrian M. Price-Whelan",
    author_email="adrn@astro.columbia.edu",
    license="MIT",
    cmdclass={'build_ext': build_ext},
    ext_modules=cythonize(extensions),
    packages=["gary", "gary.coordinates", "gary.io",
              "gary.observation", "gary.integrate",
              "gary.dynamics", "gary.inference",
              "gary.potential"],
    scripts=['bin/plotsnap', 'bin/moviesnap', 'bin/snap2gal'],
    package_data={'gary.potential': ['*.pxd','*.c','*.h'],
                  'gary.integrate': ['*.pxd','*.c','*.h']
                  },
)

# coding: utf-8

from __future__ import division, print_function

__author__ = "adrn <adrn@astro.columbia.edu>"

# Standard library
import os, sys
from distutils.core import setup
from distutils.extension import Extension

# Third-party
import numpy as np
from Cython.Distutils import build_ext
from Cython.Build import cythonize

# Get numpy path
numpy_base_path = os.path.split(np.__file__)[0]
numpy_incl_path = os.path.join(numpy_base_path, "core", "include")

extensions = []

potential = Extension("gary.potential.*",
                      ["gary/potential/*.pyx",
                       "gary/potential/_cbuiltin.c"],
                      include_dirs=[numpy_incl_path])
extensions.append(potential)

integrate = Extension("gary.integrate.*",
                      ["gary/integrate/*.pyx",
                       "gary/integrate/dopri/dop853.h",
                       "gary/integrate/dopri/dop853.c"],
                      include_dirs=[numpy_incl_path])
extensions.append(integrate)

# dynamics = Extension("gary.dynamics.*",
#                      ["gary/dynamics/*.pyx"],
#                      include_dirs=[numpy_incl_path])
# extensions.append(dynamics)

setup(
    name="gary",
    version="0.1",
    author="Adrian M. Price-Whelan",
    author_email="adrn@astro.columbia.edu",
    license="MIT",
    cmdclass={'build_ext': build_ext},
    ext_modules=cythonize(extensions),
    packages=["gary", "gary.coordinates", "gary.io",
              "gary.observation", "gary.integrate",
              "gary.dynamics", "gary.inference",
              "gary.potential"],
    scripts=['bin/plotsnap', 'bin/moviesnap', 'bin/snap2gal'],
    package_data={'gary.potential': ['*.pxd','*.c','*.h'],
                  'gary.integrate': ['*.pxd','*.c','*.h']
                  },
)

remove redundant cythoning