Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 21 Nov 2024 13:41:59 GMT
From:      Po-Chuan Hsieh <sunpoet@FreeBSD.org>
To:        ports-committers@FreeBSD.org, dev-commits-ports-all@FreeBSD.org, dev-commits-ports-main@FreeBSD.org
Subject:   git: 37c141a8e4c4 - main - devel/py-dulwich: Clean up
Message-ID:  <202411211341.4ALDfxLv014588@gitrepo.freebsd.org>

next in thread | raw e-mail | index | archive | help
The branch main has been updated by sunpoet:

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

commit 37c141a8e4c462c902e8914f0e5cfdef1318a19a
Author:     Po-Chuan Hsieh <sunpoet@FreeBSD.org>
AuthorDate: 2024-11-21 13:21:12 +0000
Commit:     Po-Chuan Hsieh <sunpoet@FreeBSD.org>
CommitDate: 2024-11-21 13:38:07 +0000

    devel/py-dulwich: Clean up
    
    - Update WWW
    - Use USES=shebangfix
    - Convert to USE_PYTHON=unittest
    - Convert PORTDOCS and PORTEXAMPLES to PLIST entries
    - Remove TEST option
    - Update pkg-descr
    - Bump PORTREVISION for package change
---
 devel/py-dulwich/Makefile  | 58 +++++++++++++++++-----------------------------
 devel/py-dulwich/pkg-descr | 12 +++++-----
 devel/py-dulwich/pkg-plist | 17 ++++++++++++++
 3 files changed, 44 insertions(+), 43 deletions(-)

diff --git a/devel/py-dulwich/Makefile b/devel/py-dulwich/Makefile
index 74489f4fed48..eb14b83fb150 100644
--- a/devel/py-dulwich/Makefile
+++ b/devel/py-dulwich/Makefile
@@ -1,12 +1,14 @@
 PORTNAME=	dulwich
-DISTVERSION=	0.21.7
+PORTVERSION=	0.21.7
+PORTREVISION=	1
 CATEGORIES=	devel python
 MASTER_SITES=	PYPI
 PKGNAMEPREFIX=	${PYTHON_PKGNAMEPREFIX}
 
 MAINTAINER=	sunpoet@FreeBSD.org
-COMMENT=	Python implementation of the Git file formats and protocols
-WWW=		https://www.dulwich.io/
+COMMENT=	Python Git Library
+WWW=		https://www.dulwich.io/ \
+		https://github.com/jelmer/dulwich
 
 LICENSE=	APACHE20 GPLv2+
 LICENSE_COMB=	dual
@@ -15,52 +17,34 @@ LICENSE_FILE=	${WRKSRC}/COPYING
 BUILD_DEPENDS=	${PYTHON_PKGNAMEPREFIX}setuptools>=61:devel/py-setuptools@${PY_FLAVOR} \
 		${PYTHON_PKGNAMEPREFIX}wheel>=0:devel/py-wheel@${PY_FLAVOR}
 RUN_DEPENDS=	${PYTHON_PKGNAMEPREFIX}urllib3>=1.25:net/py-urllib3@${PY_FLAVOR}
+TEST_DEPENDS=	${PYTHON_PKGNAMEPREFIX}fastimport>=0:devel/py-fastimport@${PY_FLAVOR} \
+		${PYTHON_PKGNAMEPREFIX}gevent>=0:devel/py-gevent@${PY_FLAVOR} \
+		${PYTHON_PKGNAMEPREFIX}geventhttpclient>=0:devel/py-geventhttpclient@${PY_FLAVOR} \
+		${PYTHON_PKGNAMEPREFIX}setuptools>=17.1:devel/py-setuptools@${PY_FLAVOR}
 
-USES=		cpe python
-CPE_VENDOR=	dulwich_project
-USE_PYTHON=	autoplist concurrent pep517
+USES=		cpe python shebangfix
+USE_PYTHON=	autoplist concurrent pep517 unittest
 
-PORTDOCS=	AUTHORS NEWS README.rst TODO conclusion.txt encoding.txt \
-		file-format.txt index.txt introduction.txt object-store.txt \
-		performance.txt porcelain.txt protocol.txt remote.txt repo.txt tag.txt
-PORTEXAMPLES=	clone.py config.py diff.py latest_change.py
+CPE_VENDOR=	dulwich_project
 
