-
Notifications
You must be signed in to change notification settings - Fork 1.5k
fix: try harder to avoid a common user mistake #856
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -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 | ||
|
|
||
|
|
||
|
|
@@ -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. | ||
|
|
||
| .. code-block:: python | ||
| .. warning:: | ||
|
Comment on lines
-204
to
+203
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe 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.
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe 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) | ||
|
|
||
There was a problem hiding this comment.
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?There was a problem hiding this comment.
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.
There was a problem hiding this comment.
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 🤦
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I am truly blind.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
FTR the preview is here: https://python-packaging-user-guide--856.org.readthedocs.build/tutorials/packaging-projects/#configuring-metadata.