Skip to content

Commit c948eb2

Browse files
committed
chore(setup): migrate from setuptools to hatchling
* remove MANIFEST.in because that's only relevant for setuptools * bump requires-python due to dependencies requiring 3.9+ * format pyproject.toml with Tombi Co-authored-by: Sam Arbid <samaa2@kth.se>'
1 parent 38747a5 commit c948eb2

9 files changed

Lines changed: 88 additions & 151 deletions

File tree

.editorconfig

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,3 +32,7 @@ indent_size = 2
3232
# Dockerfile
3333
[Dockerfile]
3434
indent_size = 4
35+
36+
# Align TOML indenting with Tombi
37+
[*.toml]
38+
indent_size = 2

.github/workflows/i18n-push.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,4 +13,5 @@ jobs:
1313
uses: inveniosoftware/invenio-i18n/.github/workflows/i18n-push-base.yml@master
1414
with:
1515
extract-backend: true
16+
backend-package-path: flask_security_invenio
1617
secrets: inherit

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -55,3 +55,4 @@ Session.vim
5555

5656
.venv
5757

58+
uv.lock

MANIFEST.in

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

babel.ini

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

pyproject.toml

Lines changed: 82 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,83 @@
1+
# SPDX-License-Identifier: MIT
2+
3+
[project]
4+
name = "Flask-Security-Invenio"
5+
description = "Simple security for Flask apps."
6+
readme = "README.rst"
7+
requires-python = ">=3.9"
8+
license = "MIT"
9+
authors = [
10+
{ name = "CERN/TU Wien/JRC", email = "info@inveniosoftware.org" },
11+
]
12+
keywords = [
13+
"flask",
14+
"security",
15+
]
16+
classifiers = [
17+
"Development Status :: 5 - Production/Stable",
18+
]
19+
dependencies = [
20+
"Flask>=1.1.4",
21+
"Flask-Babel>=2.0.0",
22+
"Flask-Login>=0.4.1",
23+
"Flask-Mail>=0.9.1",
24+
"Flask-Principal>=0.4.0",
25+
"Flask-WTF>=1.1.0",
26+
"email-validator>=1.0.5",
27+
"itsdangerous>=2.0",
28+
"libpass>=1.9.0",
29+
"markupsafe>=2.1.5",
30+
"speaklater>=1.3",
31+
"zxcvbn>=4.4.28",
32+
]
33+
dynamic = ["version"]
34+
35+
[project.urls]
36+
Homepage = "https://github.com/inveniosoftware/flask-security-invenio"
37+
38+
[project.optional-dependencies]
39+
tests = [
40+
"bcrypt>=3.1.0,<5.0.0",
41+
"check-manifest>=0.42",
42+
"coverage>=5.3,<6",
43+
"Flask-Sphinx-Themes>=1.0.2",
44+
"Flask-SQLAlchemy>=2.5.1",
45+
"mock>=1.3.0",
46+
"msgcheck>=2.9",
47+
"pytest-black-ng>=0.4.0",
48+
"pytest-cov>=2.10.1",
49+
"pytest-flask>=1.0.0",
50+
"pytest-isort>=1.2.0",
51+
"pytest-pycodestyle>=2.2.0",
52+
"pytest-pydocstyle>=2.2.0",
53+
"pytest>=6,<9",
54+
"sphinx>=4.2.0",
55+
]
56+
157
[build-system]
2-
requires = ["setuptools", "wheel", "babel>2.8"]
3-
build-backend = "setuptools.build_meta"
58+
requires = ["hatchling"]
59+
build-backend = "hatchling.build"
60+
61+
[tool.hatch.version]
62+
path = "flask_security/__init__.py"
63+
64+
[tool.hatch.build.targets.wheel]
65+
packages = [
66+
"/flask_security",
67+
]
68+
69+
[tool.hatch.build.targets.sdist]
70+
include = [
71+
"/flask_security",
72+
]
73+
74+
[tool.isort]
75+
profile = "black"
76+
77+
[tool.pydocstyle]
78+
add_ignore = "D401"
79+
80+
[tool.pytest.ini_options]
81+
addopts = '--black --isort --pydocstyle --doctest-glob="*.rst" --doctest-modules --cov=flask_security --cov-report=term-missing'
82+
testpaths = "tests flask_security"
83+
live_server_scope = "module"

run-tests.sh

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,6 @@ set -o errexit
1313
# Quit on unbound symbols
1414
set -o nounset
1515

16-
python -m check_manifest --ignore ".*-requirements.txt"
1716
python -m sphinx.cmd.build -qnN docs docs/_build/html
1817
python -m pytest
1918
tests_exit_code=$?

setup.cfg

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

setup.py

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

0 commit comments

Comments
 (0)