-OPTIONS_DEFINE=	DOCS EXAMPLES FASTIMPORT PARAMIKO TEST
-OPTIONS_DEFAULT=TEST
+SHEBANG_FILES=	examples/*.py
 
-FASTIMPORT_DESC=	Enable fastimport support
-PARAMIKO_DESC=	Enable paramiko SSH2 protocol support
+OPTIONS_DEFINE=	DOCS EXAMPLES FASTIMPORT PARAMIKO
+FASTIMPORT_DESC=Git fastimport support
+PARAMIKO_DESC=	SSH2 support
 
 FASTIMPORT_RUN_DEPENDS=	${PYTHON_PKGNAMEPREFIX}fastimport>=0:devel/py-fastimport@${PY_FLAVOR}
 PARAMIKO_RUN_DEPENDS=	${PYTHON_PKGNAMEPREFIX}paramiko>=0:security/py-paramiko@${PY_FLAVOR}
 
-.include <bsd.port.options.mk>
-
-post-patch:
-	${REINPLACE_CMD} -e 's|PYTHON = python|PYTHON = ${PYTHON_CMD}|g' \
-		${WRKSRC}/Makefile
-	${REINPLACE_CMD} -e 's|/usr/bin/python|${PYTHON_CMD}|g' \
-		${WRKSRC}/setup.py ${WRKSRC}/examples/*.py
-
-post-patch-TEST-off:
-	${REINPLACE_CMD} -e '/tests/d' \
-		${WRKSRC}/dulwich.egg-info/SOURCES.txt \
-		${WRKSRC}/MANIFEST.in
-	${REINPLACE_CMD} -e "/packages=/s|'dulwich\.tests[^']*',||g" \
-		${WRKSRC}/setup.py
-
 post-install:
-	@${STRIP_CMD} ${STAGEDIR}/${PYTHONPREFIX_SITELIBDIR}/${PORTNAME}/*.so
+	${FIND} ${STAGEDIR}${PYTHON_SITELIBDIR} -name '*.so' -exec ${STRIP_CMD} {} +
 
 post-install-DOCS-on:
-	${CP} ${WRKSRC}/docs/*.txt ${WRKSRC}/docs/tutorial/*.txt ${WRKSRC}/
-	@${MKDIR} ${STAGEDIR}${DOCSDIR}
-	(cd ${WRKSRC} && ${INSTALL_DATA} ${PORTDOCS} ${STAGEDIR}${DOCSDIR}/)
+	${MKDIR} ${STAGEDIR}${DOCSDIR}/
+	${INSTALL_DATA} ${WRKSRC}/docs/tutorial/*.txt ${STAGEDIR}${DOCSDIR}/
 
 post-install-EXAMPLES-on:
-	${CP} ${WRKSRC}/examples/*.py ${WRKSRC}/
-	@${MKDIR} ${STAGEDIR}${EXAMPLESDIR}
-	(cd ${WRKSRC} && ${INSTALL_SCRIPT} ${PORTEXAMPLES} \
-		${STAGEDIR}${EXAMPLESDIR}/)
+	${MKDIR} ${STAGEDIR}${EXAMPLESDIR}/
+	${INSTALL_DATA} ${WRKSRC}/examples/*.py ${STAGEDIR}${EXAMPLESDIR}/
 
 .include <bsd.port.mk>
diff --git a/devel/py-dulwich/pkg-descr b/devel/py-dulwich/pkg-descr
index 9296911f5f59..5fa083545588 100644
--- a/devel/py-dulwich/pkg-descr
+++ b/devel/py-dulwich/pkg-descr
@@ -1,7 +1,7 @@
-Dulwich is a Python implementation of the Git file formats and protocols,
-without the need to have Git installed.
+Dulwich project aims to provide an interface to git repos (both local and
+remote) that doesn't call out to git directly but instead uses pure Python.
 
-It aims to provide an interface to Git repos (both local and remote) that
-does not call out to Git directly but instead uses pure Python. All
-functionality is available in pure Python. Optional C extensions can be
-built for improved performance.
+By default, Dulwich' setup.py will attempt to build and install the optional C
+extensions. The reason for this is that they significantly improve the
+performance since some low-level operations that are executed often are much
+slower in CPython.
diff --git a/devel/py-dulwich/pkg-plist b/devel/py-dulwich/pkg-plist
new file mode 100644
index 000000000000..9d6f4e86ad83
--- /dev/null
+++ b/devel/py-dulwich/pkg-plist
@@ -0,0 +1,17 @@
+%%PORTDOCS%%%%DOCSDIR%%/conclusion.txt
+%%PORTDOCS%%%%DOCSDIR%%/encoding.txt
+%%PORTDOCS%%%%DOCSDIR%%/file-format.txt
+%%PORTDOCS%%%%DOCSDIR%%/index.txt
+%%PORTDOCS%%%%DOCSDIR%%/introduction.txt
+%%PORTDOCS%%%%DOCSDIR%%/object-store.txt
+%%PORTDOCS%%%%DOCSDIR%%/porcelain.txt
+%%PORTDOCS%%%%DOCSDIR%%/remote.txt
+%%PORTDOCS%%%%DOCSDIR%%/repo.txt
+%%PORTDOCS%%%%DOCSDIR%%/tag.txt
+%%PORTEXAMPLES%%%%EXAMPLESDIR%%/clone.py
+%%PORTEXAMPLES%%%%EXAMPLESDIR%%/config.py
+%%PORTEXAMPLES%%%%EXAMPLESDIR%%/diff.py
+%%PORTEXAMPLES%%%%EXAMPLESDIR%%/gcs.py
+%%PORTEXAMPLES%%%%EXAMPLESDIR%%/latest_change.py
+%%PORTEXAMPLES%%%%EXAMPLESDIR%%/memoryrepo.py
+%%PORTEXAMPLES%%%%EXAMPLESDIR%%/rename-branch.py



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?202411211341.4ALDfxLv014588>