summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJonah BrĂ¼chert <jbb@kaidan.im>2024-04-16 18:12:48 +0200
committerJonah BrĂ¼chert <jbb@kaidan.im>2024-04-16 18:41:52 +0200
commit18425d3ee02f75f5275b394205abcb5a4ce995bf (patch)
treeb3d54df265605e8b77fbad3252a52d3ae22187ad
parentb604a66731ec21a33bd28ad92114c1c4a8b6755c (diff)
downloadtools-18425d3ee02f75f5275b394205abcb5a4ce995bf.tar.gz
tools-18425d3ee02f75f5275b394205abcb5a4ce995bf.tar.bz2
tools-18425d3ee02f75f5275b394205abcb5a4ce995bf.zip
Just hardcode version number
-rwxr-xr-xsetup.py6
-rw-r--r--version.py41
2 files changed, 2 insertions, 45 deletions
diff --git a/setup.py b/setup.py
index 44f74a8..be96542 100755
--- a/setup.py
+++ b/setup.py
@@ -1,14 +1,12 @@
#!/usr/bin/env python
from distutils.core import setup
-from version import *
setup(name='hostinfo-tools',
- version=get_git_version(),
+ version="0.2.3",
description='Hostinfo database interface scripts',
author='Alexander Sulfrian',
author_email='alex@spline.inf.fu-berlin.de',
url='http://git.spline.inf.fu-berlin.de/hostinfo-tools/',
packages=['hostinfo'],
- scripts=['bin/hostinfo'],
- )
+ scripts=['bin/hostinfo'])
diff --git a/version.py b/version.py
deleted file mode 100644
index 583ed0d..0000000
--- a/version.py
+++ /dev/null
@@ -1,41 +0,0 @@
-# -*- coding: utf-8 -*-
-# To use this script, simply import it your setup.py file, and use the
-# results of get_git_version() as your package version:
-#
-# from version import *
-#
-# setup(
-# version=get_git_version(),
-# .
-# .
-# .
-# )
-
-__all__ = ["get_git_version"]
-
-import os
-import re
-from subprocess import Popen, PIPE
-
-OWN_DIR = os.path.dirname(os.path.abspath(os.path.realpath(__file__)))
-
-def call_git_describe(abbrev=4):
- try:
- p = Popen(['git', 'describe', '--abbrev=%d' % abbrev, '--tags'],
- cwd=OWN_DIR, stdout=PIPE, stderr=PIPE)
- p.stderr.close()
- line = p.stdout.readlines()[0]
- return line.strip()
-
- except:
- return None
-
-def get_git_version(abbrev=4):
- version = call_git_describe(abbrev)
- if version is None:
- raise ValueError("Cannot find the version number!")
-
- return re.sub('^debian/', '', version)
-
-if __name__ == "__main__":
- print(get_git_version())