A Python cffi port of libtcod-1.5.1
Project description
About
This is a Python CFFI port of libtcod, this is an offshoot of the python-tdl project and has been made into it’s own package. Both projects are still developed together, and this module provides functions specifically to be used by python-tdl.
This library is hosted on GitHub: https://github.com/HexDecimal/libtcod-cffi
Any issues you have with this module can be reported at the GitHub issue tracker: https://github.com/HexDecimal/libtcod-cffi/issues
python-tdl is a port of libtcod made to be “Pythonic”, you can find it here: https://github.com/HexDecimal/python-tdl
And libtcod is here: http://roguecentral.org/doryen/libtcod/
Installation (Windows, Mac OS X)
The recommended way to install is by using pip, make sure pip is up-to-date, otherwise it won’t find the wheel and will attempt to build from source.
With Python installed, run the following commands to install libtcod-cffi:
python -m pip install --upgrade pip python -m pip install libtcod-cffi
Installation (Linux)
There are no libtcod-cffi wheels for Linux, you can still use pip to install libtcod-cffi but will need to have the proper build enviroment set up first.
Install the needed dev packages, update the cffi module, then install via pip. Assuming you are using a debian like distribution you can use the following commands to do this:
apt-get install libsdl1.2 libsdl1.2-dev libffi-dev python-dev mesa-common-dev python -m pip install --upgrade cffi<2 cffi>=1.1 python -m pip install libtcod-cffi
The Python cffi module must be 1.1 or later, otherwise you will recieve the following error: “ImportError: No module named ‘cffi.setuptools_ext’”
Usage
This module was designed to be backwards compatible with the libtcod.py script that was distributed with libtcod. If you had code that runs on the original module you can use this library as a drop-in replacement like this:
import tcod as libtcod
Guides and Tutorials for the original library should also work with this one. When possible, using PyPy will give the best performance, and is highly recommended.
Requirements
Python 2.7+, Python 3.3+, or PyPy
Windows, Linux, or Mac OS X
Running on Linux requires the following packages: libsdl1.2
Installing on Linux or form source will require the following packages: python-cffi 1.1+
An up-to-date version of python-cffi: https://pypi.python.org/pypi/cffi
Linux will require the package libsdl1.2 to run, and the packages libsdl1.2-dev, libffi-dev, python-dev, and mesa-common-dev to install
License
libtcod-cffi is distributed under the Simplified 2-clause FreeBSD license. Read LICENSE.txt, and the tcod/lib/README’s for more details.
Changelog
- 0.2.11
SDL is now bundled correctly in all Python wheels
- 0.2.10
now using GitHub integrations, gaps in platform support have been filled, there should now be wheels for Mac OSX and 64-bit Python on Windows
the building process was simplified from a linking standpoint, most libraries are now statically linked
parser module is broken again
- 0.2.9
Fixed crashes in list and parser modules
- 0.2.8
Fixed off by one error in fov buffer
- 0.2.7
Re-factored some code to reduce compiler warnings
Instructions on how to solve pip/cffi issues added to the readme
Official support for Python 3.5
- 0.2.6
Added requirements.txt to fix a common pip/cffi issue.
Provided SDL headers are now for Windows only.
- 0.2.5
Added /usr/include/SDL to include path
- 0.2.4
Compiler will now use distribution specific SDL header files before falling back on the included header files.
- 0.2.3
better Color performance
parser now works when using a custom listener class
SDL renderer callback now receives a accessible SDL_Surface cdata object.
- 0.2.2
This module can now compile and link properly on Linux
- 0.2.1
console_check_for_keypress and console_wait_for_keypress will work now
console_fill_foreground was fixed
console_init_root can now accept a regular string on Python 3
- 0.2.0
The library is now backwards compatible with the original libtcod.py module. Everything except libtcod’s cfg parser is supported.
- 0.1.0
First version released
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distributions
Hashes for libtcod_cffi-0.2.10-py3.5-win-amd64.egg
Algorithm | Hash digest | |
---|---|---|
SHA256 | 5890feecb7a6ac8792fffc02b462b134a5b0410022d3a59810700720e74580f0 |
|
MD5 | 35f5eb1350440dd1404d9c4c825b3542 |
|
BLAKE2b-256 | ca9e9847242371fe117f042696d5f868f01c5e461a8f7058cf06efed7f999a98 |
Hashes for libtcod_cffi-0.2.10-py3.5-win32.egg
Algorithm | Hash digest | |
---|---|---|
SHA256 | 196be166f70c19e1ccfffab5390064dd1bf589ae9b87b34647dae0c6d7aa85d6 |
|
MD5 | df0633270d5870963eb7369f9d97cd28 |
|
BLAKE2b-256 | 84460a96329568f0ecffebc276bd12051418fdf76cf45d34b135758a6d603008 |
Hashes for libtcod_cffi-0.2.10-py3.4-win-amd64.egg
Algorithm | Hash digest | |
---|---|---|
SHA256 | 7065791dee7178475579be81c73332f39e49f4cc304abddb22ccbe0db2de7ff8 |
|
MD5 | 446691416fbd43ec8a9cd051daf6ef38 |
|
BLAKE2b-256 | 08f474d388fdb667154cd9abac0aa4c790808391e53a5bb56e401552ded55e67 |
Hashes for libtcod_cffi-0.2.10-py3.4-win32.egg
Algorithm | Hash digest | |
---|---|---|
SHA256 | 406819c8d9e5cad354330d366f23088afb5e46faff6b1773706a21501a8ddac0 |
|
MD5 | 8b7d4d3d4038d94e86ebe3404bd94825 |
|
BLAKE2b-256 | 05afa34e130aa21289b44cfa0279158f50a9d9ba4ee0ff7b5d1586462f0149c5 |
Hashes for libtcod_cffi-0.2.10-py3.3-win-amd64.egg
Algorithm | Hash digest | |
---|---|---|
SHA256 | 07240438b016e4af1ff3305e306e92610ebedb386222569a5540521eae2fe98f |
|
MD5 | 77578b8a6c07e59ff4d08ed0709aad8b |
|
BLAKE2b-256 | 5b50e6cba6ef8a396ca8bde5ab882a22c7c5ec689201bb57236fbdf474a60384 |
Hashes for libtcod_cffi-0.2.10-py3.3-win32.egg
Algorithm | Hash digest | |
---|---|---|
SHA256 | 57cc1bd62d91b5689219344382bde9c925c742e3bdc04b2abec0a2abc42a509b |
|
MD5 | 139f39fe9957bf90728a0ff2cdcb045e |
|
BLAKE2b-256 | e8e9f42dfb58918fa3a99af189c2acec00b08dfebbc7f019169bdb9e80659eba |
Hashes for libtcod_cffi-0.2.10-py2.7-win-amd64.egg
Algorithm | Hash digest | |
---|---|---|
SHA256 | 1eea91c31a63e16f7e3ee7913b0dfb75a3c8e38055f05efee1174061dea17a04 |
|
MD5 | 55fbd485f15e8d993abe8800cd8e515f |
|
BLAKE2b-256 | e4f36b6d9a3037103b784ea37d75aee023bcc01b084b3b380cacdac063a9a079 |
Hashes for libtcod_cffi-0.2.10-py2.7-win32.egg
Algorithm | Hash digest | |
---|---|---|
SHA256 | 120e64f82b705adc38151e696652641a03af33f4e5d31a466bcfb6e390a70c79 |
|
MD5 | 6a97621213caeb6d9e44529ac7ba2b65 |
|
BLAKE2b-256 | 08616a6a5e9234912921591c2f6b595ea49c0f0b2b8a3efa448db8ba0d31c011 |
Hashes for libtcod_cffi-0.2.10-pp254-pypy_41-win32.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 541e01363bd5611d5047928274dd92ca336fef04efa9ff8e4c1a4dcd0d3076d8 |
|
MD5 | f0436661dfa94961f078d50298abab39 |
|
BLAKE2b-256 | 41a8c5fac7ad6a0cfafe20d4b6a5f5a0d7901368fe6c1aa5705f60c15a0b8aba |
Hashes for libtcod_cffi-0.2.10-pp253-pypy_41-win32.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 8a7343902e98fd84a3ef7a4cb8a9dd5a51676be9f93d95d1fca78eae21981674 |
|
MD5 | f06f68bcfac44e24a7871444cdb7871a |
|
BLAKE2b-256 | 98f1bedd6747d756ba60e679080d7936b0824ec8da5117946c6a526b04773ed8 |
Hashes for libtcod_cffi-0.2.10-pp251-pypy_41-win32.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | d23c25c71876e8b060573cf77f2edcacebd0007ab2c7e9b1d3b5b278f9ed898b |
|
MD5 | fc0333a8bbb1538368e767806e0f0538 |
|
BLAKE2b-256 | 33537d718cb2106bd43c8c16780f2ef3920341fab901f59e9b12ad99544f2993 |
Hashes for libtcod_cffi-0.2.10-pp250-pypy_41-win32.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 0c7005d33a557c1cff412083aa9620c79117ccc7f6a641b1736f60a88761bb27 |
|
MD5 | 5ec2116a048a1ec914752c3d4ccaf11d |
|
BLAKE2b-256 | e126d77a90248a7cad3face1eddb5554b6ce83882196dbd21cc3306508d7dcb0 |
Hashes for libtcod_cffi-0.2.10-pp240-pp240-win32.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | c380b85f526aeafe1424e7a0804b05668c07cfdb49152a405cd265ba0e29a1cd |
|
MD5 | 763e00fe4a8fd97e3f315f3ca0e21b71 |
|
BLAKE2b-256 | 4e1d9b6d7da20ed557530b9bc372cf1eb75f53167fa101936582943a3b86cd81 |
Hashes for libtcod_cffi-0.2.10-pp226-pp226-win32.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 87c94c8120329a5697251a110744dcd45808cab30b4088213064093f3891ffcf |
|
MD5 | 806df53694d6251b3ea767a1bb3ba21c |
|
BLAKE2b-256 | 29f2a51c1b4862a364e6fc9db195c8545c04bc3ad057fb4d1b429907679d5eda |
Hashes for libtcod_cffi-0.2.10-cp35-cp35m-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | bec1d384bbe022a820a58381d21cf58da22fc39126958238788e2ca6118e3099 |
|
MD5 | 2e0be312753d277e3dffccb6282762a0 |
|
BLAKE2b-256 | b471b4c8271ff1ab2b28d199230bb03c75bd098e777f05aa3f80b8826eb7e704 |
Hashes for libtcod_cffi-0.2.10-cp35-cp35m-win32.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 48b9384c4793dc15291470478d73ac0dffd1c70e4e075e522245792bb3003091 |
|
MD5 | 72b844a9700fdeed40ccc5652844f909 |
|
BLAKE2b-256 | 510079f26c06f88460524b58b769d2db65b24f1c02da7e62a407f5721918366b |
Hashes for libtcod_cffi-0.2.10-cp34-cp34m-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | f792001910bf422382473e04072495f4fc5061ac4776bb66964bff9d0928d251 |
|
MD5 | 2142d7df29a87e25fcab3011fcfa7e1d |
|
BLAKE2b-256 | 171a55f3acb23860ba405d3b8c0c93e0fbbd11297e9d2d91db6dcd6bd491ae00 |
Hashes for libtcod_cffi-0.2.10-cp34-cp34m-win32.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 124052109147e385e099e42964eda4231dacdd9cf9a25c4ac3524da24382543d |
|
MD5 | 95b71eb7e878a2ceacb2f5566c03db96 |
|
BLAKE2b-256 | d976adf1f6a62c467f668940a7d67ef3eed36fbfcb7b12c0b25a6b583468fd60 |
Hashes for libtcod_cffi-0.2.10-cp34-cp34m-macosx_10_9_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 1e52285bbbd8dc54e6cfdd2a43a8747880c8a02e82508eb5d01f32b53d13eac0 |
|
MD5 | bda84804e189e7506209f9d98bf24b3c |
|
BLAKE2b-256 | 27ad01bc984789bd23be1d40f1fd7ac6eb119801a1ced128e47755264738702e |
Hashes for libtcod_cffi-0.2.10-cp33-cp33m-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 8c08376f3ce962b2a87d6447ca1169b378b2e2561c26dfa93327875236b5afc6 |
|
MD5 | 0f55cdd871c8041cabd871cdc7bb69af |
|
BLAKE2b-256 | e0d343b382c9890e70d4e08c426d070daff5d4741d350b4d284790cecbdcd908 |
Hashes for libtcod_cffi-0.2.10-cp33-cp33m-win32.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 10900a952c86a6fbe6029521e5dfecf8ea800e125bc51e9bc7b54042489c1e0a |
|
MD5 | 26a150f77f82437847a2055ba5e636d0 |
|
BLAKE2b-256 | 01539a786c3ab72dd13a272852d8599bb646341d06d50ef13152920f5c99b69d |
Hashes for libtcod_cffi-0.2.10-cp27-cp27m-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | dd25be6ee72d0b625b234ccdc8b1b30937a961f1b8b3ba6130e50bc9b659a489 |
|
MD5 | 3c5032bcc724e285be731ceb5171f745 |
|
BLAKE2b-256 | bda3224a920f2c5b7c93eb6a1ea3c0e8e91c18b1d4e553329f13b03bc10ee950 |
Hashes for libtcod_cffi-0.2.10-cp27-cp27m-win32.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 964006498b9c27a91490d28423963dab4c58eb1ccc5aead7a625fdfd04e283d8 |
|
MD5 | 6d8e4d278b1fe4e8685d01275501656b |
|
BLAKE2b-256 | 1f60fb5d3daf8c9b12a7248cb07a1d4edcd37c0171283536394235eaea0c7fd5 |
Hashes for libtcod_cffi-0.2.10-cp27-cp27m-macosx_10_9_intel.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | f245d25a29f7b55fe3f0f189be1d5bfc8f3da58d73f55f54512e0875e54ae1f1 |
|
MD5 | 69f79372dcac099962e3d7787070f01e |
|
BLAKE2b-256 | 728e9ca2dcf9e7817f6a6e16ca51646452633a1a3fefe829dd6831d146cf861b |