git: ea65e53e2476 - main - www/py-django-auth-ldap: Update to 4.0.0

From: Kai Knoblich <kai_at_FreeBSD.org>
Date: Sat, 08 Jan 2022 13:17:18 UTC
The branch main has been updated by kai:

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

commit ea65e53e24760311cacaa8d62a0daf0333e89123
Author:     Kai Knoblich <kai@FreeBSD.org>
AuthorDate: 2022-01-08 13:06:25 +0000
Commit:     Kai Knoblich <kai@FreeBSD.org>
CommitDate: 2022-01-08 13:16:03 +0000

    www/py-django-auth-ldap: Update to 4.0.0
    
    * Python 3.6 is now gone from the Ports so remove the cruft that was
      required for it.
    
    * Add a workaround to make the port still buildable with Python's
      distutils by using the "setup.py" from the previous release.
    
    Changelog:
    
    https://github.com/django-auth-ldap/django-auth-ldap/releases/tag/4.0.0
    
    MFH:            2022Q1
---
 www/py-django-auth-ldap/Makefile       | 15 ++++++---------
 www/py-django-auth-ldap/distinfo       |  6 +++---
 www/py-django-auth-ldap/files/setup.py |  5 +++++
 3 files changed, 14 insertions(+), 12 deletions(-)

diff --git a/www/py-django-auth-ldap/Makefile b/www/py-django-auth-ldap/Makefile
index 81efdeaf745c..85b956667648 100644
--- a/www/py-django-auth-ldap/Makefile
+++ b/www/py-django-auth-ldap/Makefile
@@ -1,7 +1,7 @@
 # Created by: Alexander Kriventsov <avk@vl.ru>
 
 PORTNAME=	django-auth-ldap
-PORTVERSION=	3.0.0
+PORTVERSION=	4.0.0
 CATEGORIES=	www security python
 MASTER_SITES=	CHEESESHOP
 PKGNAMEPREFIX=	${PYTHON_PKGNAMEPREFIX}
@@ -12,6 +12,7 @@ COMMENT=	LDAP integration for django.contrib.auth
 LICENSE=	BSD2CLAUSE
 LICENSE_FILE=	${WRKSRC}/LICENSE
 
+BUILD_DEPENDS=	${PYTHON_PKGNAMEPREFIX}setuptools_scm>=3.4:devel/py-setuptools_scm@${PY_FLAVOR}
 RUN_DEPENDS=	${PYTHON_PKGNAMEPREFIX}django22>=2.2:www/py-django22@${PY_FLAVOR} \
 		${PYTHON_PKGNAMEPREFIX}ldap>=3.1:net/py-ldap@${PY_FLAVOR}
 
@@ -27,13 +28,9 @@ OPTIONS_DEFINE=	DOCS
 DOCS_BUILD_DEPENDS=	${PYTHON_PKGNAMEPREFIX}sphinx>=0,1:textproc/py-sphinx@${PY_FLAVOR}
 DOCS_VARS=		PYDISTUTILS_BUILD_TARGET+="build_sphinx -a -E"
 
-.include <bsd.port.pre.mk>
-
-# Set a locale to avoid build/configure errors.  The UTF-8 mode is enabled by
-# default when the locale is C since Python 3.7.
-.if ${PYTHON_REL} < 30700
-USE_LOCALE=	en_US.UTF-8
-.endif
+# Workaround to make the port still buildable with "distutils"
+post-extract:
+	@${CP} ${FILESDIR}/setup.py ${WRKSRC}/
 
 post-install-DOCS-on:
 	@${MKDIR} ${STAGEDIR}${DOCSDIR}
@@ -41,4 +38,4 @@ post-install-DOCS-on:
  		${COPYTREE_SHARE} . ${STAGEDIR}${DOCSDIR} \
 			"! -name .buildinfo -and ! -name objects.inv")
 
-.include <bsd.port.post.mk>
+.include <bsd.port.mk>
diff --git a/www/py-django-auth-ldap/distinfo b/www/py-django-auth-ldap/distinfo
index 9757a29522ad..c9ce77fde256 100644
--- a/www/py-django-auth-ldap/distinfo
+++ b/www/py-django-auth-ldap/distinfo
@@ -1,3 +1,3 @@
-TIMESTAMP = 1627743489
-SHA256 (django-auth-ldap-3.0.0.tar.gz) = 1f2d5c562d9ba9a5e9a64099ae9798e1a63840a11afe4d1c4a9c74121f066eaa
-SIZE (django-auth-ldap-3.0.0.tar.gz) = 52381
+TIMESTAMP = 1641496154
+SHA256 (django-auth-ldap-4.0.0.tar.gz) = 276f79e624ce083ce13f161387f65ff1c0efe83ef8a42f2b9830d43317b15239
+SIZE (django-auth-ldap-4.0.0.tar.gz) = 52648
diff --git a/www/py-django-auth-ldap/files/setup.py b/www/py-django-auth-ldap/files/setup.py
new file mode 100644
index 000000000000..927cf403e2f6
--- /dev/null
+++ b/www/py-django-auth-ldap/files/setup.py
@@ -0,0 +1,5 @@
+# Taken from the previous release (= 3.0.0)
+
+from setuptools import setup
+
+setup()