Skip to content

Commit 875ce3f

Browse files
authored
DOCD-1186 - setuptools_scm works in py3, setuptools_git doesn't (#11)
1 parent 52d6283 commit 875ce3f

File tree

2 files changed

+2
-16
lines changed

2 files changed

+2
-16
lines changed

setup.cfg

-3
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,3 @@
1-
[egg_info]
2-
tag_build=-SNAPSHOT
3-
41
[aliases]
52
test=pytest
63

setup.py

+2-13
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,6 @@
11
#!/usr/bin/env python
22
# -*- coding: utf-8
33

4-
import subprocess
5-
64
import os
75
from setuptools import setup, find_packages
86

@@ -28,15 +26,6 @@
2826
]
2927

3028

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-
4029
def _generate_description():
4130
description = [_read("README.md")]
4231
changelog_file = os.getenv("CHANGELOG_FILE")
@@ -55,14 +44,14 @@ def main():
5544
name="k8s",
5645
author="FINN Team Infrastructure",
5746
author_email="[email protected]",
58-
use_vcs_version=_has_tags(),
47+
use_scm_version=True,
5948
packages=find_packages(exclude=("tests",)),
6049
zip_safe=True,
6150
include_package_data=True,
6251

6352
# Requirements
6453
install_requires=GENERIC_REQ,
65-
setup_requires=['pytest-runner', 'wheel', 'setuptools_git >= 1.2'],
54+
setup_requires=['pytest-runner', 'wheel', 'setuptools_scm'],
6655
extras_require={
6756
"dev": TESTS_REQ + CODE_QUALITY_REQ,
6857
"codacy": ["codacy-coverage"],

0 commit comments

Comments
 (0)