Skip to content

Commit

Permalink
setup: move to setup.cfg
Browse files Browse the repository at this point in the history
  • Loading branch information
utnapischtim committed Dec 12, 2024
1 parent 9392e39 commit 95b3cbd
Show file tree
Hide file tree
Showing 9 changed files with 83 additions and 185 deletions.
11 changes: 11 additions & 0 deletions .github/workflows/pypi-publish.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
name: Publish

on:
push:
tags:
- v*

jobs:
Publish:
uses: inveniosoftware/workflows/.github/workflows/pypi-publish.yml@master
secrets: inherit
23 changes: 0 additions & 23 deletions .travis.yml

This file was deleted.

1 change: 1 addition & 0 deletions MANIFEST.in
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
include README.rst
include CHANGES.rst
include LICENSE
exclude tests/*
85 changes: 2 additions & 83 deletions README.rst
Original file line number Diff line number Diff line change
@@ -1,85 +1,4 @@
Flask-OAuthlib
Flask-OAuthlib-Invenio
==============

.. image:: https://img.shields.io/badge/donate-lepture-green.svg
:target: https://lepture.com/donate
:alt: Donate lepture
.. image:: https://img.shields.io/pypi/wheel/flask-oauthlib.svg
:target: https://pypi.python.org/pypi/flask-OAuthlib/
:alt: Wheel Status
.. image:: https://img.shields.io/pypi/v/flask-oauthlib.svg
:target: https://pypi.python.org/pypi/flask-oauthlib/
:alt: Latest Version
.. image:: https://travis-ci.org/lepture/flask-oauthlib.svg?branch=master
:target: https://travis-ci.org/lepture/flask-oauthlib
:alt: Travis CI Status
.. image:: https://coveralls.io/repos/lepture/flask-oauthlib/badge.svg?branch=master
:target: https://coveralls.io/r/lepture/flask-oauthlib
:alt: Coverage Status


Notice
------

**You SHOULD use https://github.com/lepture/authlib instead**.

Flask-OAuthlib is an extension to Flask that allows you to interact with
remote OAuth enabled applications. On the client site, it is a replacement
for Flask-OAuth. But it does more than that, it also helps you to create
OAuth providers.

Flask-OAuthlib relies on oauthlib_.

.. _oauthlib: https://github.com/idan/oauthlib


Sponsored by
------------

If you want to quickly add secure authentication to Flask, feel free to
check out Auth0's Python API SDK and free plan at `auth0.com/developers`_
|auth0 image|

.. _`auth0.com/developers`: https://auth0.com/developers?utm_source=GHsponsor&utm_medium=GHsponsor&utm_campaign=flask-oauthlib&utm_content=auth

.. |auth0 image| image:: https://user-images.githubusercontent.com/290496/31718461-031a6710-b44b-11e7-80f8-7c5920c73b8f.png
:target: https://auth0.com/developers?utm_source=GHsponsor&utm_medium=GHsponsor&utm_campaign=flask-oauthlib&utm_content=auth
:alt: Coverage Status
:width: 18px
:height: 18px


Features
--------

- Support for OAuth 1.0a, 1.0, 1.1, OAuth2 client
- Friendly API (same as Flask-OAuth)
- Direct integration with Flask
- Basic support for remote method invocation of RESTful APIs
- Support OAuth1 provider with HMAC and RSA signature
- Support OAuth2 provider with Bearer token


Security Reporting
------------------

If you found security bugs which can not be public, send me email at `[email protected]`.
Attachment with patch is welcome.


Installation
------------

Installing flask-oauthlib is simple with pip::

$ pip install Flask-OAuthlib

There is also a `development version <https://github.com/lepture/flask-oauthlib/archive/master.zip#egg=Flask-OAuthlib-dev>`_ on GitHub.


Links
-----

- Documentation: https://flask-oauthlib.readthedocs.io
- PyPI: https://pypi.org/project/Flask-OAuthlib/
- Client Examples: https://github.com/lepture/flask-oauthlib/tree/master/example
WARNING: This is a private fork of Flask-OAuthlib used for Invenio. Please follow the notes of `Flask-OAuthlib <https://github.com/lepture/flask-oauthlib>`_ instead.
3 changes: 2 additions & 1 deletion flask_oauthlib/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,11 @@
OAuth servers.
:copyright: (c) 2013 by Hsiaoming Yang.
:copyright: (c) Graz University of Technology
:license: BSD, see LICENSE for more details.
"""

__version__ = "0.9.6"
__author__ = "Hsiaoming Yang <[email protected]>"
__homepage__ = 'https://github.com/lepture/flask-oauthlib'
__homepage__ = 'https://github.com/inveniosoftware/flask-oauthlib-invenio'
__license__ = 'BSD'
4 changes: 4 additions & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
[build-system]
requires = ["setuptools", "wheel", "babel>2.8"]
build-backend = "setuptools.build_meta"

61 changes: 61 additions & 0 deletions setup.cfg
Original file line number Diff line number Diff line change
@@ -0,0 +1,61 @@
# -*- coding: utf-8 -*-
#
# This file is part of Invenio.
# Copyright (C) 2024 CERN.
# Copyright (C) 2024 Graz University of Technology.
#
# Flask-OAuthlib is free software; you can redistribute it and/or modify it
# under the terms of the BSD 3 Clause License; see LICENSE file for more details.

[metadata]
name = Flask-OAuthlib-Invenio
version = attr: flask_oauthlib.__version__
description = OAuthlib for Flask.
long_description = file: README.rst
keywords = flask OAuth2
license = BSD
author = flask_oauthlib.__author__
author_email = flask_oauthlib.__email__
platforms = any
url = https://github.com/inveniosoftware/flask-oauthlib-invenio
classifiers =
Development Status :: 5 - Production/Stable

[options]
include_package_data = True
packages = find:
python_requires = >=3.9
zip_safe = False
install_requires =
Flask>=3.0
cachelib>=0.13.0
oauthlib>=3.0.0
requests-oauthlib>=1.0

[options.extras_require]
tests =
pytest-black-ng>=0.4.0
pytest-invenio>=3.0.0,<4.0.0
mock>=5.1.0

[build_sphinx]
source-dir = docs/
build-dir = docs/_build
all_files = 1

[bdist_wheel]
universal = 1

[pydocstyle]
add_ignore = D401

[isort]
profile=black

[check-manifest]
ignore =
*-requirements.txt

[tool:pytest]
addopts = --black --isort --pydocstyle --doctest-glob="*.rst" --doctest-modules --cov=flask_oauthlib --cov-report=term-missing
testpaths = tests flask_oauthlib
72 changes: 2 additions & 70 deletions setup.py
Original file line number Diff line number Diff line change
@@ -1,74 +1,6 @@
#!/usr/bin/env python
# -*- coding: utf-8 -*-

from setuptools import setup

try:
import multiprocessing
except ImportError:
pass

try:
from setuptools import setup
except ImportError:
from distutils.core import setup

from email.utils import parseaddr
import flask_oauthlib

author, author_email = parseaddr(flask_oauthlib.__author__)


def fread(filename):
with open(filename) as f:
return f.read()


setup(
name='Flask-OAuthlib',
version=flask_oauthlib.__version__,
author=author,
author_email=author_email,
url=flask_oauthlib.__homepage__,
packages=[
"flask_oauthlib",
"flask_oauthlib.provider",
"flask_oauthlib.contrib",
"flask_oauthlib.contrib.client",
],
description="OAuthlib for Flask",
zip_safe=False,
include_package_data=True,
platforms='any',
long_description=fread('README.rst'),
license='BSD',
install_requires=[
'Flask',
'oauthlib>=3.0.0,<3.2.2',
'requests-oauthlib>=1.0,<1.3.1',
'cachelib',
],
tests_require=['nose', 'Flask-SQLAlchemy', 'mock'],
test_suite='nose.collector',
classifiers=[
'Development Status :: 4 - Beta',
'Environment :: Web Environment',
'Intended Audience :: Developers',
'License :: OSI Approved',
'License :: OSI Approved :: BSD License',
'Operating System :: MacOS',
'Operating System :: POSIX',
'Operating System :: POSIX :: Linux',
'Programming Language :: Python',
'Programming Language :: Python :: 2.6',
'Programming Language :: Python :: 2.7',
'Programming Language :: Python :: 3.3',
'Programming Language :: Python :: 3.4',
'Programming Language :: Python :: 3.5',
'Programming Language :: Python :: 3.6',
'Programming Language :: Python :: Implementation',
'Programming Language :: Python :: Implementation :: CPython',
'Programming Language :: Python :: Implementation :: PyPy',
'Topic :: Internet :: WWW/HTTP :: Dynamic Content',
'Topic :: Software Development :: Libraries :: Python Modules',
]
)
setup()
8 changes: 0 additions & 8 deletions tox.ini

This file was deleted.

0 comments on commit 95b3cbd

Please sign in to comment.