Skip to content

Commit f5b3856

Browse files
committed
Add note about using site directories.
1 parent 9b2a452 commit f5b3856

File tree

1 file changed

+8
-3
lines changed

1 file changed

+8
-3
lines changed

Doc/using/ios.rst

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -298,9 +298,9 @@ To add Python to an iOS Xcode project:
298298
* Signal handlers (:c:member:`PyConfig.install_signal_handlers`) are *enabled*;
299299
* System logging (:c:member:`PyConfig.use_system_logger`) is *enabled*
300300
(optional, but strongly recommended; this is enabled by default);
301-
* ``PYTHONHOME`` for the interpreter is configured to point at the
301+
* :envvar:`PYTHONHOME` for the interpreter is configured to point at the
302302
``python`` subfolder of your app's bundle; and
303-
* The ``PYTHONPATH`` for the interpreter includes:
303+
* The :envvar:`PYTHONPATH` for the interpreter includes:
304304

305305
- the ``python/lib/python3.X`` subfolder of your app's bundle,
306306
- the ``python/lib/python3.X/lib-dynload`` subfolder of your app's bundle, and
@@ -324,7 +324,12 @@ modules in your app, some additional steps will be required:
324324
the ``lib-dynload`` folder can be copied and adapted for this purpose.
325325

326326
* If you're using a separate folder for third-party packages, ensure that folder
327-
is included as part of the ``PYTHONPATH`` configuration in step 10.
327+
is included as part of the :envvar:`PYTHONPATH` configuration in step 10.
328+
329+
* If any of the folders that contain third-party packages will contain ``.pth``
330+
files, you should add that folder as a *site directory* (using
331+
:meth:`site.addsitedir`), rather than adding to :envvar:`PYTHONPATH` or
332+
:attr:`sys.path` directly.
328333

329334
Testing a Python package
330335
------------------------

0 commit comments

Comments
 (0)