Skip to content

Instantly share code, notes, and snippets.

@Tblue Tblue/setup.py
Created Jan 8, 2016

Embed
What would you like to do?
setuptools_scm: Include not only the date, but also the time in the "local" part of the version.
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
You can’t perform that action at this time.