Skip to content

Commit 8d55bf1

Browse files
max-moserSamk13
andcommitted
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 7742765 commit 8d55bf1

10 files changed

Lines changed: 92 additions & 154 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

.tx/config

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,9 +6,9 @@
66

77
#
88
# 1) Create message catalog:
9-
# $ python setup.py extract_messages
10-
# $ python setup.py init_catalog -l <lang>
11-
# $ python setup.py compile_catalog
9+
# $ pybabel extract -F pyproject.toml -o flask_security_fork/translations/messages.pot flask_security_fork
10+
# $ pybabel init -i flask_security_fork/translations/messages.pot -d flask_security_fork/translations -l <lang>
11+
# $ pybabel compile -d flask_security_fork/translations --use-fuzzy
1212
# 2) Ensure project has been created on Transifex under the inveniosoftware
1313
# organisation.
1414
# 3) Install the transifex-client

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