Skip to content
This repository was archived by the owner on Oct 9, 2021. It is now read-only.

Commit 6042808

Browse files
Updated the building and caveats documentation
1 parent a8d08e5 commit 6042808

File tree

2 files changed

+29
-13
lines changed

2 files changed

+29
-13
lines changed

doc/sphinx/source/building.rst

+22-5
Original file line numberDiff line numberDiff line change
@@ -154,16 +154,33 @@ module by typing this command::
154154
python setup.py build_ext
155155

156156

157+
.. _building_with_cython:
158+
157159
Building with Cython installed
158160
------------------------------
159161

160162
.. warning::
161163

162-
Currently, modules built straight from the repo probably won't work
163-
(this may depend on your Cython version). Consider using a source
164-
release, or follow the indications from this forum post if you
165-
still want to build from Git:
166-
http://en.sfml-dev.org/forums/index.php?topic=5311.msg52943#msg52943
164+
Currently, the binding doesn't work correctly when built straight
165+
from the Git repo. I explained the problem here:
166+
https://groups.google.com/forum/?fromgroups#!topic/cython-users/W8hMcjsFfDU
167+
If you want to build from the source, you're encouraged to use the
168+
latest source release. See :ref:`building_without_cython`. If you
169+
really want to build from Git, you need to modify the generated
170+
sfml.cpp file. You need all these declarations::
171+
172+
__PYX_EXTERN_C DL_EXPORT(PyObject) *wrap_time_instance(sf::Time *);
173+
__PYX_EXTERN_C DL_EXPORT(PyObject) *wrap_render_target_instance(sf::RenderTarget *);
174+
__PYX_EXTERN_C void set_error_message(char*);
175+
__PYX_EXTERN_C DL_EXPORT(PyObject) *wrap_chunk_instance(sf::SoundStream::Chunk*, int);
176+
177+
178+
I don't know if it's the same exact problem everywhere, but on my
179+
system I get the first declaration and not the others. So you can
180+
look for the ``wrap_time_instance()`` declaration, and copy-paste
181+
the others after it.
182+
183+
This bug should be fixed in the next Cython release.
167184

168185
.. warning::
169186

doc/sphinx/source/caveats.rst

+7-8
Original file line numberDiff line numberDiff line change
@@ -37,14 +37,13 @@ Caveats
3737
=======
3838

3939
Currently, the binding doesn't work correctly when built straight from
40-
the Git repo, see this forum post:
41-
http://en.sfml-dev.org/forums/index.php?topic=5311.msg52943#msg52943
42-
If you want to build from the source, you're encouraged to use the
43-
latest source release. See :ref:`building_without_cython`.
44-
45-
Windows programs crash just before exiting. My guess is that it's
46-
related to the destruction of static objects; I'll try to fix it for
47-
the next minor release.
40+
the Git repo. See :ref:`building_with_cython` for more information.
41+
42+
Windows programs sometimes crash just before exiting. Starting from
43+
pySFML 0.2.1, the default font has been removed, which should solve a
44+
lot of deallocation problems. Christoph Gohlke's installers also seem
45+
to generally be more reliable, so as far as I know, newer installers
46+
shouldn't have this bug.
4847

4948
A current limitation is that :class:`Texture` objects won't work as
5049
expected unless they are created after your :class:`RenderWindow`. It

0 commit comments

Comments
 (0)