1
1
#!/usr/bin/env python
2
2
# -*- coding: utf-8
3
3
4
- import subprocess
5
-
6
4
import os
7
5
from setuptools import setup , find_packages
8
6
28
26
]
29
27
30
28
31
- def _has_tags ():
32
- """setuptools_git will crash if you ask it to use vcs version without any tags in the repo"""
33
- try :
34
- subprocess .check_output (["git" , "describe" ], stderr = subprocess .STDOUT )
35
- except subprocess .CalledProcessError :
36
- return False
37
- return True
38
-
39
-
40
29
def _generate_description ():
41
30
description = [_read ("README.md" )]
42
31
changelog_file = os .getenv ("CHANGELOG_FILE" )
@@ -55,14 +44,14 @@ def main():
55
44
name = "k8s" ,
56
45
author = "FINN Team Infrastructure" ,
57
46
58
- use_vcs_version = _has_tags () ,
47
+ use_scm_version = True ,
59
48
packages = find_packages (exclude = ("tests" ,)),
60
49
zip_safe = True ,
61
50
include_package_data = True ,
62
51
63
52
# Requirements
64
53
install_requires = GENERIC_REQ ,
65
- setup_requires = ['pytest-runner' , 'wheel' , 'setuptools_git >= 1.2 ' ],
54
+ setup_requires = ['pytest-runner' , 'wheel' , 'setuptools_scm ' ],
66
55
extras_require = {
67
56
"dev" : TESTS_REQ + CODE_QUALITY_REQ ,
68
57
"codacy" : ["codacy-coverage" ],
0 commit comments