summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAdam J. Stewart <ajstewart426@gmail.com>2020-04-24 20:01:22 -0500
committerGitHub <noreply@github.com>2020-04-24 20:01:22 -0500
commitd0ccab7d176619c9803fd25c579f895cc2a6dfa7 (patch)
tree2ddd4cfbf3817171ab7b9b5f78fab1a8cf114d34
parentdbd0fe8190ab373cdc6d386767d3deea91ee9b8b (diff)
downloadspack-d0ccab7d176619c9803fd25c579f895cc2a6dfa7.tar.gz
spack-d0ccab7d176619c9803fd25c579f895cc2a6dfa7.tar.bz2
spack-d0ccab7d176619c9803fd25c579f895cc2a6dfa7.tar.xz
spack-d0ccab7d176619c9803fd25c579f895cc2a6dfa7.zip
py-srsly: add new package (#16294)
-rw-r--r--var/spack/repos/builtin/packages/py-srsly/package.py29
-rw-r--r--var/spack/repos/builtin/packages/py-srsly/subprocess.patch12
2 files changed, 41 insertions, 0 deletions
diff --git a/var/spack/repos/builtin/packages/py-srsly/package.py b/var/spack/repos/builtin/packages/py-srsly/package.py
new file mode 100644
index 0000000000..46b1b50af0
--- /dev/null
+++ b/var/spack/repos/builtin/packages/py-srsly/package.py
@@ -0,0 +1,29 @@
+# Copyright 2013-2020 Lawrence Livermore National Security, LLC and other
+# Spack Project Developers. See the top-level COPYRIGHT file for details.
+#
+# SPDX-License-Identifier: (Apache-2.0 OR MIT)
+
+
+class PySrsly(PythonPackage):
+ """srsly: Modern high-performance serialization utilities for Python."""
+
+ homepage = "https://github.com/explosion/srsly"
+ url = "https://pypi.io/packages/source/s/srsly/srsly-2.0.1.tar.gz"
+
+ version('2.0.1', sha256='fa3c7375be8fe75f23c27feafbfb5f738d55ffdbf02964c6896fb7684f519a52')
+ version('2.0.0', sha256='785b00e00406120dbef4ca82925051e6b60fe870c5f84f0d22b3632d574eb870')
+ version('1.0.2', sha256='59258b81d567df207f8a0a33c4b5fa232afccf1d927c8ce3ba5395bfd64c0ed8')
+
+ depends_on('python@3.6:', when='@2:', type=('build', 'run'))
+ depends_on('py-setuptools', type='build')
+ depends_on('py-wheel', when='@2:', type='build')
+ depends_on('py-cython@0.25:', when='@2:', type='build')
+ depends_on('py-pathlib@1.0.1', when='^python@:3.3', type=('build', 'run'))
+ depends_on('py-pytest', type='test')
+ depends_on('py-mock', type='test')
+ depends_on('py-numpy', type='test')
+ depends_on('py-six', when='@:1', type='test')
+ depends_on('py-pytz', when='@:1', type='test')
+
+ # https://github.com/explosion/srsly/pull/24
+ patch('subprocess.patch', when='@2.0.0:2.0.1')
diff --git a/var/spack/repos/builtin/packages/py-srsly/subprocess.patch b/var/spack/repos/builtin/packages/py-srsly/subprocess.patch
new file mode 100644
index 0000000000..50a053d754
--- /dev/null
+++ b/var/spack/repos/builtin/packages/py-srsly/subprocess.patch
@@ -0,0 +1,12 @@
+diff -Naur a/srsly/tests/cloudpickle/testutils.py b/srsly/tests/cloudpickle/testutils.py
+--- a/srsly/tests/cloudpickle/testutils.py 2020-04-24 16:10:43.000000000 -0500
++++ b/srsly/tests/cloudpickle/testutils.py 2020-04-24 16:11:02.000000000 -0500
+@@ -5,7 +5,7 @@
+ from subprocess import Popen, check_output, PIPE, STDOUT, CalledProcessError
+ from srsly.cloudpickle.cloudpickle import dumps
+ from pickle import loads
+-from suprocess import TimeoutExpired
++from subprocess import TimeoutExpired
+
+
+ TEST_GLOBALS = "a test value"