git: 03a2415bf2d3 - main - www/py-dj61-djangorestframework: New port

From: Muhammad Moinur Rahman <bofh_at_FreeBSD.org>
Date: Fri, 04 Sep 2026 16:33:51 UTC
The branch main has been updated by bofh:

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

commit 03a2415bf2d33b65e4ad73a38fe8d609b8db2d82
Author:     Muhammad Moinur Rahman <bofh@FreeBSD.org>
AuthorDate: 2026-09-04 14:44:25 +0000
Commit:     Muhammad Moinur Rahman <bofh@FreeBSD.org>
CommitDate: 2026-09-04 16:33:22 +0000

    www/py-dj61-djangorestframework: New port
    
    Django REST framework is a powerful and flexible toolkit that makes it
    easy to build Web APIs.
    
    Some reasons you might want to use REST framework:
    * The Web browsable API is a huge usability win for your developers.
    * Authentication policies including optional packages for OAuth1a and
      OAuth2.
    * Serialization that supports both ORM and non-ORM data sources.
    * Customizable all the way down - just use regular function-based views
      if you don't need the more powerful features.
    
    WWW: https://www.django-rest-framework.org/
    
    Event:          Berlin Hackathon 202609
---
 www/Makefile                                       |  1 +
 www/py-dj61-djangorestframework/Makefile           | 25 ++++++++++++++++++++++
 www/py-dj61-djangorestframework/distinfo           |  3 +++
 .../files/patch-pyproject.toml                     | 20 +++++++++++++++++
 www/py-dj61-djangorestframework/pkg-descr          | 11 ++++++++++
 5 files changed, 60 insertions(+)

diff --git a/www/Makefile b/www/Makefile
index f5c36325bc2c..6fecd6e375a5 100644
--- a/www/Makefile
+++ b/www/Makefile
@@ -1597,6 +1597,7 @@
     SUBDIR += py-dj60-social-auth-app-django
     SUBDIR += py-dj60-strawberry-graphql-django
     SUBDIR += py-dj61-django-stubs-ext
+    SUBDIR += py-dj61-djangorestframework
     SUBDIR += py-django-admin-rangefilter
     SUBDIR += py-django-advanced-filters
     SUBDIR += py-django-allauth
diff --git a/www/py-dj61-djangorestframework/Makefile b/www/py-dj61-djangorestframework/Makefile
new file mode 100644
index 000000000000..957a6855e2ad
--- /dev/null
+++ b/www/py-dj61-djangorestframework/Makefile
@@ -0,0 +1,25 @@
+PORTNAME=	djangorestframework
+DISTVERSION=	3.18.0
+CATEGORIES=	www python
+MASTER_SITES=	PYPI
+PKGNAMEPREFIX=	${PYTHON_PKGNAMEPREFIX}dj61-
+
+MAINTAINER=	bofh@FreeBSD.org
+COMMENT=	Django REST framework
+WWW=		https://www.django-rest-framework.org/
+
+LICENSE=	BSD2CLAUSE
+LICENSE_FILE=	${WRKSRC}/LICENSE.md
+
+BUILD_DEPENDS=	${PY_SETUPTOOLS} \
+		${PYTHON_PKGNAMEPREFIX}wheel>=0:devel/py-wheel@${PY_FLAVOR}
+RUN_DEPENDS=	${PYTHON_PKGNAMEPREFIX}django61>=6.1:www/py-django61@${PY_FLAVOR}
+
+USES=		python
+USE_PYTHON=	autoplist pep517
+
+CONFLICTS_INSTALL=	${PYTHON_PKGNAMEPREFIX}*${PORTNAME}
+
+NO_ARCH=		yes
+
+.include <bsd.port.mk>
diff --git a/www/py-dj61-djangorestframework/distinfo b/www/py-dj61-djangorestframework/distinfo
new file mode 100644
index 000000000000..aab7ee3c2c5c
--- /dev/null
+++ b/www/py-dj61-djangorestframework/distinfo
@@ -0,0 +1,3 @@
+TIMESTAMP = 1787146058
+SHA256 (djangorestframework-3.18.0.tar.gz) = 2323a5111837e0b784dcb8323abc78ecc54fa2a5af7aff2677cf50cdd849477f
+SIZE (djangorestframework-3.18.0.tar.gz) = 913667
diff --git a/www/py-dj61-djangorestframework/files/patch-pyproject.toml b/www/py-dj61-djangorestframework/files/patch-pyproject.toml
new file mode 100644
index 000000000000..b90470ba19b3
--- /dev/null
+++ b/www/py-dj61-djangorestframework/files/patch-pyproject.toml
@@ -0,0 +1,20 @@
+Enable build for older py-setuptools.
+
+--- pyproject.toml.orig	2026-03-24 16:57:37 UTC
++++ pyproject.toml
+@@ -1,13 +1,12 @@ build-backend = "setuptools.build_meta"
+ [build-system]
+ build-backend = "setuptools.build_meta"
+-requires = [ "setuptools>=77.0.3" ]
++requires = [ "setuptools" ]
+ 
+ [project]
+ name = "djangorestframework"
+ description = "Web APIs for Django, made easy."
+ readme = "README.md"
+-license = "BSD-3-Clause"
+-license-files = [ "LICENSE.md" ]
++license = { text="BSD-3-Clause" }
+ authors = [ { name = "Tom Christie", email = "tom@tomchristie.com" } ]
+ requires-python = ">=3.10"
+ classifiers = [
diff --git a/www/py-dj61-djangorestframework/pkg-descr b/www/py-dj61-djangorestframework/pkg-descr
new file mode 100644
index 000000000000..5ab99e8f665b
--- /dev/null
+++ b/www/py-dj61-djangorestframework/pkg-descr
@@ -0,0 +1,11 @@
+Django REST framework is a powerful and flexible toolkit that makes it
+easy to build Web APIs.
+
+Some reasons you might want to use REST framework:
+
+* The Web browsable API is a huge usability win for your developers.
+* Authentication policies including optional packages for OAuth1a and
+  OAuth2.
+* Serialization that supports both ORM and non-ORM data sources.
+* Customizable all the way down - just use regular function-based views
+  if you don't need the more powerful features.