from distutils.core import setup

import os
with open(os.path.join(os.path.dirname(__file__), 'VERSION.txt'), 'r') as f:
    version = f.read().rstrip()

setup(name='tellurium',
      version=version,
      description='Tellurium',
      url='https://github.com/sys-bio/tellurium',
      packages=[
          'tellurium',
          'tellurium.analysis',
          'tellurium.teio',
          'tellurium.notebooks',
          'tellurium.optimization',
          'tellurium.visualization',
          'tellurium.sedml',
      ],
      package_data={
          "tellurium" : ["*.txt"],
          "tellurium.sedml" : ["templates/*.template"],
      },
      )

from distutils.core import setup

import os
try:
    with open(os.path.join(os.path.dirname(__file__), 'VERSION.txt'), 'r') as f:
        version = f.read().rstrip()
except IOError:
    with open(os.path.join(os.path.dirname(__file__), 'tellurium/VERSION.txt'), 'r') as f:
        version = f.read().rstrip()

setup(name='tellurium',
      version=version,
      description='Tellurium',
      url='https://github.com/sys-bio/tellurium',
      packages=[
          'tellurium',
          'tellurium.analysis',
          'tellurium.teio',
          'tellurium.notebooks',
          'tellurium.optimization',
          'tellurium.visualization',
          'tellurium.sedml',
      ],
      package_data={
          "tellurium" : ["*.txt"],
          "tellurium.sedml" : ["templates/*.template"],
      },
      )

Fix #134, this fixes the VERSION.txt issue by looking in fallback location