From d2cc0a348c2d9505a19e6ee7acea1e86fb63d277 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Cristi=20V=C3=AEjdea?= Date: Sun, 23 Dec 2018 19:29:07 +0200 Subject: [PATCH] Adjust dummy version --- docs/changelog.rst | 2 +- setup.py | 8 +++++--- 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/docs/changelog.rst b/docs/changelog.rst index 04a522f..d6e161d 100644 --- a/docs/changelog.rst +++ b/docs/changelog.rst @@ -34,7 +34,7 @@ install the build requirements yourself (just ```setuptools`` and ``setuptools-s Additionally, for correct package version detection, a full git checkout is required when building (this was always the case). Building without ``.git`` or without ``setuptools-scm`` will result in a distribution with a version like -``drf-yasg-0.0.0rc0+noscm00000167d19bd859``. +``drf-yasg-1!0.0.0.dev0+noscm.00000167d19bd859``. ********** **1.11.1** diff --git a/setup.py b/setup.py index 589a500..6742edd 100755 --- a/setup.py +++ b/setup.py @@ -77,13 +77,15 @@ except (ImportError, LookupError) as e: err_msg = str(e) if 'setuptools-scm' in err_msg or 'setuptools_scm' in err_msg: import time + import traceback timestamp_ms = int(time.time() * 1000) timestamp_str = hex(timestamp_ms)[2:].zfill(16) - dummy_version = '0.0.0rc0+noscm' + timestamp_str + dummy_version = '1!0.0.0.dev0+noscm.' + timestamp_str drf_yasg_setup(version=dummy_version) - print(str(e), file=sys.stderr) - print("failed to detect version, build was done using dummy version " + dummy_version, file=sys.stderr) + + traceback.print_exc(file=sys.stderr) + print("failed to detect version, package was built with dummy version " + dummy_version, file=sys.stderr) else: raise