summaryrefslogtreecommitdiff
path: root/setup.py
diff options
context:
space:
mode:
authorBernat Gabor <gaborjbernat@gmail.com>2018-09-12 18:15:16 +0100
committerBernát Gábor <gaborjbernat@gmail.com>2018-09-12 23:26:53 +0100
commite7286927722a9cc3f65cc2de2decdb7870c0ced1 (patch)
treed55386a0478fa6e1c50b9c73fa7b18c506b9c1f3 /setup.py
parent32795265f7b4c75f766b183928c8e0df2582eca9 (diff)
downloadtox-git-e7286927722a9cc3f65cc2de2decdb7870c0ced1.tar.gz
use setuptools-scm at build time, instead of install time
Diffstat (limited to 'setup.py')
-rw-r--r--setup.py17
1 files changed, 15 insertions, 2 deletions
diff --git a/setup.py b/setup.py
index 471ce265..2cf3f3c6 100644
--- a/setup.py
+++ b/setup.py
@@ -1,6 +1,7 @@
import io
import re
import sys
+import textwrap
import setuptools
@@ -48,7 +49,17 @@ def main():
description="virtualenv-based automation of test activities",
long_description=get_long_description(),
url="https://tox.readthedocs.org/",
- use_scm_version=True,
+ use_scm_version={
+ "write_to": "src/tox/version.py",
+ "write_to_template": textwrap.dedent(
+ """
+ # coding: utf-8
+ from __future__ import unicode_literals
+
+ __version__ = {version!r}
+ """
+ ).lstrip(),
+ },
license="http://opensource.org/licenses/MIT",
platforms=["unix", "linux", "osx", "cygwin", "win32"],
author="holger krekel",
@@ -59,7 +70,9 @@ def main():
"console_scripts": ["tox=tox:cmdline", "tox-quickstart=tox._quickstart:main"]
},
python_requires=">=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*",
- setup_requires=["setuptools_scm"],
+ setup_requires=[
+ "setuptools-scm"
+ ], # needed for https://github.com/pypa/readme_renderer/issues/118
install_requires=[
"setuptools >= 30.0.0",
"pluggy >= 0.3.0, <1",