Skip to content

Commit 65d56a9

Browse files
committed
ci: Uses pyproject.toml to publish the package
1 parent 3738262 commit 65d56a9

File tree

4 files changed

+63
-50
lines changed

4 files changed

+63
-50
lines changed

.github/workflows/test_and_publish.yml

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -170,10 +170,16 @@ jobs:
170170
with:
171171
python-version: '3.13'
172172

173-
- name: Creating Built Distributions
173+
- name: Build the package
174174
run: |
175-
pip install setuptools
176-
python setup.py sdist
175+
python -m pip install --upgrade pip
176+
python -m pip install build
177+
python -m build
178+
179+
- name: Verify metadata
180+
run: |
181+
python -m pip install twine
182+
python -m twine check dist/*
177183
178184
- name: Publish distribution to PyPI
179185
uses: pypa/gh-action-pypi-publish@release/v1

CHANGELOG.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,10 @@
11
Changelog
22
=========
33

4+
### 1.0.2 - 2025-09-22
5+
6+
* Uses pyproject.toml to publish the package
7+
48
### 1.0.1 - 2025-09-22
59

610
* Fix setup.py's long decription

pyproject.toml

Lines changed: 50 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,50 @@
1+
[build-system]
2+
requires = ["setuptools>=77", "wheel"]
3+
build-backend = "setuptools.build_meta"
4+
5+
[project]
6+
name = "drf-simple-oauth2"
7+
version = "1.0.2"
8+
description = "Simple OAuth2 client package allowing to define OAuth2 / OpenID providers through settings."
9+
readme = "README.md"
10+
requires-python = ">=3.10"
11+
license = "MIT"
12+
license-files = ["LICENSE*"]
13+
authors = [{ name = "Quentin Coumes (Codoc)", email = "quentin@codoc.co" }]
14+
keywords = ["django", "simple_oauth2", "oauth2", "oauth", "openid", "authentication"]
15+
16+
classifiers = [
17+
"Development Status :: 5 - Production/Stable",
18+
"Framework :: Django",
19+
"Framework :: Django :: 4.2",
20+
"Framework :: Django :: 5",
21+
"Intended Audience :: Developers",
22+
"Natural Language :: English",
23+
"Programming Language :: Python :: 3 :: Only",
24+
"Programming Language :: Python :: 3.10",
25+
"Programming Language :: Python :: 3.11",
26+
"Programming Language :: Python :: 3.12",
27+
"Programming Language :: Python :: 3.13",
28+
"Topic :: Internet :: WWW/HTTP",
29+
"Topic :: Security :: Cryptography",
30+
]
31+
32+
dependencies = [
33+
"django>=4.0.0,<6.0.0",
34+
"djangorestframework>=3.0.0,<4.0.0",
35+
"djangorestframework-simplejwt>=5.0.0,<6.0.0",
36+
"pyjwt>=2.6.0,<3.0.0",
37+
"requests>=2.32.0,<3.0.0",
38+
]
39+
40+
[project.urls]
41+
Homepage = "https://github.com/Codoc-os/drf-simple-oauth2"
42+
Documentation = "https://drf-simple-oauth2.readthedocs.io/en/latest/"
43+
Changelog = "https://github.com/Codoc-os/drf-simple-oauth2/blob/main/CHANGELOG.md"
44+
Issues = "https://github.com/Codoc-os/drf-simple-oauth2/issues"
45+
46+
[tool.setuptools]
47+
include-package-data = true
48+
49+
[tool.setuptools.packages.find]
50+
include = ["simple_oauth2", "simple_oauth2.*"]

setup.py

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

0 commit comments

Comments
 (0)