Skip to content

Commit

Permalink
replace setup.py with pyproject.toml (PEP 621) (#119)
Browse files Browse the repository at this point in the history
  • Loading branch information
m-bach authored Feb 13, 2024
1 parent 6db222d commit 9583fbc
Show file tree
Hide file tree
Showing 5 changed files with 52 additions and 65 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/workflow.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ jobs:
- name: 'Install Dependencies'
run: |
python -m pip install --upgrade pip
python -m pip install tox wheel
python -m pip install tox wheel build
- name: 'Run Tests (with coverage)'
run: tox
Expand All @@ -70,7 +70,7 @@ jobs:
- name: "Build Package 📦"
run: |
git describe --tags --exact-match > VERSION || true
python setup.py sdist bdist_wheel
python -m build
- uses: actions/upload-artifact@v4
# Only publish artifacts from Python latest build.
if: ${{ matrix.python-version == '3.11' }}
Expand Down
47 changes: 47 additions & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
[project]
name = "flask-ldap3-login"
dynamic = ["version"]
description = "LDAP Support for Flask"
authors = [
{name = "Nick Whyte", email = "[email protected]"},
]
dependencies = [
"Flask",
"Flask-wtf",
"WTForms>=1.0.2",
"ldap3>=2.0.7",
]
requires-python = ">=3.5"
readme = "README.rst"
license = {text = "MIT"}
classifiers = [
"Environment :: Web Environment",
"Framework :: Flask",
"Intended Audience :: Developers",
"Programming Language :: Python",
"Programming Language :: Python :: 3",
"Programming Language :: Python :: 3 :: Only",
"Programming Language :: Python :: 3.5",
"Programming Language :: Python :: 3.6",
"Programming Language :: Python :: 3.7",
]


[project.urls]
Homepage = "https://github.com/nickw444/flask-ldap3-login"

[build-system]
requires = ["setuptools"]
build-backend = "setuptools.build_meta"

[tool.setuptools]
packages = ["flask_ldap3_login"]

[tool.setuptools.dynamic]
version = {file = "VERSION"}

[tool.coverage.report]
fail_under = 80

[tool.coverage.run]
command_line = "-m unittest -v"
11 changes: 0 additions & 11 deletions setup.cfg

This file was deleted.

49 changes: 0 additions & 49 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 @@ -10,10 +10,10 @@ line_length=88

[testenv]
deps =
coverage
coverage[toml]
mock
commands =
coverage run setup.py test
coverage run
coverage xml

[testenv:lint]
Expand All @@ -22,7 +22,7 @@ skip_install = true
deps =
-r requirements-dev.txt
commands =
flake8 flask_ldap3_login flask_ldap3_login_tests setup.py ldap_app.py ldap_app_tls.py
flake8 flask_ldap3_login flask_ldap3_login_tests ldap_app.py ldap_app_tls.py

[testenv:docs]
allowlist_externals=make
Expand Down

0 comments on commit 9583fbc

Please sign in to comment.