aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorYuri Victorovich <yuri@FreeBSD.org>2022-08-10 02:26:30 +0000
committerYuri Victorovich <yuri@FreeBSD.org>2022-08-10 04:17:31 +0000
commit7b96f181ad7381ab6a64e34056a6c777213732e9 (patch)
tree224a2d974818eff71d03ef6abee680c639e8ff71
parent76f62188eb671d239e390282e57ef781df0d1616 (diff)
downloadports-7b96f181ad7381ab6a64e34056a6c777213732e9.tar.gz
ports-7b96f181ad7381ab6a64e34056a6c777213732e9.zip
devel/py-line-profiler: New port: Line-by-line profiler for Python
-rw-r--r--devel/Makefile1
-rw-r--r--devel/py-line-profiler/Makefile29
-rw-r--r--devel/py-line-profiler/distinfo3
-rw-r--r--devel/py-line-profiler/pkg-descr5
4 files changed, 38 insertions, 0 deletions
diff --git a/devel/Makefile b/devel/Makefile
index e0cb3887c2f7..d8ec5d8d461f 100644
--- a/devel/Makefile
+++ b/devel/Makefile
@@ -4718,6 +4718,7 @@
SUBDIR += py-libversion
SUBDIR += py-libvirt
SUBDIR += py-libzfs
+ SUBDIR += py-line-profiler
SUBDIR += py-linear-tsv
SUBDIR += py-linecache2
SUBDIR += py-lineedit
diff --git a/devel/py-line-profiler/Makefile b/devel/py-line-profiler/Makefile
new file mode 100644
index 000000000000..a54b5db4cd70
--- /dev/null
+++ b/devel/py-line-profiler/Makefile
@@ -0,0 +1,29 @@
+PORTNAME= line-profiler
+DISTVERSION= 3.5.1
+CATEGORIES= devel python
+MASTER_SITES= CHEESESHOP
+PKGNAMEPREFIX= ${PYTHON_PKGNAMEPREFIX}
+DISTNAME= ${PORTNAME:S/-/_/}-${PORTVERSION}
+
+MAINTAINER= yuri@FreeBSD.org
+COMMENT= Line-by-line profiler for Python
+
+LICENSE= BSD3CLAUSE
+LICENSE_FILE= ${WRKSRC}/LICENSE.txt
+
+BUILD_DEPENDS= ${PYTHON_PKGNAMEPREFIX}scikit-build>0:devel/py-scikit-build@${PY_FLAVOR} \
+ cmake:devel/cmake
+TEST_DEPENDS= ${PYTHON_PKGNAMEPREFIX}coverage>=5.3:devel/py-coverage@${PY_FLAVOR} \
+ ${PYTHON_PKGNAMEPREFIX}ipython>=0.13:devel/ipython@${PY_FLAVOR} \
+ ${PYTHON_PKGNAMEPREFIX}pytest-cov>0:devel/py-pytest-cov@${PY_FLAVOR} \
+ ${PYTHON_PKGNAMEPREFIX}ubelt>=1.0.1:devel/py-ubelt@${PY_FLAVOR}
+
+USES= python:3.7+
+USE_PYTHON= distutils cython autoplist pytest # 1 test fails, see https://github.com/pyutils/line_profiler/issues/159
+
+TEST_ENV= ${MAKE_ENV} PYTHONPATH=${STAGEDIR}${PYTHONPREFIX_SITELIBDIR}
+
+post-install:
+ @${STRIP_CMD} ${STAGEDIR}${PYTHON_SITELIBDIR}/line_profiler/_line_profiler${PYTHON_EXT_SUFFIX}.so
+
+.include <bsd.port.mk>
diff --git a/devel/py-line-profiler/distinfo b/devel/py-line-profiler/distinfo
new file mode 100644
index 000000000000..c0a542aa36de
--- /dev/null
+++ b/devel/py-line-profiler/distinfo
@@ -0,0 +1,3 @@
+TIMESTAMP = 1660085746
+SHA256 (line_profiler-3.5.1.tar.gz) = 77400208bfbd5d4341938a9a3a4fb5194f5af7fc23b2d496c913755f8310e8b8
+SIZE (line_profiler-3.5.1.tar.gz) = 155402
diff --git a/devel/py-line-profiler/pkg-descr b/devel/py-line-profiler/pkg-descr
new file mode 100644
index 000000000000..e4c30693ce1c
--- /dev/null
+++ b/devel/py-line-profiler/pkg-descr
@@ -0,0 +1,5 @@
+line_profiler is a module for doing line-by-line profiling of functions.
+kernprof is a convenient script for running either line_profiler or the Python
+standard library's cProfile or profile modules, depending on what is available.
+
+WWW: https://github.com/pyutils/line_profiler