Skip to content

Commit

Permalink
improved project structure #nolog
Browse files Browse the repository at this point in the history
  • Loading branch information
miguelgrinberg committed Jun 7, 2021
1 parent 14fb9d5 commit 6a4954b
Show file tree
Hide file tree
Showing 5 changed files with 42 additions and 50 deletions.
6 changes: 6 additions & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
[build-system]
requires = [
"setuptools>=42",
"wheel"
]
build-backend = "setuptools.build_meta"
28 changes: 28 additions & 0 deletions setup.cfg
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
[metadata]
name = Flask-HTTPAuth
version = 4.4.1.dev0
author = Miguel Grinberg
author_email = miguel.grinberg@gmail.com
description = HTTP authentication for Flask routes
long_description = file: README.md
long_description_content_type = text/markdown
url = https://github.com/miguelgrinberg/flask-httpauth
project_urls =
Bug Tracker = https://github.com/miguelgrinberg/flask-httpauth/issues
classifiers =
Environment :: Web Environment
Intended Audience :: Developers
Programming Language :: Python :: 3
Programming Language :: Python :: Implementation :: MicroPython
License :: OSI Approved :: MIT License
Operating System :: OS Independent

[options]
zip_safe = False
include_package_data = True
install_requires =
flask
package_dir =
= src
py_modules =
flask_httpauth
42 changes: 2 additions & 40 deletions setup.py
Original file line number Diff line number Diff line change
@@ -1,41 +1,3 @@
"""
Flask-HTTPAuth
--------------
import setuptools

Basic and Digest HTTP authentication for Flask routes.
"""
import re
from setuptools import setup

with open('flask_httpauth.py', 'r') as f:
version = re.search(r'^__version__\s*=\s*[\'"]([^\'"]*)[\'"]',
f.read(), re.MULTILINE).group(1)

setup(
name='Flask-HTTPAuth',
version=version,
url='http://github.com/miguelgrinberg/flask-httpauth/',
license='MIT',
author='Miguel Grinberg',
author_email='miguelgrinberg50@gmail.com',
description='Basic and Digest HTTP authentication for Flask routes',
long_description=__doc__,
py_modules=['flask_httpauth'],
zip_safe=False,
include_package_data=True,
platforms='any',
install_requires=[
'Flask'
],
test_suite="tests",
classifiers=[
'Environment :: Web Environment',
'Intended Audience :: Developers',
'License :: OSI Approved :: MIT License',
'Operating System :: OS Independent',
'Programming Language :: Python',
'Programming Language :: Python :: 3',
'Topic :: Internet :: WWW/HTTP :: Dynamic Content',
'Topic :: Software Development :: Libraries :: Python Modules'
]
)
setuptools.setup()
3 changes: 0 additions & 3 deletions flask_httpauth.py → src/flask_httpauth.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,9 +16,6 @@
from werkzeug.datastructures import Authorization


__version__ = '4.4.1dev'


class HTTPAuth(object):
def __init__(self, scheme=None, realm=None, header=None):
self.scheme = scheme
Expand Down
13 changes: 6 additions & 7 deletions tox.ini
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
[tox]
envlist=flake8,py36,py37,py38,py39,pypy3,docs,coverage
envlist=flake8,py36,py37,py38,py39,pypy3,docs
skip_missing_interpreters=True

[gh-actions]
Expand All @@ -14,18 +14,17 @@ python =

[testenv]
commands=
coverage run --branch --include=flask_httpauth.py setup.py test
coverage report --show-missing
coverage xml -o coverage.xml
coverage erase
pip install -e .
pytest -p no:logging --cov=src --cov-branch --cov-report=term-missing
deps=
coverage
pytest
pytest-cov

[testenv:flake8]
deps=
flake8
commands=
flake8 --exclude=".*" --ignore=E402 flask_httpauth.py tests examples
flake8 --exclude=".*" --ignore=E402 src/flask_httpauth.py tests examples

[testenv:docs]
changedir=docs
Expand Down

0 comments on commit 6a4954b

Please sign in to comment.