#!/usr/bin/env python

import sys
from distutils.core import setup

setup_args = {}

required = {'param':">=1.3.1",
            'numpy':">=1.0",
            'matplotlib':">=1.3"}

packages_to_install = [required]
packages_to_state = [required]


if 'setuptools' in sys.modules:
    # support easy_install without depending on setuptools
    install_requires = []
    for package_list in packages_to_install:
        install_requires+=["%s%s"%(package,version) for package,version in package_list.items()]
    setup_args['install_requires']=install_requires
    setup_args['dependency_links']=["http://pypi.python.org/simple/"]
    setup_args['zip_safe'] = False

for package_list in packages_to_state:
    requires = []
    requires+=["%s (%s)"%(package,version) for package,version in package_list.items()]
    setup_args['requires']=requires


setup_args.update(dict(
    name='holoviews',
    version="1.0",
    description='Composable, declarative data structures for building complex visualizations easily.',
    long_description=open('README.rst').read(),
    author= "Jean-Luc Stevens and Philipp Rudiger",
    author_email= "developers@topographica.org",
    maintainer= "IOAM",
    maintainer_email= "developers@topographica.org",
    platforms=['Windows', 'Mac OS X', 'Linux'],
    license='BSD',
    url='http://ioam.github.com/holoviews/',
    packages = ["holoviews",
                "holoviews.core",
                "holoviews.element",
                "holoviews.interface",
                "holoviews.ipython",
                "holoviews.operation",
                "holoviews.plotting"],
    package_data={'holoviews.plotting': ['*.mplstyle'],
                  'holoviews.ipython': ['*.jinja']},
    classifiers = [
        "License :: OSI Approved :: BSD License",
        "Development Status :: 5 - Production/Stable",
        "Programming Language :: Python :: 2.7",
        "Programming Language :: Python :: 3.3",
        "Programming Language :: Python :: 3.4",
        "Operating System :: OS Independent",
        "Intended Audience :: Science/Research",
        "Intended Audience :: Developers",
        "Natural Language :: English",
        "Topic :: Scientific/Engineering",
        "Topic :: Software Development :: Libraries"]
))


if __name__=="__main__":

    if 'upload' in sys.argv:
        import holoviews
        holoviews.__version__.verify(setup_args['version'])

    setup(**setup_args)

@@ -26,16 +26,20 @@
 port sys
+, os
 %0Afrom di
@@ -905,16 +905,18 @@
 ion=%221.0
+.0
 %22,%0A    d
@@ -1059,16 +1059,74 @@
 ).read()
+ if os.path.isfile('README.rst') else 'Consult README.rst'
 ,%0A    au
@@ -2323,16 +2323,460 @@
 %22%5D%0A))%0A%0A%0A
+def check_pseudo_package(path):%0A    %22%22%22%0A    Verifies that a fake subpackage path for assets (notebooks, svgs,%0A    pngs etc) both exists and is populated with files.%0A    %22%22%22%0A    if not os.path.isdir(path):%0A        raise Exception(%22Please make sure pseudo-package %25s exists.%22 %25 path)%0A    else:%0A        assets = os.listdir(path)%0A        if len(assets) == 0:%0A            raise Exception(%22Please make sure pseudo-package %25s is populated.%22 %25 path)%0A%0A%0A
 if __nam
@@ -2800,16 +2800,17 @@
 %0A    if 
+(
 'upload'
@@ -2821,17 +2821,506 @@
 sys.argv
-:
+) or ('sdist' in sys.argv):%0A        # Make sure to create these directories and populate them before upload%0A        setup_args%5B'packages'%5D += %5B%22holoviews.assets%22, 'holoviews.notebooks'%5D%0A%0A        setup_args%5B'package_data'%5D%5B'holoviews.assets'%5D = %5B'*.png', '*.rst'%5D%0A        setup_args%5B'package_data'%5D%5B'holoviews.notebooks'%5D = %5B'*.ipynb', '*.npy'%5D%0A%0A        check_pseudo_package(os.path.join('.', 'holoviews', 'assets'))%0A        check_pseudo_package(os.path.join('.', 'holoviews', 'notebooks'))%0A
 %0A       

Version 1.0.0: First major release of HoloViews