Skip to content

Commit

Permalink
Convert distribution build to 'build' (#819)
Browse files Browse the repository at this point in the history
This removes all use of setup.py and setup.cfg. (translation commands are now in tox).
This also got rid of requiremets_low - which always caused issues with dependabot...
  • Loading branch information
jwag956 committed Jul 21, 2023
1 parent bf59f63 commit 2750b9a
Show file tree
Hide file tree
Showing 37 changed files with 2,477 additions and 2,295 deletions.
1 change: 0 additions & 1 deletion .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,6 @@ jobs:
python-version: "3.9"
- name: update pip
run: |
pip install -U wheel setuptools twine
python -m pip install -U pip
- name: Create dist
run: |
Expand Down
8 changes: 2 additions & 6 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -39,13 +39,12 @@ jobs:
python-version: ${{ matrix.python }}
- name: update pip
run: |
pip install -U wheel setuptools
python -m pip install -U pip
- name: cache pip
uses: actions/cache@v3
with:
path: ~/.cache/pip
key: pip-${{ runner.os }}-${{ matrix.tox }}-${{ hashFiles('setup.py') }}-${{ hashFiles('tox.ini') }}-${{ hashFiles('requirements/*.txt') }}-${{ hashFiles('requirements_low/*.txt') }}
key: pip-${{ runner.os }}-${{ matrix.tox }}-${{ hashFiles('pyproject.toml') }}-${{ hashFiles('tox.ini') }}-${{ hashFiles('requirements/*.txt') }}
- name: run tests
run: |
pip install tox
Expand All @@ -60,7 +59,6 @@ jobs:
python-version: "3.9"
- name: update pip
run: |
pip install -U wheel setuptools
python -m pip install -U pip
- name: Style, docs, mypy
run: |
Expand All @@ -79,7 +77,6 @@ jobs:
python-version: "3.9"
- name: update pip
run: |
pip install -U wheel setuptools
python -m pip install -U pip
- name: Coverage
run: |
Expand Down Expand Up @@ -114,13 +111,12 @@ jobs:
python-version: "3.9"
- name: update pip
run: |
pip install -U wheel setuptools
python -m pip install -U pip
- name: cache pip
uses: actions/cache@v3
with:
path: ~/.cache/pip
key: pip-${{ runner.os }}-${{ hashFiles('setup.py') }}-${{ hashFiles('tox.ini') }}-${{ hashFiles('requirements/*.txt') }}
key: pip-${{ runner.os }}-${{ hashFiles('pyproject.toml') }}-${{ hashFiles('tox.ini') }}-${{ hashFiles('requirements/*.txt') }}
- name: Postgres
run: |
pip install tox
Expand Down
2 changes: 1 addition & 1 deletion .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ repos:
- flake8-bugbear
- flake8-implicit-str-concat
- repo: https://github.com/Riverside-Healthcare/djLint
rev: v1.32.0
rev: v1.32.1
hooks:
- id: djlint-jinja
files: "\\.html"
Expand Down
101 changes: 0 additions & 101 deletions .travis.yml

This file was deleted.

3 changes: 2 additions & 1 deletion CHANGES.rst
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,8 @@ Fixes
'session' as authentication-method. (N247S)
- (:issue:`814`) /reset and /confirm and GENERIC_RESPONSES and additional form args don't mix.
- (:issue:`281`) Reset password can be exploited and other OWASP improvements.
- (:pr:`xxx`) Confirmation can be exploited and other OWASP improvements.
- (:pr:`817`) Confirmation can be exploited and other OWASP improvements.
- (:pr:`xxx`) Convert to pyproject.toml, build, remove setup.

Backwards Compatibility Concerns
+++++++++++++++++++++++++++++++++
Expand Down
9 changes: 5 additions & 4 deletions CONTRIBUTING.rst
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,8 @@ these steps:
#. When done, verify unit tests, syntax etc. all pass::

$ pip install -r requirements/tests.txt
$ python setup.py build_sphinx compile_catalog
$ sphinx-build docs docs/_build/html
$ tox -e compile_catalog
$ pytest tests
$ pre-commit run --all-files

Expand Down Expand Up @@ -130,9 +131,9 @@ Updating Translations
If you change any translatable strings (such as new messages, modified forms, etc.)
you need to re-generate the translations::

$ python setup.py extract_messages
$ python setup.py update_catalog
$ python setup.py compile_catalog
$ tox -e extract_messages
$ tox -e update_catalog
$ tox -e compile_catalog

Testing
-------
Expand Down
2 changes: 1 addition & 1 deletion MANIFEST.in
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ include pytest.ini
include tox.ini
include requirements/*.txt
include flask_security/py.typed
graft examples
graft docs
graft flask_security/templates
graft flask_security/translations
Expand All @@ -20,5 +21,4 @@ recursive-exclude tests/.pytest_cache *
exclude .coverage tests/.coverage
prune docs/_build
prune scripts
prune examples
global-exclude *.pyc
6 changes: 2 additions & 4 deletions docs/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@
import sys

from pallets_sphinx_themes import ProjectLink
from pallets_sphinx_themes import get_version

# If extensions (or modules to document with autodoc) are in another directory,
# add these directories to sys.path here. If the directory is relative to the
Expand Down Expand Up @@ -56,10 +57,7 @@
# |version| and |release|, also used in various other places throughout the
# built documents.
#
# The short X.Y version.
version = "5.3.0"
# The full version, including alpha/beta/rc tags.
release = version
release, version = get_version("Flask-Security-Too")

# The language for content autogenerated by Sphinx. Refer to documentation
# for a list of supported languages.
Expand Down
Loading

0 comments on commit 2750b9a

Please sign in to comment.