From nobody Sat Jan 29 06:55:08 2022 X-Original-To: dev-commits-ports-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 9A3FE198C0DE; Sat, 29 Jan 2022 06:55:08 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Jm4p43pBLz3HDF; Sat, 29 Jan 2022 06:55:08 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1643439308; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=WdQkEXCGHERXmqJ/qCRuYpWrf7TK739HZjuEjNIX/Mk=; b=R38loNSLmC3wpZiSQpcghtgU5R4gE4yG7cy3cLeZT/X0dpdHtju7WYEDtBS456+JVtdoAa 7QHUdBtUwZeOCvGMjwbzvdxjBdfV2FhjGPe/x9d/hAmJK9D+josht9Zui4RehbezxQuz2N a5d43exXI2TfY9k//fqn1M6k4LFeEBjcZJ7eCrT6QyUjCV7xGMbO9UZ2yMGomgZhRpyxvs 3H7wDx0bjJtGQtjWxbwoqV1rcXbvUpHGE4Ducb19SvNL2uVTjtP7tAmtkFvFrhl7v+Bhhe TOO/rJDqVvofNDbEOf8tYsTwW56+N02/vfWX6ky6QJSW2elkTXQrhMYbJbtd/w== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 5C36111889; Sat, 29 Jan 2022 06:55:08 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 20T6t8wp096765; Sat, 29 Jan 2022 06:55:08 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 20T6t8K4096764; Sat, 29 Jan 2022 06:55:08 GMT (envelope-from git) Date: Sat, 29 Jan 2022 06:55:08 GMT Message-Id: <202201290655.20T6t8K4096764@gitrepo.freebsd.org> To: ports-committers@FreeBSD.org, dev-commits-ports-all@FreeBSD.org, dev-commits-ports-main@FreeBSD.org From: Hiroki Tagato Subject: git: 5397c5e80dab - main - www/py-fastapi-users: add port: Ready-to-use and customizable users management for FastAPI List-Id: Commit messages for all branches of the ports repository List-Archive: https://lists.freebsd.org/archives/dev-commits-ports-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-ports-all@freebsd.org X-BeenThere: dev-commits-ports-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: tagattie X-Git-Repository: ports X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 5397c5e80dab3825d0edaa31746adcea47aa361a Auto-Submitted: auto-generated ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1643439308; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=WdQkEXCGHERXmqJ/qCRuYpWrf7TK739HZjuEjNIX/Mk=; b=QPLBoObvmyQN2ufaALAc3HJVBJr0rwObaCDDa/e+l6l8LHd9kiaV88GPbWGCaLfUOq38rS Umv/joOcmD5RaEetYW+lePsqQsoNYjH7rjSK5HZ3/rBCJEVqJk73FbK7DrSQueOXZ87fiQ fb8qGkDCwty5sqHORZWunFoIgOgVML7oYxKZRrOimH6wfk68wa3pHcSnB1X0KIPz5ieel8 mX5FL9TziEjF/jYWXf9In9Njetz/kgSQMMoQFJcVyUwdOv88cEBwT8OeTwT2vB1weNeGUL 9VtFZiIaxCJtTWKv3bx3qdhC+M2XDIGM2a7WtXq6UC8Dnt2jzMMhTz5zMHn+kA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1643439308; a=rsa-sha256; cv=none; b=ICttRd4xOtX0Xd/ZF5/Bj0Or8XpxS7jjjgtmVh1w9is83TjJVFO1fAuQIYgHuzfmNHweIb CU7K0V7EUE1OG2CoEuTttzX2LEtzPgaFlzj3z1Cpn3sNQABoMLSUkirIhgd1hGqxY65MT6 L8gVtKQbyTCU6T1GmqDsvfNyU0OZRRenSdWAhCFkeYSB1HqwfE24L9ClJuI7KJXl/7jePj uSUBJdyddKlWB6vEQvC+N29CO70tAbx7pXDu9vSNyuqn+/682EZcubEZxqEpyNfFkbv5/C 4jlspF0XrGVtExtY3Z+oagCsUyrGYYlR4aw9KYPJIM7ibCJZm80fhfSnycqK6Q== ARC-Authentication-Results: i=1; mx1.freebsd.org; none X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by tagattie: URL: https://cgit.FreeBSD.org/ports/commit/?id=5397c5e80dab3825d0edaa31746adcea47aa361a commit 5397c5e80dab3825d0edaa31746adcea47aa361a Author: Goran Mekić AuthorDate: 2022-01-29 06:52:38 +0000 Commit: Hiroki Tagato CommitDate: 2022-01-29 06:54:40 +0000 www/py-fastapi-users: add port: Ready-to-use and customizable users management for FastAPI Add quickly a registration and authentication system to your FastAPI project. FastAPI Users is designed to be as customizable and adaptable as possible. Features: * Extensible base user model * Ready-to-use register, login, reset password and verify e-mail routes * Ready-to-use social OAuth2 login flow * Dependency callables to inject current user in route * Pluggable password validation * Customizable database backend * SQLAlchemy async backend included thanks to encode/databases * MongoDB async backend included thanks to mongodb/motor * Tortoise ORM backend included * ormar backend included * Multiple customizable authentication backends * JWT authentication backend included * Cookie authentication backend included * Full OpenAPI schema support, even with several authentication backends WWW: https://github.com/fastapi-users/fastapi-users PR: 257369 Reported by: Goran Mekić (new maintainer) Reviewed by: koobs --- www/Makefile | 1 + www/py-fastapi-users/Makefile | 61 +++++++++++++++++++++++++++++++ www/py-fastapi-users/distinfo | 3 ++ www/py-fastapi-users/files/patch-setup.py | 52 ++++++++++++++++++++++++++ www/py-fastapi-users/pkg-descr | 19 ++++++++++ 5 files changed, 136 insertions(+) diff --git a/www/Makefile b/www/Makefile index 1993f1baa630..b473b4e9f8b1 100644 --- a/www/Makefile +++ b/www/Makefile @@ -1589,6 +1589,7 @@ SUBDIR += py-fake-useragent SUBDIR += py-falcon SUBDIR += py-fastapi + SUBDIR += py-fastapi-users SUBDIR += py-feedgenerator SUBDIR += py-flask SUBDIR += py-flask-admin diff --git a/www/py-fastapi-users/Makefile b/www/py-fastapi-users/Makefile new file mode 100644 index 000000000000..afea11aa4333 --- /dev/null +++ b/www/py-fastapi-users/Makefile @@ -0,0 +1,61 @@ +PORTNAME= fastapi-users +PORTVERSION= 9.2.2 +CATEGORIES= www devel python +MASTER_SITES= CHEESESHOP +PKGNAMEPREFIX= ${PYTHON_PKGNAMEPREFIX} + +MAINTAINER= meka@tilda.center +COMMENT= Ready-to-use and customizable users management for FastAPI + +LICENSE= MIT +LICENSE_FILE= ${WRKSRC}/LICENSE + +RUN_DEPENDS= ${PYTHON_PKGNAMEPREFIX}bcrypt>=3.1.0:security/py-bcrypt@${PY_FLAVOR} \ + ${PYTHON_PKGNAMEPREFIX}email-validator>=1.1.0,<1.2:mail/py-email-validator@${PY_FLAVOR} \ + ${PYTHON_PKGNAMEPREFIX}fastapi>=0.65.2,<0.71.0:www/py-fastapi@${PY_FLAVOR} \ + ${PYTHON_PKGNAMEPREFIX}makefun>=1.11.2,<1.14:devel/py-makefun@${PY_FLAVOR} \ + ${PYTHON_PKGNAMEPREFIX}passlib>=0:security/py-passlib@${PY_FLAVOR} \ + ${PYTHON_PKGNAMEPREFIX}pyjwt>=2.1.0:www/py-pyjwt@${PY_FLAVOR} \ + ${PYTHON_PKGNAMEPREFIX}python-multipart>=0.0.5:www/py-python-multipart@${PY_FLAVOR} +TEST_DEPENDS= ${PYTHON_PKGNAMEPREFIX}asynctest>=0:devel/py-asynctest@${PY_FLAVOR} \ + ${PYTHON_PKGNAMEPREFIX}httpx-oauth>=0:www/py-httpx-oauth@${PY_FLAVOR} \ + ${PYTHON_PKGNAMEPREFIX}ormar>=0.9.5,<0.11.0:databases/py-ormar@${PY_FLAVOR} \ + ${PYTHON_PKGNAMEPREFIX}pymongo>=0:databases/pymongo@${PY_FLAVOR} \ + ${PYTHON_PKGNAMEPREFIX}pytest-asyncio>=0:devel/py-pytest-asyncio@${PY_FLAVOR} \ + ${PYTHON_PKGNAMEPREFIX}pytest>=0:devel/py-pytest@${PY_FLAVOR} + +# Tests will need ${PYTHON_PKGNAMEPREFIX}asgi-lifespan>=0:devel/py-asgi-lifespan@${PY_FLAVOR} + +USES= python:3.7+ +USE_PYTHON= autoplist distutils + +TEST_ENV= PYTHONPATH=${WRKSRC}/src + +NO_ARCH= yes + +OPTIONS_DEFINE= OAUTH +OPTIONS_GROUP= DATABASES +OPTIONS_GROUP_DATABASES= ORMAR SQLALCHEMY +OPTIONS_DEFAULT= ORMAR +DATABASES_DESC= Database Support + +OAUTH_DESC= Authentication support via OAuth +ORMAR_DESC= Support for SQL database through Ormar +SQLALCHEMY_DESC= Support for SQL database through SQLAlchemy + +OAUTH_RUN_DEPENDS= ${PYTHON_PKGNAMEPREFIX}httpx-oauth>=0.3,<0.4:www/py-httpx-oauth@${PY_FLAVOR} +ORMAR_RUN_DEPENDS= ${PYTHON_PKGNAMEPREFIX}ormar>=0.9.5,<0.11.0:databases/py-ormar@${PY_FLAVOR} +SQLALCHEMY_RUN_DEPENDS= ${PYTHON_PKGNAMEPREFIX}databases>=0.3.0,<0.5:databases/py-databases@${PY_FLAVOR} \ + ${PYTHON_PKGNAMEPREFIX}sqlalchemy14>=1.4.0:databases/py-sqlalchemy14@${PY_FLAVOR} + +# Tests require tortoise and newer motor +# do-test: + # cd ${WRKSRC} && ${SETENV} ${TEST_ENV} ${PYTHON_CMD} -m pytest -v -rs -o addopts= + +.include + +.if ${PYTHON_REL} < 30800 +RUN_DEPENDS+= ${PYTHON_PKGNAMEPREFIX}typing-extensions>=3.7.4.3:devel/py-typing-extensions@${PY_FLAVOR} +.endif + +.include diff --git a/www/py-fastapi-users/distinfo b/www/py-fastapi-users/distinfo new file mode 100644 index 000000000000..7343f4599267 --- /dev/null +++ b/www/py-fastapi-users/distinfo @@ -0,0 +1,3 @@ +TIMESTAMP = 1643064924 +SHA256 (fastapi-users-9.2.2.tar.gz) = 59febb9302dd0590b6992343896437bd1941ec4c6726bf5abf9093d681a98f23 +SIZE (fastapi-users-9.2.2.tar.gz) = 103649 diff --git a/www/py-fastapi-users/files/patch-setup.py b/www/py-fastapi-users/files/patch-setup.py new file mode 100644 index 000000000000..c56e9fe3c2d1 --- /dev/null +++ b/www/py-fastapi-users/files/patch-setup.py @@ -0,0 +1,52 @@ +--- setup.py.orig 2022-01-24 23:01:58 UTC ++++ setup.py +@@ -0,0 +1,49 @@ ++#!/usr/bin/env python ++# setup.py generated by flit for tools that don't yet use PEP 517 ++ ++from distutils.core import setup ++ ++packages = [ ++ "fastapi_users", ++ "fastapi_users.authentication", ++ "fastapi_users.authentication.strategy", ++ "fastapi_users.authentication.strategy.db", ++ "fastapi_users.authentication.transport", ++ "fastapi_users.db", ++ "fastapi_users.router", ++] ++ ++package_data = {"": ["*"]} ++ ++install_requires = [ ++ "fastapi >=0.65.2,<0.72.0", ++ "passlib[bcrypt] ==1.7.4", ++ "email-validator >=1.1.0,<1.2", ++ "pyjwt ==2.3.0", ++ "python-multipart ==0.0.5", ++ "makefun >=1.11.2,<1.14", ++] ++ ++extras_require = { ++ "mongodb": ["fastapi-users-db-mongodb >=1.1.0"], ++ "oauth": ["httpx-oauth >=0.4,<0.5"], ++ "ormar": ["fastapi-users-db-ormar >=1.0.0"], ++ "redis": ["aioredis >=2.0.1,<2.1.0", "hiredis >=2.0.0,<2.1.0"], ++ "sqlalchemy": ["fastapi-users-db-sqlalchemy >=1.1.0,<2.0.0"], ++ "sqlalchemy2": ["fastapi-users-db-sqlalchemy >=2.0.0"], ++ "tortoise-orm": ["fastapi-users-db-tortoise >=1.1.0"], ++} ++ ++setup( ++ name="fastapi-users", ++ version="9.2.2", ++ description="Ready-to-use and customizable users management for FastAPI.", ++ author="François Voron", ++ author_email="fvoron@gmail.com", ++ url="https://github.com/fastapi-users/fastapi-users", ++ packages=packages, ++ package_data=package_data, ++ install_requires=install_requires, ++ extras_require=extras_require, ++ python_requires=">=3.7", ++) diff --git a/www/py-fastapi-users/pkg-descr b/www/py-fastapi-users/pkg-descr new file mode 100644 index 000000000000..74857534c461 --- /dev/null +++ b/www/py-fastapi-users/pkg-descr @@ -0,0 +1,19 @@ +Add quickly a registration and authentication system to your FastAPI project. +FastAPI Users is designed to be as customizable and adaptable as possible. +Features: + * Extensible base user model + * Ready-to-use register, login, reset password and verify e-mail routes + * Ready-to-use social OAuth2 login flow + * Dependency callables to inject current user in route + * Pluggable password validation + * Customizable database backend + * SQLAlchemy async backend included thanks to encode/databases + * MongoDB async backend included thanks to mongodb/motor + * Tortoise ORM backend included + * ormar backend included + * Multiple customizable authentication backends + * JWT authentication backend included + * Cookie authentication backend included + * Full OpenAPI schema support, even with several authentication backends + +WWW: https://github.com/fastapi-users/fastapi-users