Skip to content

Commit c7256b2

Browse files
4B796C65@gmail.com4B796C65@gmail.com
authored andcommitted
1 parent 7b745a9 commit c7256b2

File tree

2 files changed

+1
-27
lines changed

2 files changed

+1
-27
lines changed

setup.py

Lines changed: 1 addition & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -4,33 +4,8 @@
44
import subprocess
55
from distutils.core import setup
66

7-
def getVersion():
8-
"""getting the latest revision number from svn is a pain
9-
when setup.py is run this function is called and sets up the tdl/VERSION file
10-
when run from an sdist build the svn data isn't found and uses the stored version instead
11-
"""
12-
REVISION = None
13-
if os.path.exists('.svn'): # if .svn/ doesn't even exist, don't bother running svnversion
14-
svnversion = subprocess.Popen('svnversion -n', shell=True, stdout=subprocess.PIPE, stderr=subprocess.PIPE)
15-
REVISION = svnversion.communicate()[0].decode() # get stdout
16-
if not REVISION or not any([c.isdigit() for c in REVISION]):
17-
# no numbers so assume an error
18-
# but likely a real user install, so get version from file
19-
VERSION = open('tdl/VERSION', 'r').read()
20-
return VERSION
21-
# building on the svn, save version in a file for user installs
22-
if ':' in REVISION:
23-
REVISION = REVISION.split(':')[-1] # take "latest" revision, I think
24-
REVISION = ''.join((c for c in REVISION if c.isdigit())) # remove letters
25-
VERSION = '1.1r%s' % REVISION
26-
open('tdl/VERSION', 'w').write(VERSION)
27-
return VERSION
28-
29-
VERSION = getVersion()
30-
# print('TDL version is %s' % VERSION)
31-
327
setup(name='tdl',
33-
version=VERSION,
8+
version='1.1.0',
349
author='Kyle Stewart',
3510
author_email='4B796C65+pythonTDL@gmail.com',
3611
description='Simple graphical library for making a roguelike or other tile-based video game.',

tdl/VERSION

Lines changed: 0 additions & 1 deletion
This file was deleted.

0 commit comments

Comments
 (0)