Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 0 additions & 2 deletions .flake8

This file was deleted.

1 change: 1 addition & 0 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -9,3 +9,4 @@ repos:
rev: 7.3.0
hooks:
- id: flake8
additional_dependencies: [Flake8-pyproject]
13 changes: 0 additions & 13 deletions MANIFEST.in

This file was deleted.

83 changes: 83 additions & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,83 @@
[build-system]
requires = ["setuptools>=78.0"]
build-backend = "setuptools.build_meta"
Comment on lines +2 to +3
Copy link
Member

@ulgens ulgens Dec 10, 2025

Choose a reason for hiding this comment

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

I'm curious if the setuptools selection over other tools like hatchling was on purpose. Just asking to learn, I'm okay with the selection if it's working fine.

Copy link
Member Author

Choose a reason for hiding this comment

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

nice question. well even i'm also learning and what i have found that setuptools is the most compatible drop-in replacement for migrating from setup.py.

  • currently the setup.py file uses dyanamic python code like Setup.version() , file reading logic this may not be possible in hatchling
  • I have removed the MANIFEST.in currently but there might be chance where we would need to add MANIFEST.in for some reason so hatchling don't support it.
  • setuptools has low risk when migrating from setup.py file.


[project]
name = "django-click"
dynamic = ["version"]
description = "Build Django management commands using the click CLI package."
readme = "README.rst"
license = "MIT"
license-files = ["LICENSE"]
authors = [
{ name = "Jonathan Stoppani", email = "jonathan@stoppani.name" },
]
maintainers = [
{name = "Jonathan Stoppani" },
{name = "Timothy Allen"},
]
requires-python = ">=3.10"
classifiers = [
"Development Status :: 4 - Beta",
"Framework :: Django :: 4.2",
"Framework :: Django :: 5.2",
"Framework :: Django :: 6.0",
"Intended Audience :: Developers",
"Operating System :: OS Independent",
"Programming Language :: Python",
"Programming Language :: Python :: 3",
"Programming Language :: Python :: 3.10",
"Programming Language :: Python :: 3.11",
"Programming Language :: Python :: 3.12",
"Programming Language :: Python :: 3.13",
"Programming Language :: Python :: 3.14",
]
dependencies = [
"click>=7.1",
]

[project.urls]
Homepage = "https://github.com/django-commons/django-click"

[dependency-groups]
all = [
{include-group = "docs"},
{include-group = "test"},
]
test = [
"pytest",
"coverage<8",
"pytest-django",
"pytest-cov",
]
docs = [
# Documentation
Copy link
Member

Choose a reason for hiding this comment

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

The comment is no longer needed.

"Sphinx",
"sphinx-autobuild",
"sphinx_rtd_theme",
]


[tool.setuptools.packages.find]
include = ["djclick"]

[tool.setuptools.package-data]
"djclick" = ["**/*"]

[tool.setuptools.exclude-package-data]
"djclick" = [
"test/*",
"test/**/*",
]

[tool.setuptools.data-files]
"." = [
"CONTRIBUTING.rst",
]


[tool.flake8]
max-line-length = 88

[tool.setuptools.dynamic]
version = { attr = "djclick.__version__" }
10 changes: 0 additions & 10 deletions requirements-dev.txt

This file was deleted.

6 changes: 0 additions & 6 deletions requirements-test.txt

This file was deleted.

1 change: 0 additions & 1 deletion requirements.txt

This file was deleted.

2 changes: 0 additions & 2 deletions setup.cfg

This file was deleted.

160 changes: 0 additions & 160 deletions setup.py

This file was deleted.

5 changes: 3 additions & 2 deletions tox.ini
Original file line number Diff line number Diff line change
Expand Up @@ -16,9 +16,10 @@ setenv =
DJANGO_SETTINGS_MODULE=testprj.settings
PYTHONPATH={toxinidir}/djclick/test/testprj
deps =
-rrequirements-test.txt
dj42: django>=4.2,<4.3
dj52: django>=5.2,<5.3
dj60: django>=6.0,<6.1
djmain: https://github.com/django/django/archive/main.tar.gz
commands = pytest -rxs --cov-report= --cov-append --cov djclick {posargs:djclick}
commands =
pip install --group test
pytest -rxs --cov-report= --cov-append --cov djclick {posargs:djclick}