Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
19 changes: 12 additions & 7 deletions source/tutorials/packaging-projects.rst
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ project's root directory - you will add content to them in the following steps.
│   └── __init__.py
├── pyproject.toml
├── setup.cfg
├── setup.py
├── setup.py # optional, needed to make editable pip installs work
└── tests


Expand Down Expand Up @@ -198,18 +198,23 @@ an escape hatch when absolutely necessary.
If you create a :file:`setup.py` file, this will enable direct interaction
with :file:`setup.py` (which generally should be avoided), and editable
installs. This file used to be required, but can be omitted in modern
setuptools. If you include the file, you must have a call to
:func:`setup()` in it:
setuptools.
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Don't you still need to call setup() if you include it?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This just moved to a red box with a warning. See the line below.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I guess I should wait a bit after waking up to give feedback on PRs 🤦

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I am truly blind.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.


.. code-block:: python
.. warning::
Comment on lines -204 to +203
Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This provides a red box, while the IMPORTANT admonition didn't do anything very special.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hopefully, changing the theme to furo or the one @pradyunsg is working on will improve this


import setuptools
If you include the file, you **must have** a call to :func:`setup()` in it,
even if there are no arguments:

.. code-block:: python

import setuptools

setuptools.setup()
setuptools.setup()

Anything you set in :file:`setup.cfg` can instead be set via keyword argument to
:func:`setup()`; this enables computed values to be used. You will also need
:func:`setup()` for setting up extension modules for compilation.
:func:`setup()` for setting up extension modules for compilation. Currently,
having this file also is required if you want to use editable installs with pip.


.. tab:: setup.py (dynamic)
Expand Down