Skip to content

Commit e40b287

Browse files
tfranzelderonnax
andcommitted
Renovate project setup #1162
Co-authored-by: Mathieu Dupuy <deronnax@gmail.com>
1 parent 62fc98b commit e40b287

5 files changed

Lines changed: 95 additions & 121 deletions

File tree

.github/workflows/publish.yml

Lines changed: 16 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -9,18 +9,29 @@ jobs:
99
runs-on: ubuntu-latest
1010

1111
steps:
12-
- uses: actions/checkout@v2
12+
- uses: actions/checkout@v5
1313
- name: Set up Python
14-
uses: actions/setup-python@v2
14+
uses: actions/setup-python@v6
1515
with:
1616
python-version: '3.x'
1717
- name: Install dependencies
1818
run: |
19-
python -m pip install --upgrade pip
2019
pip install -r requirements/packaging.txt
21-
- name: Build and publish
20+
- name: Build
21+
run: |
22+
python -m build
23+
- name: Publish
2224
env:
2325
TWINE_USERNAME: ${{ secrets.PYPI_USERNAME }}
2426
TWINE_PASSWORD: ${{ secrets.PYPI_PASSWORD }}
2527
run: |
26-
python setup.py publish
28+
twine upload dist/*
29+
- name: Tag
30+
run: |
31+
git config user.name github-actions
32+
git config user.email github-actions@github.com
33+
34+
VERSION="$(cat drf_spectacular/__init__.py | grep "__version__" | cut -d"'" -f2)"
35+
36+
git tag -a $VERSION -m 'version $VERSION'
37+
git push --tags

MANIFEST.in

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,5 +11,6 @@ graft requirements
1111
graft docs
1212
prune docs/_build
1313
prune docs/_static
14+
prune helper
1415
global-exclude __pycache__
1516
global-exclude *.py[co]

pyproject.toml

Lines changed: 76 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,76 @@
1+
[project]
2+
name = "drf-spectacular"
3+
dynamic = ["version"]
4+
description = "Sane and flexible OpenAPI 3 schema generation for Django REST framework"
5+
readme = "README.rst"
6+
requires-python = ">=3.7"
7+
license = "BSD-3-Clause"
8+
authors = [
9+
{name = "T. Franzel", email = "tfranzel@gmail.com"}
10+
]
11+
keywords = ["django", "rest", "openapi", "schema", "api", "swagger"]
12+
classifiers = [
13+
"Development Status :: 5 - Production/Stable",
14+
"Environment :: Web Environment",
15+
"Framework :: Django",
16+
"Framework :: Django :: 2.2",
17+
"Framework :: Django :: 3.2",
18+
"Framework :: Django :: 4.0",
19+
"Framework :: Django :: 4.1",
20+
"Framework :: Django :: 4.2",
21+
"Framework :: Django :: 5.0",
22+
"Framework :: Django :: 5.1",
23+
"Framework :: Django :: 5.2",
24+
"Intended Audience :: Developers",
25+
"Operating System :: OS Independent",
26+
"Natural Language :: English",
27+
"Programming Language :: Python :: 3",
28+
"Programming Language :: Python :: 3.6",
29+
"Programming Language :: Python :: 3.7",
30+
"Programming Language :: Python :: 3.8",
31+
"Programming Language :: Python :: 3.9",
32+
"Programming Language :: Python :: 3.10",
33+
"Programming Language :: Python :: 3.11",
34+
"Programming Language :: Python :: 3.12",
35+
"Programming Language :: Python :: 3.13",
36+
"Programming Language :: Python :: 3.14",
37+
"Topic :: Internet :: WWW/HTTP",
38+
"Topic :: Documentation",
39+
"Topic :: Software Development :: Code Generators",
40+
]
41+
dependencies = [
42+
"Django>=2.2",
43+
"djangorestframework>=3.10.3",
44+
"uritemplate>=2.0.0",
45+
"PyYAML>=5.1",
46+
"jsonschema>=2.6.0",
47+
"inflection>=0.3.1",
48+
"typing-extensions; python_version < '3.10'",
49+
]
50+
51+
[project.optional-dependencies]
52+
offline = ["drf-spectacular-sidecar"]
53+
sidecar = ["drf-spectacular-sidecar"]
54+
55+
[project.urls]
56+
Homepage = "https://github.com/tfranzel/drf-spectacular"
57+
Source = "https://github.com/tfranzel/drf-spectacular"
58+
Documentation = "https://drf-spectacular.readthedocs.io"
59+
60+
[tool.setuptools.dynamic]
61+
version = {attr = "drf_spectacular.__version__"}
62+
63+
[tool.setuptools.packages.find]
64+
include = ["drf_spectacular*"]
65+
66+
[tool.setuptools.package-data]
67+
drf_spectacular = [
68+
"py.typed",
69+
"validation/*.json",
70+
"templates/drf_spectacular/*.html",
71+
"templates/drf_spectacular/*.js",
72+
]
73+
74+
[build-system]
75+
requires = ["setuptools>=61.0", "wheel"]
76+
build-backend = "setuptools.build_meta"

requirements/packaging.txt

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,2 @@
1-
twine>=3.1.1
2-
wheel>=0.34.2
3-
setuptools
1+
twine>=6.2.0
2+
build>=1.3.0

setup.py

Lines changed: 0 additions & 113 deletions
This file was deleted.

0 commit comments

Comments
 (0)