git: 8d91d59e98e2 - main - databases/py-psycopg-c: Add py-psycopg-c 3.0.3

From: Po-Chuan Hsieh <sunpoet_at_FreeBSD.org>
Date: Sun, 21 Nov 2021 18:27:24 UTC
The branch main has been updated by sunpoet:

URL: https://cgit.FreeBSD.org/ports/commit/?id=8d91d59e98e21cafd8cfc1c3a918308205fe4db2

commit 8d91d59e98e21cafd8cfc1c3a918308205fe4db2
Author:     Po-Chuan Hsieh <sunpoet@FreeBSD.org>
AuthorDate: 2021-11-21 18:18:16 +0000
Commit:     Po-Chuan Hsieh <sunpoet@FreeBSD.org>
CommitDate: 2021-11-21 18:18:16 +0000

    databases/py-psycopg-c: Add py-psycopg-c 3.0.3
    
    PostgreSQL database adapter for Python - optimization package
    
    Psycopg 3 is a modern implementation of a PostgreSQL adapter for Python.
    
    WWW: https://www.psycopg.org/
    WWW: https://github.com/psycopg/psycopg/tree/master/psycopg_c
---
 databases/Makefile                           |  1 +
 databases/py-psycopg-c/Makefile              | 21 +++++++++++++++++++++
 databases/py-psycopg-c/distinfo              |  3 +++
 databases/py-psycopg-c/files/patch-setup.cfg | 11 +++++++++++
 databases/py-psycopg-c/pkg-descr             |  6 ++++++
 5 files changed, 42 insertions(+)

diff --git a/databases/Makefile b/databases/Makefile
index a29597513523..300377d10b46 100644
--- a/databases/Makefile
+++ b/databases/Makefile
@@ -799,6 +799,7 @@
     SUBDIR += py-postgresql
     SUBDIR += py-psycogreen
     SUBDIR += py-psycopg
+    SUBDIR += py-psycopg-c
     SUBDIR += py-psycopg2
     SUBDIR += py-psycopg2cffi
     SUBDIR += py-pum
diff --git a/databases/py-psycopg-c/Makefile b/databases/py-psycopg-c/Makefile
new file mode 100644
index 000000000000..3522533fe0ff
--- /dev/null
+++ b/databases/py-psycopg-c/Makefile
@@ -0,0 +1,21 @@
+# Created by: Po-Chuan Hsieh <sunpoet@FreeBSD.org>
+
+PORTNAME=	psycopg-c
+PORTVERSION=	3.0.3
+CATEGORIES=	databases python
+MASTER_SITES=	CHEESESHOP
+PKGNAMEPREFIX=	${PYTHON_PKGNAMEPREFIX}
+
+MAINTAINER=	sunpoet@FreeBSD.org
+COMMENT=	PostgreSQL database adapter for Python - C optimization distribution
+
+LICENSE=	LGPL3
+LICENSE_FILE=	${WRKSRC}/LICENSE.txt
+
+USES=		pgsql python:3.6+
+USE_PYTHON=	autoplist concurrent cython distutils
+
+post-install:
+	${FIND} ${STAGEDIR}${PYTHON_SITELIBDIR} -name '*.so' -exec ${STRIP_CMD} {} +
+
+.include <bsd.port.mk>
diff --git a/databases/py-psycopg-c/distinfo b/databases/py-psycopg-c/distinfo
new file mode 100644
index 000000000000..424b347869e9
--- /dev/null
+++ b/databases/py-psycopg-c/distinfo
@@ -0,0 +1,3 @@
+TIMESTAMP = 1637072884
+SHA256 (psycopg-c-3.0.3.tar.gz) = 310d2f2f945c43ae914ae8731b7df6e339412dd3e77805b0e7b45f3f6219b82c
+SIZE (psycopg-c-3.0.3.tar.gz) = 594671
diff --git a/databases/py-psycopg-c/files/patch-setup.cfg b/databases/py-psycopg-c/files/patch-setup.cfg
new file mode 100644
index 000000000000..8f2216c9cb38
--- /dev/null
+++ b/databases/py-psycopg-c/files/patch-setup.cfg
@@ -0,0 +1,11 @@
+--- setup.cfg.orig	2021-11-10 15:24:01 UTC
++++ setup.cfg
+@@ -33,7 +33,7 @@ license_file = LICENSE.txt
+ 
+ [options]
+ python_requires = >= 3.6
+-setup_requires = Cython >= 3.0a5
++setup_requires = Cython >= 0.29.24
+ packages = find:
+ zip_safe = False
+ 
diff --git a/databases/py-psycopg-c/pkg-descr b/databases/py-psycopg-c/pkg-descr
new file mode 100644
index 000000000000..85bd52736d70
--- /dev/null
+++ b/databases/py-psycopg-c/pkg-descr
@@ -0,0 +1,6 @@
+PostgreSQL database adapter for Python - optimization package
+
+Psycopg 3 is a modern implementation of a PostgreSQL adapter for Python.
+
+WWW: https://www.psycopg.org/
+WWW: https://github.com/psycopg/psycopg/tree/master/psycopg_c