Skip to content

Commit

Permalink
migate from setup.py to pyproject.toml
Browse files Browse the repository at this point in the history
  • Loading branch information
Mogost committed Jul 1, 2024
1 parent 5f262fc commit 570dfb4
Show file tree
Hide file tree
Showing 4 changed files with 57 additions and 79 deletions.
2 changes: 0 additions & 2 deletions constance/__init__.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
from django.utils.functional import LazyObject

__version__ = '3.1.0'


class LazyConfig(LazyObject):
def _setup(self):
Expand Down
14 changes: 5 additions & 9 deletions docs/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
import sys
import os
from datetime import datetime
from importlib.metadata import version as get_version

os.environ.setdefault('DJANGO_SETTINGS_MODULE', 'tests.settings')

Expand All @@ -22,15 +23,10 @@
project_copyright = datetime.now().year.__str__() + ', Jazzband'
# author = ''

# Use current version.
try:
from constance import __version__
# The short X.Y version.
version = '.'.join(__version__.split('.')[:2])
# The full version, including alpha/beta/rc tags.
release = __version__
except ImportError:
version = release = 'dev'
# The full version, including alpha/beta/rc tags
release = get_version(project)
# The short X.Y version
version = ".".join(release.split(".")[:3])

# -- General configuration ------------------------------------------------
# https://www.sphinx-doc.org/en/master/usage/configuration.html#general-configuration
Expand Down
52 changes: 52 additions & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,52 @@
[build-system]
requires = ["setuptools>=42", "wheel"]
build-backend = "setuptools.build_meta"

[project]
name = "django-constance"
version = "3.1.0"
description = "Django live settings with pluggable backends, including Redis."
readme = "README.rst"
license = { text = "BSD" }
requires-python = ">=3.8"
authors = [
{ name = "Jannis Leidel", email = "jannis@leidel.info" },
]
keywords = ["django", "libraries", "redis", "settings"]
classifiers = [
"Development Status :: 5 - Production/Stable",
"Environment :: Web Environment",
"Framework :: Django",
"Framework :: Django :: 4.2",
"Framework :: Django :: 5.0",
"Intended Audience :: Developers",
"License :: OSI Approved :: BSD License",
"Natural Language :: English",
"Operating System :: OS Independent",
"Programming Language :: Python",
"Programming Language :: Python :: 3",
"Programming Language :: Python :: 3 :: Only",
"Programming Language :: Python :: 3.8",
"Programming Language :: Python :: 3.9",
"Programming Language :: Python :: 3.10",
"Programming Language :: Python :: 3.11",
"Programming Language :: Python :: Implementation :: CPython",
"Topic :: Utilities",
]
dependencies = [
"django-picklefield",
]

[project.optional-dependencies]
redis = [
"redis",
]

[project.entry-points.pytest11]
pytest-django-constance = "constance.test.pytest"

[project.urls]
homepage = "https://github.com/jazzband/django-constance/"
documentation = "https://django-constance.readthedocs.io/en/latest/"
repository = "https://github.com/jazzband/django-constance/"
changelog = "https://github.com/jazzband/django-constance/releases/"
68 changes: 0 additions & 68 deletions setup.py

This file was deleted.

0 comments on commit 570dfb4

Please sign in to comment.