summaryrefslogtreecommitdiff
path: root/var
diff options
context:
space:
mode:
authorSinan <sbulutw@gmail.com>2024-03-23 10:16:48 -0700
committerGitHub <noreply@github.com>2024-03-23 11:16:48 -0600
commitcd5bef67804860e21936f51aa8016e88d5d2c9a5 (patch)
tree62c741d5b48235accbd6505d84bc9fa98e24302a /var
parent159e9a20d16a69d8a34fe48dc41f84bdeb90b0e3 (diff)
downloadspack-cd5bef67804860e21936f51aa8016e88d5d2c9a5.tar.gz
spack-cd5bef67804860e21936f51aa8016e88d5d2c9a5.tar.bz2
spack-cd5bef67804860e21936f51aa8016e88d5d2c9a5.tar.xz
spack-cd5bef67804860e21936f51aa8016e88d5d2c9a5.zip
py-line-profiler: Add 4.1.2 and 3.5.1 with their deps (#43156)
Co-authored-by: sbulut <sbulut@3vgeomatics.com> Co-authored-by: Bernhard Kaindl <bernhardkaindl7@gmail.com>
Diffstat (limited to 'var')
-rw-r--r--var/spack/repos/builtin/packages/py-line-profiler/gettimeofday_py39.patch24
-rw-r--r--var/spack/repos/builtin/packages/py-line-profiler/package.py15
2 files changed, 37 insertions, 2 deletions
diff --git a/var/spack/repos/builtin/packages/py-line-profiler/gettimeofday_py39.patch b/var/spack/repos/builtin/packages/py-line-profiler/gettimeofday_py39.patch
new file mode 100644
index 0000000000..50f9c8b9dd
--- /dev/null
+++ b/var/spack/repos/builtin/packages/py-line-profiler/gettimeofday_py39.patch
@@ -0,0 +1,24 @@
+--- spack-src/timers.c.orig 2024-03-12 23:42:29.017345816 -0700
++++ spack-src/timers.c 2024-03-12 23:43:55.329454579 -0700
+@@ -32,9 +32,6 @@
+
+ #else /* !MS_WINDOWS */
+
+-#ifndef HAVE_GETTIMEOFDAY
+-#error "This module requires gettimeofday() on non-Windows platforms!"
+-#endif
+
+ #if (defined(PYOS_OS2) && defined(PYCC_GCC))
+ #include <sys/time.h>
+@@ -48,11 +45,7 @@
+ {
+ struct timeval tv;
+ PY_LONG_LONG ret;
+-#ifdef GETTIMEOFDAY_NO_TZ
+- gettimeofday(&tv);
+-#else
+ gettimeofday(&tv, (struct timezone *)NULL);
+-#endif
+ ret = tv.tv_sec;
+ ret = ret * 1000000 + tv.tv_usec;
+ return ret;
diff --git a/var/spack/repos/builtin/packages/py-line-profiler/package.py b/var/spack/repos/builtin/packages/py-line-profiler/package.py
index 8adc110618..a8dc62c656 100644
--- a/var/spack/repos/builtin/packages/py-line-profiler/package.py
+++ b/var/spack/repos/builtin/packages/py-line-profiler/package.py
@@ -11,18 +11,29 @@ from spack.package import *
class PyLineProfiler(PythonPackage):
"""Line-by-line profiler."""
- homepage = "https://github.com/rkern/line_profiler"
+ homepage = "https://github.com/pyutils/line_profiler"
pypi = "line_profiler/line_profiler-2.0.tar.gz"
license("PSF-2.0")
+ version("4.1.2", sha256="aa56578b0ff5a756fe180b3fda7bd67c27bbd478b3d0124612d8cf00e4a21df2")
+ version("3.5.1", sha256="77400208bfbd5d4341938a9a3a4fb5194f5af7fc23b2d496c913755f8310e8b8")
version("2.1.2", sha256="efa66e9e3045aa7cb1dd4bf0106e07dec9f80bc781a993fbaf8162a36c20af5c")
version("2.0", sha256="739f8ad0e4bcd0cb82e99afc09e00a0351234f6b3f0b1f7f0090a8a2fbbf8381")
+ # see pyproject.toml
depends_on("python@2.5:", type=("build", "run"))
+ depends_on("python@:3.10", type=("build", "run"), when="@:3")
depends_on("py-setuptools", type="build")
- depends_on("py-cython", type="build")
+ depends_on("py-setuptools@68.2.2", type="build", when="@4.1.2:")
+ depends_on("py-cython@0.29.24:2", type="build", when="@:4.1.1")
+ depends_on("py-cython@3.0.3:", type="build", when="@4.1.2:")
depends_on("py-ipython@0.13:", type=("build", "run"))
+ depends_on("cmake", type="build", when="@3")
+ depends_on("py-ninja", type="build", when="@3")
+ depends_on("py-scikit-build@0.9.0:", type="build", when="@3")
+
+ patch("gettimeofday_py39.patch", when="@:2.1.2 ^python@3.9:")
# See https://github.com/rkern/line_profiler/issues/166
@run_before("install")