from setuptools import setup
from setuptools import setup, find_packages

exec (open('plotly/version.py').read())


def readme():
    with open('README.rst') as f:
        return f.read()


setup(name='plotly',
      version=__version__,
      use_2to3=False,
      author='Chris P',
      author_email='chris@plot.ly',
      maintainer='Chris P',
      maintainer_email='chris@plot.ly',
      url='https://plot.ly/api/python',
      description="Python plotting library for collaborative, "
                  "interactive, publication-quality graphs.",
      long_description=readme(),
      classifiers=[
          'Development Status :: 4 - Beta',
          'Programming Language :: Python :: 2',
          'Programming Language :: Python :: 2.6',
          'Programming Language :: Python :: 2.7',
          'Programming Language :: Python :: 3',
          'Programming Language :: Python :: 3.2',
          'Programming Language :: Python :: 3.3',
          'Programming Language :: Python :: 3.4',
          'Topic :: Scientific/Engineering :: Visualization',
      ],
      license='MIT',
      packages=find_packages(),
      package_data={'plotly': ['graph_reference/*.json', 'widgets/*.js']},
      install_requires=['requests', 'six', 'pytz'],
      extras_require={"PY2.6": ['simplejson', 'ordereddict',
                                'requests[security]']},
      zip_safe=False)

@@ -107,16 +107,58 @@
 read())%0A
+exec (open('plotly/resources.py').read())%0A
 %0A%0Adef re
@@ -1159,24 +1159,137 @@
 packages(),%0A
+      data_files=%5B(GRAPH_REFERENCE_DIR, GRAPH_REFERENCE_FILES),%0A                  (WIDGETS_DIR, WIDGETS_FILES)%5D,%0A
       packag

Use resources file in setup.py.