@@ -298,9 +298,9 @@ To add Python to an iOS Xcode project:
298
298
* Signal handlers (:c:member: `PyConfig.install_signal_handlers `) are *enabled *;
299
299
* System logging (:c:member: `PyConfig.use_system_logger `) is *enabled *
300
300
(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
302
302
``python `` subfolder of your app's bundle; and
303
- * The `` PYTHONPATH ` ` for the interpreter includes:
303
+ * The :envvar: ` PYTHONPATH ` for the interpreter includes:
304
304
305
305
- the ``python/lib/python3.X `` subfolder of your app's bundle,
306
306
- 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:
324
324
the ``lib-dynload `` folder can be copied and adapted for this purpose.
325
325
326
326
* 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.
328
333
329
334
Testing a Python package
330
335
------------------------
0 commit comments