File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 6060# |version| and |release|, also used in various other places throughout the
6161# built documents.
6262#
63- # The short X.Y version.
64- from tcod import __version__
65- version = '.' .join (__version__ )
6663# The full version, including alpha/beta/rc tags.
67- with open ('../tcod/version.txt' , 'r' ) as f :
68- release = f .read ()
64+ from tcod import __version__ as release
65+ # The short X.Y version.
66+ import re
67+ version = re .match (r'([0-9]+\.[0-9]+).*?' , release ).group ()
6968
7069# The language for content autogenerated by Sphinx. Refer to documentation
7170# for a list of supported languages.
Original file line number Diff line number Diff line change 88
99from setuptools import setup , Command
1010
11- with open ('tcod/version.txt' , 'r' ) as f :
12- version = f .read ()
11+ exec (open ('tcod/version.py' ).read ()) # get __version__
1312
1413def get_package_data ():
1514 '''get data files which will be included in the main tcod/ directory'''
1615 BITSIZE , LINKAGE = platform .architecture ()
17- files = ['version.txt' ,
16+ files = [
1817 'lib/LIBTCOD-CREDITS.txt' ,
1918 'lib/LIBTCOD-LICENSE.txt' ,
2019 'lib/README-SDL.txt' ]
@@ -32,7 +31,7 @@ def get_package_data():
3231
3332setup (
3433 name = 'libtcod-cffi' ,
35- version = version ,
34+ version = __version__ ,
3635 author = 'Kyle Stewart' ,
3736 author_email = '4B796C65+tcod@gmail.com' ,
3837 description = 'A Python cffi port of libtcod.' ,
Original file line number Diff line number Diff line change 1717"""
1818from __future__ import absolute_import as _
1919
20- import os as _os
21-
22- import re as _re
23-
2420from tcod .libtcodpy import *
2521from tcod .tcod import *
2622from tcod import path
27-
28- with open (_os .path .join (__path__ [0 ], 'version.txt' ), 'r' ) as _f :
29- # exclude the git commit number (PEP 396)
30- __version__ = _re .match (r'([0-9]+)\.([0-9]+).*?' , _f .read ()).groups ()
31- assert __version__ , 'version.txt parse error'
23+ from tcod .version import __version__
Original file line number Diff line number Diff line change 1+ __version__ = '2.0a5'
Load Diff This file was deleted.
You can’t perform that action at this time.
0 commit comments