@@ -349,6 +349,7 @@ implementation of the :ref:`namespace extension <examples/namespace-extension>`
349
349
as well as the `pyproject extension `_ which serves as a blueprint for new
350
350
extensions.
351
351
352
+
352
353
Activating Extensions
353
354
---------------------
354
355
@@ -359,14 +360,13 @@ This is possible by setting up a `setuptools entry point`_ under the
359
360
This entry point should point to our extension class, e.g. ``AwesomeFiles ``
360
361
like defined above. If you for instance use a scaffold generated by PyScaffold
361
362
to write a PyScaffold extension (we hope you do ;-), you would add the following
362
- to the ``entry_points `` variable in ``setup.py ``:
363
+ to the ``options. entry_points `` section in ``setup.cfg ``:
363
364
364
- .. code-block :: python
365
+ .. code-block :: ini
365
366
366
- entry_points = """
367
- [pyscaffold.cli]
368
- awesome_files = your_package.your_module:AwesomeFiles
369
- """
367
+ [options.entry_points]
368
+ pyscaffold.cli =
369
+ awesome_files = your_package.your_module:AwesomeFiles
370
370
371
371
372
372
Examples
@@ -402,15 +402,18 @@ development can be easily bootstrapped with the command::
402
402
403
403
putup pyscaffoldext-${EXT_NAME} -p ${EXT_NAME} --namespace pyscaffoldext --no-skeleton
404
404
405
- If you put your extension code in the module ``extension.py `` then the `` entry_points ``
406
- variable in ``setup.py `` looks like:
405
+ If you put your extension code in the module ``extension.py `` then the
406
+ `` options.entry_points `` section in ``setup.cfg `` looks like:
407
407
408
- .. code-block :: python
408
+ .. code-block :: ini
409
409
410
- entry_points = """
411
- [pyscaffold.cli]
412
- awesome_files = pyscaffoldext.${EXT_NAME} .extension:AwesomeFiles
413
- """
410
+ [options.entry_points]
411
+ pyscaffold.cli =
412
+ awesome_files = pyscaffoldext.${EXT_NAME}.extension:AwesomeFiles
413
+
414
+ In this example, ``AwesomeFiles `` represents the name of the class that
415
+ implementes the extension and ``awesome_files `` is the string used to create
416
+ the flag for the ``putup `` command (``--awesome-files ``).
414
417
415
418
416
419
Final Considerations
0 commit comments