Skip to content

Commit

Permalink
Complain when the version could not be determined instead of building…
Browse files Browse the repository at this point in the history
… with 0+unknown.
  • Loading branch information
abergeron committed Sep 27, 2017
1 parent ff234cf commit 70a2d12
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions setup.py
Expand Up @@ -138,11 +138,16 @@ def run(self):
define_macros=[('GPUARRAY_SHARED', None)]
)]

cmds=versioneer.get_cmdclass()
cmds = versioneer.get_cmdclass()
cmds["clean"] = cmd_clean

version_data = versioneer.get_versions()

if version_data['error'] is not None:
raise ValueError("Can't determine version for build: %s\n Please make sure that your git checkout includes tags." % (version_data['error'],))

setup(name='pygpu',
version=versioneer.get_version(),
version=version_data['version'],
cmdclass=cmds,
description='numpy-like wrapper on libgpuarray for GPU computations',
packages=['pygpu', 'pygpu/tests'],
Expand Down

0 comments on commit 70a2d12

Please sign in to comment.