Created
January 8, 2016 07:25
-
-
Save Tblue/8e86177d8c89cf2754f3 to your computer and use it in GitHub Desktop.
setuptools_scm: Include not only the date, but also the time in the "local" part of the version.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from setuptools import setup | |
setup( | |
# ... | |
use_scm_version={ | |
# Include not only the date, but also the time in the "local" part of the version. | |
# Based on: https://git.io/vuPTX | |
"local_scheme": lambda version: \ | |
version.format_choice("", "+d{time:%Y%m%d.h%H%M%S}") if version.exact else \ | |
version.format_choice("+n{node}", "+n{node}.d{time:%Y%m%d.h%H%M%S}") | |
}, | |
setup_requires=[ | |
"setuptools_scm", | |
], | |
# ... | |
) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment