diff --git a/setup.py b/setup.py index 8007cd5..a57fae6 100644 --- a/setup.py +++ b/setup.py @@ -1,29 +1,29 @@ from setuptools import setup +from nd2reader import __version__ -VERSION = "2.0.0" - -setup( - name="nd2reader", - packages=['nd2reader', 'nd2reader.model', 'nd2reader.driver', 'nd2reader.parser', 'nd2reader.common'], - install_requires=[ - 'numpy>=1.6.2, <2.0', - 'six>=1.4, <2.0', - 'xmltodict>=0.9.2, <1.0' - ], - version=VERSION, - description='A tool for reading ND2 files produced by NIS Elements', - author='Jim Rybarski', - author_email='jim@rybarski.com', - url='https://github.com/jimrybarski/nd2reader', - download_url='https://github.com/jimrybarski/nd2reader/tarball/%s' % VERSION, - keywords=['nd2', 'nikon', 'microscopy', 'NIS Elements'], - classifiers=['Development Status :: 5 - Production/Stable', - 'Intended Audience :: Science/Research', - 'License :: Freely Distributable', - 'License :: OSI Approved :: GNU General Public License v3 or later (GPLv3+)', - 'Operating System :: POSIX :: Linux', - 'Programming Language :: Python :: 2.7', - 'Programming Language :: Python :: 3.4', - 'Topic :: Scientific/Engineering', - ] -) +if __name__ == '__main__': + setup( + name='nd2reader', + packages=['nd2reader', 'nd2reader.model', 'nd2reader.driver', 'nd2reader.parser', 'nd2reader.common'], + install_requires=[ + 'numpy>=1.6.2, <2.0', + 'six>=1.4, <2.0', + 'xmltodict>=0.9.2, <1.0' + ], + version=__version__, + description='A tool for reading ND2 files produced by NIS Elements', + author='Jim Rybarski', + author_email='jim@rybarski.com', + url='https://github.com/jimrybarski/nd2reader', + download_url='https://github.com/jimrybarski/nd2reader/tarball/%s' % __version__, + keywords=['nd2', 'nikon', 'microscopy', 'NIS Elements'], + classifiers=['Development Status :: 5 - Production/Stable', + 'Intended Audience :: Science/Research', + 'License :: Freely Distributable', + 'License :: OSI Approved :: GNU General Public License v3 or later (GPLv3+)', + 'Operating System :: POSIX :: Linux', + 'Programming Language :: Python :: 2.7', + 'Programming Language :: Python :: 3.4', + 'Topic :: Scientific/Engineering', + ] + ) diff --git a/tests/version.py b/tests/version.py new file mode 100644 index 0000000..3c86cdb --- /dev/null +++ b/tests/version.py @@ -0,0 +1,8 @@ +import nd2reader +import unittest + + +class VersionTests(unittest.TestCase): + def test_versions_in_sync(self): + # just make sure the version number exists and is the type we expect + self.assertEqual(type(nd2reader.__version__), str)