Skip to content

Commit

Permalink
Use pure pyproject.toml setup for packaging
Browse files Browse the repository at this point in the history
  • Loading branch information
bittner committed Feb 11, 2024
1 parent 9a3b2f0 commit 5c5aac9
Show file tree
Hide file tree
Showing 7 changed files with 84 additions and 74 deletions.
7 changes: 4 additions & 3 deletions HISTORY.rst
Original file line number Diff line number Diff line change
@@ -1,14 +1,15 @@
Release History
---------------

1.4.1 (unreleased)
1.5.0 (unreleased)
++++++++++++++++++

**Features and Improvements**

- Migrate packaging from ``setup.py`` to pure ``pyproject.toml``.
- Add instructions to measure test coverage to the documentation
- Cover Python 3.9 and 3.10 and Django 3.2 and 4.0, drop Python 3.5 and Django 2.2 and 3.0 support
- Bump Behave requirement to 1.2.7 (allows option to change the Behave TestRunner)
- Cover Python 3.9 to 3.12 and Django 3.2, 4.x and 5.0, drop Python 3.5 and Django 2.2 and 3.0 support
- Bump Behave requirement to 1.2.7.dev3/4/5 (allows TOML support and option to change the Behave TestRunner)
- New option to change the Django TestRunner

1.4.0 (2020-06-15)
Expand Down
1 change: 0 additions & 1 deletion MANIFEST.in
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
include LICENSE
include README.rst
include requirements.txt
recursive-include behave_django *.py
2 changes: 1 addition & 1 deletion behave_django/__init__.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
"""Behave BDD integration for Django"""

__version__ = '1.4.0'
__version__ = '1.5.0'
76 changes: 76 additions & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,3 +1,64 @@
[build-system]
build-backend = "setuptools.build_meta"
requires = ["setuptools>=64"]

[project]
name = "behave-django"
dynamic = ["version"]
description = "Behave BDD integration for Django"
readme = "README.rst"
license = {file = "LICENSE"}
authors = [
{name = "Mitchel Cabuloy", email = "mixxorz@gmail.com"},
{name = "Peter Bittner", email = "django@bittner.it"},
]
maintainers = [
{name = "Peter Bittner", email = "django@bittner.it"},
{name = "Javier Buzzi", email = "buzzi.javier@gmail.com"},
]
classifiers = [
"Development Status :: 5 - Production/Stable",
"Environment :: Console",
"Environment :: Plugins",
"Environment :: Web Environment",
"Framework :: Django",
"Framework :: Django :: 3.2",
"Framework :: Django :: 4.1",
"Framework :: Django :: 4.2",
"Framework :: Django :: 5.0",
"Intended Audience :: Developers",
"License :: OSI Approved :: MIT License",
"Operating System :: OS Independent",
"Programming Language :: Python",
"Programming Language :: Python :: 3",
"Programming Language :: Python :: 3.6",
"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",
"Programming Language :: Python :: 3.12",
"Topic :: Internet :: WWW/HTTP",
"Topic :: Internet :: WWW/HTTP :: Dynamic Content",
"Topic :: Software Development :: Testing",
]
keywords = [
"bdd",
"behave",
"django",
"testing",
]
requires-python = ">=3.6"
dependencies = [
"behave[toml]@git+http://github.com/behave/behave.git@v1.2.7.dev4", # behave>=1.2.7.dev3
"django>=3.2",
"beautifulsoup4",
]

[project.urls]
Source = "https://github.com/behave/behave-django"
Documentation = "https://behave-django.readthedocs.io/"

[tool.bandit]
exclude_dirs = [
".git",
Expand All @@ -6,6 +67,15 @@ exclude_dirs = [
"tests",
]

[tool.behave]
junit = true
junit_directory = "tests"
paths = [
"tests/acceptance",
"tests/test_app",
]
show_skipped = false

[tool.black]
color = true

Expand Down Expand Up @@ -37,3 +107,9 @@ addopts = "--color=yes --junitxml=tests/unittests-report.xml --verbose"
testpaths = [
"tests/unit",
]

[tool.setuptools.dynamic]
version = {attr = "behave_django.__version__"}

[tool.setuptools.packages.find]
namespaces = false
3 changes: 0 additions & 3 deletions requirements.txt

This file was deleted.

63 changes: 0 additions & 63 deletions setup.py

This file was deleted.

6 changes: 3 additions & 3 deletions tox.ini
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ commands = bandit {posargs:-c pyproject.toml -r .}
description = Ensure consistent code style
skip_install = true
deps = black
commands = black {posargs:--check --diff behave_django setup.py tests}
commands = black {posargs:--check --diff behave_django tests}

[testenv:clean]
description = Remove Python bytecode and other debris
Expand All @@ -89,12 +89,12 @@ commands = flake8 {posargs}
description = Ensure imports are ordered consistently
skip_install = true
deps = isort[colors]
commands = isort {posargs:--check-only --diff behave_django setup.py tests}
commands = isort {posargs:--check-only --diff behave_django tests}

[testenv:pylint]
description = Check for errors and code smells
deps = pylint-django
commands = pylint {posargs:--exit-zero behave_django setup}
commands = pylint {posargs:--exit-zero behave_django}

[testenv:package]
description = Build package and check metadata (or upload package)
Expand Down

0 comments on commit 5c5aac9

Please sign in to comment.