11#!/usr/bin/env python2
22
3- import subprocess
4-
53try :
64 # use setuptools or distribute if available
75 from setuptools import setup
86except ImportError :
97 from distutils .core import setup
108
11- base_version = '1.1.6' # base version
12- def get_version ():
13- """Probably a much more elegant way to do this.
14-
15- Update tdl/VERSION.txt with the current svn version, then return the result"""
16- try :
17- revision = subprocess .check_output ('svnversion' , universal_newlines = True )[:- 1 ]
18- except :
19- revision = None
9+ from tdl import __version__
2010
21- if revision :
22- if ':' in revision :
23- revision = revision .split (':' )[- 1 ]
24- if 'M' in revision :
25- revision = str (int (revision [:- 1 ]) + 1 )
26- file = open ('tdl/VERSION.txt' , 'w' )
27- file .write (base_version + 'r' + revision )
28- file .close ()
29- print ('revision %s' % revision )
30-
31- file = open ('tdl/VERSION.txt' , 'r' )
32- version = file .read ()
33- file .close ()
34- return version
35-
3611setup (name = 'tdl' ,
37- version = get_version () ,
12+ version = __version__ ,
3813 author = 'Kyle Stewart' ,
3914 author_email = '4B796C65+pythonTDL@gmail.com' ,
4015 description = 'Pythonic port of rogue-like library libtcod.' ,
4116 long_description = open ('README.txt' , 'r' ).read () + open ('CHANGELOG.txt' , 'r' ).read (),
42- url = 'http ://code.google. com/p /python-tdl/ ' ,
17+ url = 'https ://github. com/HexDecimal /python-tdl' ,
4318 download_url = 'https://pypi.python.org/pypi/tdl' ,
4419 packages = ['tdl' ],
4520 package_data = {'tdl' : ['*.txt' , 'lib/*.txt' , '*.bmp' , '*.png' , 'lib/win32/*' ,
@@ -62,6 +37,7 @@ def get_version():
6237 'Programming Language :: Python :: 3.1' ,
6338 'Programming Language :: Python :: 3.2' ,
6439 'Programming Language :: Python :: 3.3' ,
40+ 'Programming Language :: Python :: 3.4' ,
6541 'Programming Language :: Python :: Implementation :: CPython' ,
6642 'Programming Language :: Python :: Implementation :: PyPy' ,
6743 'Topic :: Games/Entertainment' ,
0 commit comments