from distutils.core import setup
from clusterjob import __version__


setup(name='clusterjob',
      version=__version__,
      description='Manage traditional HPC cluster workflows in Python',
      author='Michael Goerz',
      author_email='goerz@stanford.edu',
      url='https://github.com/goerz/clusterjob',
      license='GPL',
      extras_require={'dev': ['pytest', 'pytest-capturelog', 'sphinx',
                              'sphinx-autobuild', 'sphinx_rtd_theme',
                              'coverage', 'pytest-cov']},
      packages=['clusterjob', 'clusterjob.backends'],
      scripts=[],
      classifiers=[
          'Development Status :: 4 - Beta',
          'Environment :: Console',
          'Environment :: Web Environment',
          'Intended Audience :: Science/Research',
          'License :: OSI Approved :: MIT License',
          'Natural Language :: English',
          'Topic :: Scientific/Engineering',
          'Topic :: System :: Clustering',
          'Topic :: Utilities',
          'Operating System :: POSIX',
          'Programming Language :: Python :: 2.7',
          'Programming Language :: Python :: 3.3',
          'Programming Language :: Python :: 3.4'
      ]
     )

from distutils.core import setup
from clusterjob import __version__

try:
    # In Python >3.3, 'mock' is part of the standard library
    import unittest.mock
    mock_package = []
except ImportError:
    # In other versions, it has be to be installed as an exernal package
    mock_package = ['mock', ]

setup(name='clusterjob',
      version=__version__,
      description='Manage traditional HPC cluster workflows in Python',
      author='Michael Goerz',
      author_email='goerz@stanford.edu',
      url='https://github.com/goerz/clusterjob',
      license='GPL',
      extras_require={'dev': ['pytest', 'pytest-capturelog', 'sphinx',
                              'sphinx-autobuild', 'sphinx_rtd_theme',
                              'coverage', 'pytest-cov'] + mock_package},
      packages=['clusterjob', 'clusterjob.backends'],
      scripts=[],
      classifiers=[
          'Development Status :: 4 - Beta',
          'Environment :: Console',
          'Environment :: Web Environment',
          'Intended Audience :: Science/Research',
          'License :: OSI Approved :: MIT License',
          'Natural Language :: English',
          'Topic :: Scientific/Engineering',
          'Topic :: System :: Clustering',
          'Topic :: Utilities',
          'Operating System :: POSIX',
          'Programming Language :: Python :: 2.7',
          'Programming Language :: Python :: 3.3',
          'Programming Language :: Python :: 3.4'
      ]
     )

Install mock package when not in stdlib
Install mock package when not in stdlib

  from distutils.core import setup
  from clusterjob import __version__
  
+ try:
+     # In Python >3.3, 'mock' is part of the standard library
+     import unittest.mock
+     mock_package = []
+ except ImportError:
+     # In other versions, it has be to be installed as an exernal package
+     mock_package = ['mock', ]
  
  setup(name='clusterjob',
        version=__version__,
        description='Manage traditional HPC cluster workflows in Python',
        author='Michael Goerz',
        author_email='goerz@stanford.edu',
        url='https://github.com/goerz/clusterjob',
        license='GPL',
        extras_require={'dev': ['pytest', 'pytest-capturelog', 'sphinx',
                                'sphinx-autobuild', 'sphinx_rtd_theme',
-                               'coverage', 'pytest-cov']},
+                               'coverage', 'pytest-cov'] + mock_package},
        packages=['clusterjob', 'clusterjob.backends'],
        scripts=[],
        classifiers=[
            'Development Status :: 4 - Beta',
            'Environment :: Console',
            'Environment :: Web Environment',
            'Intended Audience :: Science/Research',
            'License :: OSI Approved :: MIT License',
            'Natural Language :: English',
            'Topic :: Scientific/Engineering',
            'Topic :: System :: Clustering',
            'Topic :: Utilities',
            'Operating System :: POSIX',
            'Programming Language :: Python :: 2.7',
            'Programming Language :: Python :: 3.3',
            'Programming Language :: Python :: 3.4'
        ]
       )
  
Install mock package when not in stdlib
## Code Before:
from distutils.core import setup
from clusterjob import __version__


setup(name='clusterjob',
      version=__version__,
      description='Manage traditional HPC cluster workflows in Python',
      author='Michael Goerz',
      author_email='goerz@stanford.edu',
      url='https://github.com/goerz/clusterjob',
      license='GPL',
      extras_require={'dev': ['pytest', 'pytest-capturelog', 'sphinx',
                              'sphinx-autobuild', 'sphinx_rtd_theme',
                              'coverage', 'pytest-cov']},
      packages=['clusterjob', 'clusterjob.backends'],
      scripts=[],
      classifiers=[
          'Development Status :: 4 - Beta',
          'Environment :: Console',
          'Environment :: Web Environment',
          'Intended Audience :: Science/Research',
          'License :: OSI Approved :: MIT License',
          'Natural Language :: English',
          'Topic :: Scientific/Engineering',
          'Topic :: System :: Clustering',
          'Topic :: Utilities',
          'Operating System :: POSIX',
          'Programming Language :: Python :: 2.7',
          'Programming Language :: Python :: 3.3',
          'Programming Language :: Python :: 3.4'
      ]
     )

## Instruction:
Install mock package when not in stdlib
## Code After:
from distutils.core import setup
from clusterjob import __version__

try:
    # In Python >3.3, 'mock' is part of the standard library
    import unittest.mock
    mock_package = []
except ImportError:
    # In other versions, it has be to be installed as an exernal package
    mock_package = ['mock', ]

setup(name='clusterjob',
      version=__version__,
      description='Manage traditional HPC cluster workflows in Python',
      author='Michael Goerz',
      author_email='goerz@stanford.edu',
      url='https://github.com/goerz/clusterjob',
      license='GPL',
      extras_require={'dev': ['pytest', 'pytest-capturelog', 'sphinx',
                              'sphinx-autobuild', 'sphinx_rtd_theme',
                              'coverage', 'pytest-cov'] + mock_package},
      packages=['clusterjob', 'clusterjob.backends'],
      scripts=[],
      classifiers=[
          'Development Status :: 4 - Beta',
          'Environment :: Console',
          'Environment :: Web Environment',
          'Intended Audience :: Science/Research',
          'License :: OSI Approved :: MIT License',
          'Natural Language :: English',
          'Topic :: Scientific/Engineering',
          'Topic :: System :: Clustering',
          'Topic :: Utilities',
          'Operating System :: POSIX',
          'Programming Language :: Python :: 2.7',
          'Programming Language :: Python :: 3.3',
          'Programming Language :: Python :: 3.4'
      ]
     )
