generate 'version.py' file with plain version string instead of using pkg_resources to read version from package metadata
See https://github.com/fonttools/fonttools/issues/697#issuecomment-252621005
This commit is contained in:
parent
c719da5bca
commit
6b152f57ae
@ -1,4 +0,0 @@
|
|||||||
try:
|
|
||||||
__version__ = __import__('pkg_resources').require('fontTools')[0].version
|
|
||||||
except Exception:
|
|
||||||
__version__ = 'unknown'
|
|
11
setup.py
11
setup.py
@ -42,9 +42,18 @@ fonts. The package also contains a tool called "TTX" which converts
|
|||||||
TrueType/OpenType fonts to and from an XML-based format.
|
TrueType/OpenType fonts to and from an XML-based format.
|
||||||
"""
|
"""
|
||||||
|
|
||||||
|
version_template = """\
|
||||||
|
# file generated by setuptools_scm
|
||||||
|
# don't change, don't track in version control
|
||||||
|
__version__ = {version!r}
|
||||||
|
"""
|
||||||
|
|
||||||
setup(
|
setup(
|
||||||
name="fonttools",
|
name="fonttools",
|
||||||
use_scm_version=True,
|
use_scm_version={
|
||||||
|
"write_to": "Lib/fontTools/version.py",
|
||||||
|
"write_to_template": version_template,
|
||||||
|
},
|
||||||
description="Tools to manipulate font files",
|
description="Tools to manipulate font files",
|
||||||
author="Just van Rossum",
|
author="Just van Rossum",
|
||||||
author_email="just@letterror.com",
|
author_email="just@letterror.com",
|
||||||
|
Loading…
x
Reference in New Issue
Block a user