Skip to content

Commit

Permalink
Merge pull request #170 from jazzband/pyproject.toml
Browse files Browse the repository at this point in the history
Switch from setup.py to pyproject.toml
  • Loading branch information
blag authored Oct 5, 2023
2 parents 7415406 + a891b20 commit 5b1713d
Show file tree
Hide file tree
Showing 5 changed files with 76 additions and 69 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ jobs:
with:
python-version: ${{ matrix.python-version }}
cache: pip
cache-dependency-path: setup.py
cache-dependency-path: pyproject.toml

- name: Install dependencies
run: |
Expand Down
2 changes: 1 addition & 1 deletion README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -131,7 +131,7 @@ The following actions are required to push a new version:

bumpversion [major|minor|patch]
git push && git push --tags
python setup.py sdist bdist_wheel
python -m build --wheel --no-isolation
twine upload dist/*


Expand Down
74 changes: 74 additions & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,74 @@
[build-system]
requires = ["setuptools>=45", "wheel", "setuptools_scm>=6.2"]

[project]
name = "django-user-sessions"
authors = [
{name = "Bouke Haarsma", email = "bouke@haarsma.eu"},
# {name = "Hugo Osvaldo Barrera", email = "hugo@whynothugo.nl"},
]
description = "Django sessions with a foreign key to the user"
readme = "README.rst"
# TOOD: drop 3.7
requires-python = ">=3.7"
keywords = ["django", "sessions"]
license = {text = "MIT"}
classifiers = [
"Development Status :: 5 - Production/Stable",
"Environment :: Web Environment",
"Framework :: Django",
"Framework :: Django :: 3.2",
"Framework :: Django :: 4.0",
"Intended Audience :: Developers",
"License :: OSI Approved :: MIT License",
"Operating System :: OS Independent",
"Programming Language :: Python",
"Programming Language :: Python :: 3",
"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",
"Topic :: Security",
]
dependencies = [
"Django>=3.2",
]
dynamic = ["version"]

[project.urls]
homepage = "https://github.com/jazzband/django-user-sessions"
download = "https://pypi.org/project/django-user-sessions/"
documentation = "https://django-user-sessions.readthedocs.io/en/stable/"
changelog = "https://django-user-sessions.readthedocs.io/en/stable/release-notes.html"
issues = "https://github.com/jazzband/django-user-sessions/issues"

[project.optional-dependencies]
dev = [
# Example app
"django-debug-toolbar",
# Testing
"coverage",
"flake8",
"tox",
"tox-pyenv",
"detox",
"isort",
# Transifex
"transifex-client",
# Documentation
"Sphinx",
"sphinx_rtd_theme",
# Build
"wheel", # TODO: not required?
"bumpversion", # TODO: unused?
"twine",
]

[tool.setuptools]
packages = ["user_sessions"]

[tool.setuptools_scm]
version_scheme = "post-release"

# TODO: confirm that package data is shipped properly
31 changes: 0 additions & 31 deletions requirements_dev.txt

This file was deleted.

36 changes: 0 additions & 36 deletions setup.py

This file was deleted.

0 comments on commit 5b1713d

Please sign in to comment.