Skip to content
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

migrate packaging to pyproject.toml #9056

Open
wants to merge 14 commits into
base: master
Choose a base branch
from
Open
10 changes: 0 additions & 10 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,6 @@ jobs:
strategy:
matrix:
python-version:
- '3.6'
- '3.7'
- '3.8'
- '3.9'
Expand All @@ -37,18 +36,9 @@ jobs:
- name: Install dependencies
run: python -m pip install --upgrade codecov tox

- name: Install tox-py
if: ${{ matrix.python-version == '3.6' }}
run: python -m pip install --upgrade tox-py

- name: Run tox targets for ${{ matrix.python-version }}
if: ${{ matrix.python-version != '3.6' }}
run: tox run -f py$(echo ${{ matrix.python-version }} | tr -d .)

- name: Run tox targets for ${{ matrix.python-version }}
if: ${{ matrix.python-version == '3.6' }}
run: tox --py current

- name: Run extra tox targets
if: ${{ matrix.python-version == '3.9' }}
run: |
Expand Down
53 changes: 53 additions & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,53 @@
[build-system]
requires = ["setuptools>=61.2"]
build-backend = "setuptools.build_meta"

[project]
name = "djangorestframework"
readme = "README.md"
authors = [{name = "Tom Christie", email = "[email protected]"}]
license = {text = "BSD"}
description = "Web APIs for Django, made easy."
classifiers = [
"Development Status :: 5 - Production/Stable",
"Environment :: Web Environment",
"Framework :: Django",
"Framework :: Django :: 3.0",
"Framework :: Django :: 3.1",
"Framework :: Django :: 3.2",
"Framework :: Django :: 4.0",
"Framework :: Django :: 4.1",
"Framework :: Django :: 4.2",
"Intended Audience :: Developers",
"License :: OSI Approved :: BSD License",
"Operating System :: OS Independent",
"Programming Language :: Python",
"Programming Language :: Python :: 3",
"Programming Language :: Python :: 3.6",
Copy link

Choose a reason for hiding this comment

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

Is this still true?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

not in the current state, indeed

"Programming Language :: Python :: 3.7",
"Programming Language :: Python :: 3.8",
"Programming Language :: Python :: 3.9",
"Programming Language :: Python :: 3.10",
"Programming Language :: Python :: 3.11",
"Programming Language :: Python :: 3.12",
"Programming Language :: Python :: 3 :: Only",
"Topic :: Internet :: WWW/HTTP",
]
requires-python = ">=3.7"
dependencies = [
"django>=3.0",
'backports.zoneinfo;python_version<"3.9"',
]
dynamic = ["version"]

[tool.setuptools.dynamic]
version = {attr = "rest_framework.__version__"}

[project.urls]
Homepage = "https://www.django-rest-framework.org/"
Funding = "https://fund.django-rest-framework.org/topics/funding/"
Source = "https://github.com/encode/django-rest-framework"
Changelog = "https://www.django-rest-framework.org/community/release-notes/"

[tool.setuptools.packages.find]
namespaces = false
3 changes: 0 additions & 3 deletions setup.cfg
Original file line number Diff line number Diff line change
@@ -1,6 +1,3 @@
[metadata]
license_files = LICENSE.md

[tool:pytest]
addopts=--tb=short --strict-markers -ra
testspath = tests
Expand Down
125 changes: 0 additions & 125 deletions setup.py

This file was deleted.

1 change: 1 addition & 0 deletions tox.ini
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ envlist =
base
dist
docs
isolated_build = true

[testenv]
commands = python -W error::DeprecationWarning -W error::PendingDeprecationWarning runtests.py --coverage {posargs}
Expand Down