git: c1021d90fdbb - main - databases/py-pymssql: Resurrect, update to 2.4.5, add maintainer
- Go to: [ bottom of page ] [ top of archives ] [ this month ]
Date: Mon, 26 Oct 2026 21:43:04 UTC
The branch main has been updated by michaelo:
URL: https://cgit.FreeBSD.org/ports/commit/?id=c1021d90fdbb63da0778c46fa6db720383dad67b
commit c1021d90fdbb63da0778c46fa6db720383dad67b
Author: C. Weimann <cweimann@gmail.com>
AuthorDate: 2026-10-22 20:34:00 +0000
Commit: Michael Osipov <michaelo@FreeBSD.org>
CommitDate: 2026-10-26 21:42:42 +0000
databases/py-pymssql: Resurrect, update to 2.4.5, add maintainer
The port expired on 2026-09-15 because it depended on the expired lang/cython0.
It now builds with Cython 3 (USE_PYTHON=cython) via pep517 from the PyPI sdist
and links databases/freetds dynamically. Direct krb5 and OpenSSL linking is
disabled. tomli and standard-distutils are pruned from the pyproject
build-system requires as they are not needed.
Co-authored-by: Michael Osipov <michaelo@FreeBSD.org>
PR: 299747
---
MOVED | 1 -
databases/Makefile | 1 +
databases/py-pymssql/Makefile | 48 ++++++++++++++++++++++++++++++++++++++++++
databases/py-pymssql/distinfo | 3 +++
databases/py-pymssql/pkg-descr | 4 ++++
5 files changed, 56 insertions(+), 1 deletion(-)
diff --git a/MOVED b/MOVED
index ddc8854646b5..47505c657c89 100644
--- a/MOVED
+++ b/MOVED
@@ -5610,7 +5610,6 @@ net/py-DTLSSocket||2026-09-15|Has expired: Depends on expired lang/cython0
net/py-pyenet||2026-09-15|Has expired: Depends on expired lang/cython0
science/py-openEMS||2026-09-15|Has expired: Depends on expired lang/cython0
science/py-molmod||2026-09-15|Has expired: Depends on expired lang/cython0
-databases/py-pymssql||2026-09-15|Has expired: Depends on expired lang/cython0
devel/py-game_sdl2||2026-09-15|Has expired: Depends on expired lang/cython0
databases/py-cassandra-driver||2026-09-15|Has expired: Depends on expired lang/cython0
misc/py-python-pygtrie|misc/py-pygtrie|2026-09-16|Project was renamed on PyPI
diff --git a/databases/Makefile b/databases/Makefile
index 1fc6bb1c97df..58a9afe37795 100644
--- a/databases/Makefile
+++ b/databases/Makefile
@@ -883,6 +883,7 @@
SUBDIR += py-pylibmc
SUBDIR += py-pymemcache
SUBDIR += py-pymongo
+ SUBDIR += py-pymssql
SUBDIR += py-pymysql
SUBDIR += py-pyodbc
SUBDIR += py-pypuppetdb
diff --git a/databases/py-pymssql/Makefile b/databases/py-pymssql/Makefile
new file mode 100644
index 000000000000..06cf41495e40
--- /dev/null
+++ b/databases/py-pymssql/Makefile
@@ -0,0 +1,48 @@
+PORTNAME= pymssql
+DISTVERSION= 2.4.5
+CATEGORIES= databases python
+MASTER_SITES= PYPI
+PKGNAMEPREFIX= ${PYTHON_PKGNAMEPREFIX}
+
+MAINTAINER= cweimann@gmail.com
+COMMENT= DB-API interface to Microsoft SQL Server for Python
+WWW= https://github.com/pymssql/pymssql
+
+LICENSE= LGPL21+
+LICENSE_FILE= ${WRKSRC}/LICENSE
+
+BUILD_DEPENDS= ${PYTHON_PKGNAMEPREFIX}packaging>=24.2:devel/py-packaging@${PY_FLAVOR} \
+ ${PYTHON_PKGNAMEPREFIX}setuptools>=63:devel/py-setuptools@${PY_FLAVOR} \
+ ${PYTHON_PKGNAMEPREFIX}setuptools-scm>=8.0:devel/py-setuptools-scm@${PY_FLAVOR} \
+ ${PYTHON_PKGNAMEPREFIX}wheel>=0.36.2:devel/py-wheel@${PY_FLAVOR}
+LIB_DEPENDS= libsybdb.so:databases/freetds
+
+USES= python
+USE_PYTHON= autoplist cython pep517
+
+# Link the system FreeTDS dynamically; do not pull in krb5/OpenSSL directly
+# (FreeTDS already links what it needs).
+MAKE_ENV= LINK_FREETDS_STATICALLY=NO \
+ LINK_KRB5=NO \
+ LINK_OPENSSL=NO \
+ PYMSSQL_FREETDS=${LOCALBASE} \
+ SETUPTOOLS_SCM_PRETEND_VERSION=${DISTVERSION}
+
+NO_TEST= yes
+
+post-patch:
+# standard-distutils is not ported (setuptools ships a distutils shim) and
+# tomli is not used by setup.py; drop them so the no-isolation build passes.
+# Upstream pins setuptools>80 in pyproject.toml and setup.cfg; ports ships 63.x
+# and it builds fine, so relax both.
+ @${REINPLACE_CMD} -e '/"tomli"/d' -e '/standard-distutils/d' \
+ -e 's/setuptools>80\.0/setuptools>=63/' \
+ ${WRKSRC}/pyproject.toml
+ @${REINPLACE_CMD} -e 's/setuptools>80\.0/setuptools>=63/' \
+ ${WRKSRC}/setup.cfg
+
+post-install:
+ ${FIND} ${STAGEDIR}${PYTHON_SITELIBDIR}/pymssql -name '*.so' \
+ -exec ${STRIP_CMD} {} +
+
+.include <bsd.port.mk>
diff --git a/databases/py-pymssql/distinfo b/databases/py-pymssql/distinfo
new file mode 100644
index 000000000000..7a39893eae8a
--- /dev/null
+++ b/databases/py-pymssql/distinfo
@@ -0,0 +1,3 @@
+TIMESTAMP = 1792613488
+SHA256 (pymssql-2.4.5.tar.gz) = ada0e747bab96b6b7ee0d21ca019db6e099cda0593080f59089e182a0a14b42a
+SIZE (pymssql-2.4.5.tar.gz) = 212797
diff --git a/databases/py-pymssql/pkg-descr b/databases/py-pymssql/pkg-descr
new file mode 100644
index 000000000000..57e8cfbb7177
--- /dev/null
+++ b/databases/py-pymssql/pkg-descr
@@ -0,0 +1,4 @@
+pymssql is a simple database interface for Python that builds on top of
+FreeTDS to provide a Python DB-API (PEP-249) interface to Microsoft SQL
+Server. It includes the low-level _mssql module and the DB-API compliant
+pymssql module.