pkgsrc-WIP-changes archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

py-memray: add incomplete package



Module Name:	pkgsrc-wip
Committed By:	Thomas Klausner <wiz%gatalith.at@localhost>
Pushed By:	wiz
Date:		Sun Dec 10 15:51:39 2023 +0100
Changeset:	d0469c54ce413ad0b25aba3b712ce03110563f81

Modified Files:
	Makefile
Added Files:
	py-memray/DESCR
	py-memray/Makefile
	py-memray/PLIST
	py-memray/TODO
	py-memray/distinfo
	py-memray/patches/patch-Makefile
	py-memray/patches/patch-setup.py

Log Message:
py-memray: add incomplete package

Officially only supports Linux and macOS.

To see a diff of this commit:
https://wip.pkgsrc.org/cgi-bin/gitweb.cgi?p=pkgsrc-wip.git;a=commitdiff;h=d0469c54ce413ad0b25aba3b712ce03110563f81

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

diffstat:
 Makefile                         |  1 +
 py-memray/DESCR                  |  6 ++++++
 py-memray/Makefile               | 24 ++++++++++++++++++++++++
 py-memray/PLIST                  |  4 ++++
 py-memray/TODO                   |  3 +++
 py-memray/distinfo               |  7 +++++++
 py-memray/patches/patch-Makefile | 15 +++++++++++++++
 py-memray/patches/patch-setup.py | 15 +++++++++++++++
 8 files changed, 75 insertions(+)

diffs:
diff --git a/Makefile b/Makefile
index 3e2f3625aa..315d97b33e 100644
--- a/Makefile
+++ b/Makefile
@@ -3920,6 +3920,7 @@ SUBDIR+=	py-mdptoolbox
 SUBDIR+=	py-mdtraj
 SUBDIR+=	py-meigo
 SUBDIR+=	py-memory_profiler
+SUBDIR+=	py-memray
 SUBDIR+=	py-mendeleev
 SUBDIR+=	py-mesa
 SUBDIR+=	py-meshio
