Ported setup.py to pyproject.toml (#2555)

* Ported setup.py to pyproject.toml, refs #2553

* Make fixtures tests less flaky

The in-memory fixtures table was being shared between different
instances of the test client, leading to occasional errors when
running the full test suite.
This commit is contained in:
Simon Willison 2025-10-30 10:41:41 -07:00 committed by GitHub
commit ce4b0794b2
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
15 changed files with 141 additions and 147 deletions

View file

@ -33,16 +33,16 @@ You can install these packages like so::
pip install pytest pytest-asyncio
If you are building an installable package you can add them as test dependencies to your ``setup.py`` module like this:
If you are building an installable package you can add them as test dependencies to your ``pyproject.toml`` file like this:
.. code-block:: python
.. code-block:: toml
setup(
name="datasette-my-plugin",
# ...
extras_require={"test": ["pytest", "pytest-asyncio"]},
tests_require=["datasette-my-plugin[test]"],
)
[project]
name = "datasette-my-plugin"
# ...
[project.optional-dependencies]
test = ["pytest", "pytest-asyncio"]
You can then install the test dependencies like so::