summaryrefslogtreecommitdiff
path: root/setup.py
diff options
context:
space:
mode:
authorRaphaël Barrois <raphael.barrois@polytechnique.org>2013-03-21 23:38:40 +0100
committerRaphaël Barrois <raphael.barrois@polytechnique.org>2013-03-21 23:38:49 +0100
commit6aae60fb530f7608bc379a57a477e904a816544d (patch)
tree44a68fb691b7d9aeb0a560b54438f6f7180ce02d /setup.py
parenta77278819e5f9637e8ff1954ec33ecbf753ac89a (diff)
downloadsemantic-version-6aae60fb530f7608bc379a57a477e904a816544d.tar.gz
Add Python3 support.
Diffstat (limited to 'setup.py')
-rwxr-xr-xsetup.py22
1 files changed, 17 insertions, 5 deletions
diff --git a/setup.py b/setup.py
index 58ab214..d24cdd0 100755
--- a/setup.py
+++ b/setup.py
@@ -54,15 +54,20 @@ class test(cmd.Command):
ex_path = sys.path
sys.path.insert(0, os.path.join(root_dir, 'src'))
loader = unittest.defaultTestLoader
+ suite = unittest.TestSuite()
- if self.test_suite != self.DEFAULT_TEST_SUITE:
- suite = loader.loadTestsFromName(self.test_suite)
+ if self.test_suite == self.DEFAULT_TEST_SUITE:
+ for test_module in loader.discover('.'):
+ suite.addTest(test_module)
else:
- suite = loader.discover(self.test_suite)
+ suite.addTest(loader.loadTestsFromName(self.test_suite))
- unittest.TextTestRunner(verbosity=verbosity).run(suite)
+ result = unittest.TextTestRunner(verbosity=verbosity).run(suite)
sys.path = ex_path
+ if not result.wasSuccessful():
+ sys.exit(1)
+
setup(
name="semantic_version",
@@ -77,12 +82,19 @@ setup(
package_dir={'': 'src'},
packages=['semantic_version'],
classifiers=[
- "Development Status :: 3 - Alpha",
+ "Development Status :: 5 - Production/Stable",
"Intended Audience :: Developers",
"License :: OSI Approved :: BSD License",
"Topic :: Software Development :: Libraries :: Python Modules",
'Operating System :: OS Independent',
'Programming Language :: Python',
+ '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',
+ 'Topic :: Software Development :: Libraries :: Python Modules'
],
cmdclass={'test': test},
)