git: 7c4509b54033 - main - databases/py-flask-sqlalchemy: Update to 3.0.0

From: Po-Chuan Hsieh <sunpoet_at_FreeBSD.org>
Date: Sun, 09 Oct 2022 15:39:44 UTC
The branch main has been updated by sunpoet:

URL: https://cgit.FreeBSD.org/ports/commit/?id=7c4509b54033bb39dcd3dc63c216c113a9de966b

commit 7c4509b54033bb39dcd3dc63c216c113a9de966b
Author:     Po-Chuan Hsieh <sunpoet@FreeBSD.org>
AuthorDate: 2022-10-09 15:32:01 +0000
Commit:     Po-Chuan Hsieh <sunpoet@FreeBSD.org>
CommitDate: 2022-10-09 15:37:53 +0000

    databases/py-flask-sqlalchemy: Update to 3.0.0
    
    - Update WWW
    
    Changes:        https://github.com/pallets-eco/flask-sqlalchemy/releases
                    https://github.com/pallets-eco/flask-sqlalchemy/blob/main/CHANGES.rst
---
 databases/py-flask-sqlalchemy/Makefile       | 15 ++++++----
 databases/py-flask-sqlalchemy/distinfo       |  6 ++--
 databases/py-flask-sqlalchemy/files/setup.py | 43 ++++++++++++++++++++++++++++
 3 files changed, 55 insertions(+), 9 deletions(-)

diff --git a/databases/py-flask-sqlalchemy/Makefile b/databases/py-flask-sqlalchemy/Makefile
index 3385cf2c7d45..d00d15c83a49 100644
--- a/databases/py-flask-sqlalchemy/Makefile
+++ b/databases/py-flask-sqlalchemy/Makefile
@@ -1,6 +1,5 @@
 PORTNAME=	flask-sqlalchemy
-PORTVERSION=	2.5.1
-PORTREVISION=	1
+PORTVERSION=	3.0.0
 CATEGORIES=	databases python
 MASTER_SITES=	CHEESESHOP
 PKGNAMEPREFIX=	${PYTHON_PKGNAMEPREFIX}
@@ -8,17 +7,21 @@ DISTNAME=	Flask-SQLAlchemy-${PORTVERSION}
 
 MAINTAINER=	sunpoet@FreeBSD.org
 COMMENT=	Add SQLAlchemy support to your Flask application
-WWW=		https://github.com/pallets/flask-sqlalchemy
+WWW=		https://github.com/pallets-eco/flask-sqlalchemy
 
 LICENSE=	BSD3CLAUSE
 LICENSE_FILE=	${WRKSRC}/LICENSE.rst
 
-RUN_DEPENDS=	${PYTHON_PKGNAMEPREFIX}Flask>=0.10:www/py-flask@${PY_FLAVOR} \
-		${PYTHON_PKGNAMEPREFIX}sqlalchemy14>=0.8:databases/py-sqlalchemy14@${PY_FLAVOR}
+RUN_DEPENDS=	${PYTHON_PKGNAMEPREFIX}Flask>=2.2:www/py-flask@${PY_FLAVOR} \
+		${PYTHON_PKGNAMEPREFIX}sqlalchemy14>=1.4.18:databases/py-sqlalchemy14@${PY_FLAVOR}
 
-USES=		python:3.6+
+USES=		python:3.7+
 USE_PYTHON=	autoplist concurrent distutils
 
 NO_ARCH=	yes
+TEST_ENV=	PYTHONPATH=${STAGEDIR}${PYTHON_SITELIBDIR}
+
+post-patch:
+	@${SED} -e 's|%%PORTVERSION%%|${PORTVERSION}|' ${FILESDIR}/setup.py > ${WRKSRC}/setup.py
 
 .include <bsd.port.mk>
diff --git a/databases/py-flask-sqlalchemy/distinfo b/databases/py-flask-sqlalchemy/distinfo
index de44997cab45..48472b4af2d4 100644
--- a/databases/py-flask-sqlalchemy/distinfo
+++ b/databases/py-flask-sqlalchemy/distinfo
@@ -1,3 +1,3 @@
-TIMESTAMP = 1618320096
-SHA256 (Flask-SQLAlchemy-2.5.1.tar.gz) = 2bda44b43e7cacb15d4e05ff3cc1f8bc97936cc464623424102bfc2c35e95912
-SIZE (Flask-SQLAlchemy-2.5.1.tar.gz) = 132750
+TIMESTAMP = 1665073114
+SHA256 (Flask-SQLAlchemy-3.0.0.tar.gz) = b54939fd5f48184742b7d5b222d86983e233b43140c1071a36327353e86f3b56
+SIZE (Flask-SQLAlchemy-3.0.0.tar.gz) = 127234
diff --git a/databases/py-flask-sqlalchemy/files/setup.py b/databases/py-flask-sqlalchemy/files/setup.py
new file mode 100644
index 000000000000..355572601882
--- /dev/null
+++ b/databases/py-flask-sqlalchemy/files/setup.py
@@ -0,0 +1,43 @@
+# -*- coding: utf-8 -*-
+from setuptools import setup
+
+import codecs
+
+with codecs.open('README.rst', encoding="utf-8") as fp:
+    long_description = fp.read()
+INSTALL_REQUIRES = [
+    'Flask>=2.2',
+    'SQLAlchemy>=1.4.18',
+]
+
+setup_kwargs = {
+    'name': 'Flask-SQLAlchemy',
+    'version': '%%PORTVERSION%%',
+    'description': 'Add SQLAlchemy support to your Flask application.',
+    'long_description': long_description,
+    'license': 'BSD-3-Clause',
+    'author': '',
+    'author_email': 'Armin Ronacher <armin.ronacher@active-4.com>',
+    'maintainer': '',
+    'maintainer_email': 'Pallets <contact@palletsprojects.com>',
+    'url': '',
+    'packages': [
+        'flask_sqlalchemy',
+    ],
+    'package_dir': {'': 'src'},
+    'package_data': {'': ['*']},
+    'long_description_content_type': 'text/x-rst',
+    'classifiers': [
+        'Development Status :: 5 - Production/Stable',
+        'Environment :: Web Environment',
+        'Intended Audience :: Developers',
+        'License :: OSI Approved :: BSD License',
+        'Operating System :: OS Independent',
+        'Programming Language :: Python',
+        'Topic :: Internet :: WWW/HTTP :: Dynamic Content',
+    ],
+    'install_requires': INSTALL_REQUIRES,
+    'python_requires': '>=3.7',
+}
+
+setup(**setup_kwargs)