Skip to content
This repository has been archived by the owner on Nov 18, 2024. It is now read-only.

Commit

Permalink
BF(workaround): do not query versioneer for version if it fails to im…
Browse files Browse the repository at this point in the history
…port

Unfortunately I did not find a better solution for a still open
   python-versioneer/python-versioneer#192
so we might just reconsider (not) using versioneer altogether in the future
  • Loading branch information
yarikoptic committed Oct 7, 2019
1 parent a7b179f commit dd49a40
Showing 1 changed file with 11 additions and 3 deletions.
14 changes: 11 additions & 3 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,16 @@
import sys

from setuptools import setup
import versioneer
try:
import versioneer
setup_kw = {
'version': versioneer.get_version(),
'cmdclass': versioneer.get_cmdclass()
}
except ImportError:
# see https://github.com/warner/python-versioneer/issues/192
print("WARNING: failed to import versioneer, falling back to no version for now")
setup_kw = {}

# Give setuptools a hint to complain if it's too old a version
# 30.3.0 allows us to put most metadata in setup.cfg
Expand All @@ -24,5 +33,4 @@
if __name__ == "__main__":
setup(name='dandi',
setup_requires=SETUP_REQUIRES,
version=versioneer.get_version(),
cmdclass=versioneer.get_cmdclass())
**setup_kw)

0 comments on commit dd49a40

Please sign in to comment.