diff --git a/py-memray/DESCR b/py-memray/DESCR
new file mode 100644
index 0000000000..19178edc3e
--- /dev/null
+++ b/py-memray/DESCR
@@ -0,0 +1,6 @@
+Memray is a memory profiler for Python. It can track memory
+allocations in Python code, in native extension modules, and in
+the Python interpreter itself. It can generate several different
+types of reports to help you analyze the captured memory usage
+data. While commonly used as a CLI tool, it can also be used as a
+library to perform more fine-grained profiling tasks.
diff --git a/py-memray/Makefile b/py-memray/Makefile
new file mode 100644
index 0000000000..307f5c329f
--- /dev/null
+++ b/py-memray/Makefile
@@ -0,0 +1,24 @@
+# $NetBSD$
+
+DISTNAME=	memray-1.11.0
+PKGNAME=	${PYPKGPREFIX}-${DISTNAME}
+CATEGORIES=	devel
+MASTER_SITES=	${MASTER_SITE_PYPI:=m/memray/}
+
+MAINTAINER=	pkgsrc-users%NetBSD.org@localhost
+HOMEPAGE=	https://pypi.org/project/memray/
+COMMENT=	Memory profiler for Python applications
+LICENSE=	apache-2.0
+
+TOOL_DEPENDS+=	${PYPKGPREFIX}-cython-[0-9]*:../../devel/py-cython
+TOOL_DEPENDS+=	${PYPKGPREFIX}-pkgconfig-[0-9]*:../../devel/py-pkgconfig
+TOOL_DEPENDS+=	${PYPKGPREFIX}-setuptools-[0-9]*:../../devel/py-setuptools
+TOOL_DEPENDS+=	${PYPKGPREFIX}-wheel-[0-9]*:../../devel/py-wheel
+
+PYTHON_VERSIONS_INCOMPATIBLE=	27
+
+USE_TOOLS+=	gmake
+
+.include "../../archivers/lz4/buildlink3.mk"
+.include "../../lang/python/wheel.mk"
+.include "../../mk/bsd.pkg.mk"
diff --git a/py-memray/PLIST b/py-memray/PLIST
new file mode 100644
index 0000000000..92ba51a2d7
--- /dev/null
+++ b/py-memray/PLIST
@@ -0,0 +1,4 @@
+@comment $NetBSD$
+@comment TODO: to fill this file with the file listing:
+@comment TODO: 1. run "/usr/bin/make package"
+@comment TODO: 2. run "/usr/bin/make print-PLIST"
diff --git a/py-memray/TODO b/py-memray/TODO
new file mode 100644
index 0000000000..8bc39b076d
--- /dev/null
+++ b/py-memray/TODO
@@ -0,0 +1,3 @@
+Does not officially support NetBSD.
+Patches to fake NetBSD as Linux started, but needs C++ fixes now
+(memalign, template issue)
diff --git a/py-memray/distinfo b/py-memray/distinfo
new file mode 100644
index 0000000000..167922970b
--- /dev/null
+++ b/py-memray/distinfo
@@ -0,0 +1,7 @@
+$NetBSD$
+
+BLAKE2s (memray-1.11.0.tar.gz) = ae38b72a2f3d637f14e0b6401ff5dafeef4a94a2d3e86908689af40b4738e72d
+SHA512 (memray-1.11.0.tar.gz) = 0647655c129950f71eeed97124378d693c9f6a001ae42fbaa7ca1c01f9c01f768f52eeceb9d7fa42f3f12a6bd09bdd87c367e09b90cc494f9935f41759dab239
+Size (memray-1.11.0.tar.gz) = 1060236 bytes
+SHA1 (patch-Makefile) = 5fba7c44efe7e16f6c77821eef107d7ee27e0a59
+SHA1 (patch-setup.py) = 2e6e90750a413f3e737b70c972062705e7f789f4
diff --git a/py-memray/patches/patch-Makefile b/py-memray/patches/patch-Makefile
new file mode 100644
index 0000000000..ee305855f6
--- /dev/null
+++ b/py-memray/patches/patch-Makefile
@@ -0,0 +1,15 @@
+$NetBSD$
+
+Fix unportable test(1) operator.
+
+--- Makefile.orig	2023-12-04 20:06:55.000000000 +0000
++++ Makefile
+@@ -135,7 +135,7 @@ gh-pages:  ## Publish documentation on G
+ 	$(eval GIT_REMOTE := $(shell git remote get-url $(UPSTREAM_GIT_REMOTE)))
+ 	$(eval COMMIT_HASH := $(shell git rev-parse HEAD))
+ 	touch $(HTMLDIR)/.nojekyll
+-	@echo -n "Documentation ready, push to $(GIT_REMOTE)? [Y/n] " && read ans && [ $${ans:-Y} == Y ]
++	@echo -n "Documentation ready, push to $(GIT_REMOTE)? [Y/n] " && read ans && [ $${ans:-Y} = Y ]
+ 	git init $(HTMLDIR)
+ 	GIT_DIR=$(HTMLDIR)/.git GIT_WORK_TREE=$(HTMLDIR) git add -A
+ 	GIT_DIR=$(HTMLDIR)/.git git commit -m "Documentation for commit $(COMMIT_HASH)"
diff --git a/py-memray/patches/patch-setup.py b/py-memray/patches/patch-setup.py
new file mode 100644
index 0000000000..a8e683cf31
--- /dev/null
+++ b/py-memray/patches/patch-setup.py
@@ -0,0 +1,15 @@
+$NetBSD$
+
+Handle NetBSD as Linux.
+
+--- setup.py.orig	2023-12-04 20:06:55.000000000 +0000
++++ setup.py
+@@ -16,7 +16,7 @@ from setuptools import setup
+ from setuptools.command.build_ext import build_ext as build_ext_orig
+ 
+ IS_MAC = sys.platform == "darwin"
+-IS_LINUX = "linux" in sys.platform
++IS_LINUX = "linux" in sys.platform or "netbsd" in sys.platform
+ 
+ LIBBACKTRACE_LOCATION = (
+     pathlib.Path(__file__).parent / "src" / "vendor" / "libbacktrace"


Home | Main Index | Thread Index | Old Index