Skip to content

Commit 93e49a9

Browse files
committed
Excise mentions of setup.py
1 parent 8d188d7 commit 93e49a9

File tree

4 files changed

+17
-16
lines changed

4 files changed

+17
-16
lines changed

docs/contributing.rst

+1-1
Original file line numberDiff line numberDiff line change
@@ -154,7 +154,7 @@ coverage measurements (using pytest-cov plugin) are not reliable.
154154

155155
If you want to measure coverage you'll need to create .pth file as described in
156156
`subprocess section of coverage documentation`_. If you're using
157-
``setup.py develop`` you should uninstall pytest_django (using pip)
157+
editable mode you should uninstall pytest_django (using pip)
158158
for the time of measuring coverage.
159159

160160
You'll also need mysql and postgres databases. There are predefined settings

docs/database.rst

+1-1
Original file line numberDiff line numberDiff line change
@@ -132,7 +132,7 @@ A good way to use ``--reuse-db`` and ``--create-db`` can be:
132132
Using ``--no-migrations`` (alias: ``--nomigrations``) will disable Django migrations and create the database
133133
by inspecting all models. It may be faster when there are several migrations to
134134
run in the database setup. You can use ``--migrations`` to force running
135-
migrations in case ``--no-migrations`` is used, e.g. in ``setup.cfg``.
135+
migrations in case ``--no-migrations`` is used, e.g. in ``pyproject.toml``.
136136

137137
.. _advanced-database-configuration:
138138

docs/managing_python_path.rst

+14-13
Original file line numberDiff line numberDiff line change
@@ -19,9 +19,9 @@ looking for the project's ``manage.py`` file and adding its directory to the
1919
Python path.
2020

2121
Looking for the ``manage.py`` file uses the same algorithm as pytest uses to
22-
find ``pytest.ini``, ``tox.ini`` and ``setup.cfg``: Each test root directories
23-
parents will be searched for ``manage.py`` files, and it will stop when the
24-
first file is found.
22+
find ``pyproject.toml``, ``pytest.ini``, ``tox.ini`` and ``setup.cfg``: Each
23+
test root directories parents will be searched for ``manage.py`` files, and it
24+
will stop when the first file is found.
2525

2626
If you have a custom project setup, have none or multiple ``manage.py`` files
2727
in your project, the automatic detection may not be correct. See
@@ -47,16 +47,19 @@ Managing your project with virtualenv, pip and editable mode
4747
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
4848

4949
The easiest way to have your code available on the Python path when using
50-
virtualenv and pip is to have a setup.py file and install your project in
51-
editable mode when developing.
50+
virtualenv and pip is to install your project in editable mode when developing.
5251

53-
If you don't already have a setup.py file, creating a setup.py file with this
54-
content will get you started::
52+
If you don't already have a pyproject.toml file, creating a pyproject.toml file
53+
with this content will get you started::
5554

56-
import setuptools
57-
setuptools.setup(name='myproj', version='1.0')
55+
# pyproject.toml
56+
[build-system]
57+
requires = [
58+
"setuptools>=61.0.0",
59+
]
60+
build-backend = "setuptools.build_meta"
5861

59-
This ``setup.py`` file is not sufficient to distribute your package to PyPI or
62+
This ``pyproject.toml`` file is not sufficient to distribute your package to PyPI or
6063
more general packaging, but it should help you get started. Please refer to the
6164
`Python Packaging User Guide
6265
<https://python-packaging-user-guide.readthedocs.io/en/latest/tutorial.html#creating-your-own-project>`_
@@ -71,7 +74,7 @@ add this directly to your project's requirements.txt file like this::
7174

7275
# requirements.txt
7376
-e .
74-
django>=1.11
77+
django
7578
pytest-django
7679

7780

@@ -80,8 +83,6 @@ Using pytest's ``pythonpath`` option
8083

8184
You can explicitly add paths to the Python search path using pytest's
8285
:pytest-confval:`pythonpath` option.
83-
This option is available since pytest 7; for older versions you can use the
84-
`pytest-pythonpath <https://pypi.python.org/pypi/pytest-pythonpath>`_ plugin.
8586

8687
Example: project with src layout
8788
````````````````````````````````

tests/test_django_settings_module.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
"""Tests which check the various ways you can set DJANGO_SETTINGS_MODULE
22
3-
If these tests fail you probably forgot to run "python setup.py develop".
3+
If these tests fail you probably forgot to run "pip install -e .".
44
"""
55

66
import pytest

0 commit comments

Comments
 (0)