Skip to content

Commit 5991973

Browse files
committed
Add libtcodpy module as an alias for tcod.
1 parent 376cc56 commit 5991973

4 files changed

Lines changed: 9 additions & 1 deletion

File tree

CHANGELOG.rst

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,9 @@ v2.0.0
99

1010
Unreleased
1111
------------------
12+
Added
13+
- Added the libtcodpy module as an alias for tcod. Actual use of it is
14+
deprecated, it exists primarily for backward compatibility.
1215
Changed
1316
- Updated libtcod to v1.6.6
1417

libtcodpy.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
"""This module just an alias for tcod"""
2+
import warnings
3+
warnings.warn("`import tcod` is preferred.", DeprecationWarning, stacklevel=2)
4+
from tcod import *

setup.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -61,6 +61,7 @@ def get_package_data():
6161
open('CHANGELOG.rst', 'r').read()]),
6262
url='https://github.com/HexDecimal/python-tdl',
6363
download_url='https://pypi.python.org/pypi/tdl',
64+
py_modules=['libtcodpy'],
6465
packages=['tdl', 'tcod'],
6566
package_data={
6667
'tdl': ['*.png'],

tests/test_libtcodpy.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
except ImportError:
88
numpy = None
99

10-
import tcod as libtcodpy
10+
import libtcodpy
1111

1212
def test_console_behaviour(console):
1313
assert not console

0 commit comments

Comments
 (0)