sourmash: new package @4.8.2 (#38571)

* sourmash: new package @4.8.2

* sourmash: new package @4.8.2

* py-bitarray: add 2.7.6, 2.7.4

* Update var/spack/repos/builtin/packages/py-bitstring/package.py

Co-authored-by: Adam J. Stewart <ajstewart426@gmail.com>

* Update setuptools dependency

* Adding missing deps

* Update var/spack/repos/builtin/packages/sourmash/package.py

Co-authored-by: Adam J. Stewart <ajstewart426@gmail.com>

* Correcting maturin dep

Co-authored-by: Adam J. Stewart <ajstewart426@gmail.com>

* Update var/spack/repos/builtin/packages/sourmash/package.py

Co-authored-by: Adam J. Stewart <ajstewart426@gmail.com>

* Update var/spack/repos/builtin/packages/sourmash/package.py

Co-authored-by: Adam J. Stewart <ajstewart426@gmail.com>

* Update var/spack/repos/builtin/packages/sourmash/package.py

Co-authored-by: Adam J. Stewart <ajstewart426@gmail.com>

* Adding dependency types

* Add `@0.14.17` as the last pre-`@1:` release

* Switch to use `python_platlib`

* Update package.py

* Update var/spack/repos/builtin/packages/py-screed/package.py

Co-authored-by: Adam J. Stewart <ajstewart426@gmail.com>

---------

Co-authored-by: LMS Bioinformatics <bioinformatics@lms.mrc.ac.uk>
Co-authored-by: Adam J. Stewart <ajstewart426@gmail.com>
This commit is contained in:
George Young 2023-07-30 22:13:25 +01:00 committed by GitHub
parent a941ab4acb
commit 39cd2f3754
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
5 changed files with 84 additions and 4 deletions

View File

@ -11,8 +11,9 @@ class PyBitarray(PythonPackage):
pypi = "bitarray/bitarray-0.8.1.tar.gz"
version("2.7.6", sha256="3807f9323c308bc3f9b58cbe5d04dc28f34ac32d852999334da96b42f64b5356")
version("2.7.4", sha256="143d4f65e1f45a533e13521be1dc557a782317ecf76520eabd5a903b26ecb187")
version("2.6.0", sha256="56d3f16dd807b1c56732a244ce071c135ee973d3edc9929418c1b24c5439a0fd")
version("0.8.1", sha256="7da501356e48a83c61f479393681c1bc4b94e5a34ace7e08cb29e7dd9290ab18")
depends_on("python")
depends_on("py-setuptools", type="build")

View File

@ -10,9 +10,19 @@ class PyBitstring(PythonPackage):
"""Simple construction, analysis and modification of binary data."""
homepage = "http://pythonhosted.org/bitstring"
pypi = "bitstring/bitstring-3.1.5.zip"
pypi = "bitstring/bitstring-3.1.6.tar.gz"
version("4.0.2", sha256="a391db8828ac4485dd5ce72c80b27ebac3e7b989631359959e310cd9729723b2")
version("3.1.5", sha256="c163a86fcef377c314690051885d86b47419e3e1770990c212e16723c1c08faa")
# pip silently replaces distutils with setuptools
depends_on("py-setuptools", type="build")
depends_on("py-setuptools", when="@:4.0.1", type="build")
depends_on("py-setuptools@61:", when="@4.0.2:", type="build")
depends_on("py-bitarray@2.7.4", when="@4.1:")
def url_for_version(self, version):
url = "https://pypi.org/packages/source/s/bitstring/bitstring-{}.{}"
if version < Version("3.1.6"):
suffix = "zip"
else:
suffix = "tar.gz"
return url.format(version, suffix)

View File

@ -15,6 +15,7 @@ class PyMaturin(PythonPackage):
pypi = "maturin/maturin-0.13.7.tar.gz"
version("1.1.0", sha256="4650aeaa8debd004b55aae7afb75248cbd4d61cd7da2dcf4ead8b22b58cecae0")
version("0.14.17", sha256="fb4e3311e8ce707843235fbe8748a05a3ae166c3efd6d2aa335b53dfc2bd3b88")
version("0.13.7", sha256="c0a77aa0c57f945649ca711c806203a1b6888ad49c2b8b85196ffdcf0421db77")
depends_on("py-setuptools", type="build")

View File

@ -0,0 +1,20 @@
# Copyright 2013-2023 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)
from spack.package import *
class PyScreed(PythonPackage):
"""screed: a Python library for loading FASTA and FASTQ sequences."""
homepage = "https://screed.readthedocs.io/"
pypi = "screed/screed-1.1.2.tar.gz"
version("1.1.2", sha256="734ffa7a8a645286496d895b736f91d6b2988956e2fd42358123d93ec8519b6a")
depends_on("py-setuptools@48:", type="build")
depends_on("py-setuptools-scm@4:5", type="build")
depends_on("py-setuptools-scm-git-archive", type="build")
depends_on("py-wheel@0.29.0:", type="build")

View File

@ -0,0 +1,48 @@
# Copyright 2013-2023 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)
from spack.package import *
class Sourmash(PythonPackage):
"""Sourmash: Quickly search, compare, and analyze genomic and metagenomic data sets with
k-mer sketches."""
homepage = "https://sourmash.bio/"
pypi = "sourmash/sourmash-4.8.2.tar.gz"
version("4.8.2", sha256="e0df78032e53ed88977445933ba3481dd10c7d3bd26d019511a6a4e6d7518475")
depends_on("python@3.8:", type=("build", "run"))
# build-only
depends_on("py-maturin@0.14.13:0.14", type="build")
depends_on("rust", type="build")
# general
depends_on("py-screed@1.1.2:1", type=("build", "run"))
depends_on("py-cffi@1.14.0:", type=("build", "run"))
depends_on("py-numpy", type=("build", "run"))
depends_on("py-matplotlib", type=("build", "run"))
depends_on("py-scipy", type=("build", "run"))
depends_on("py-deprecation@2.0.6:", type=("build", "run"))
depends_on("py-cachetools@4:5", type=("build", "run"))
depends_on("py-bitstring@3.1.9:4", type=("build", "run"))
depends_on("py-importlib_metadata@3.6:", when="^python@:3.9", type=("build", "run"))
def install(self, spec, prefix):
# build rust libs
cargo = Executable("cargo")
cargo("build", "--release")
# install python package
args = std_pip_args + ["--prefix=" + prefix, "."]
pip(*args)
# move sourmash.so into expected place
site_packages = join_path(python_platlib, "sourmash")
lib_ext = "dylib" if spec.platform == "Darwin" else "so"
install(
join_path("target", "release", "libsourmash.{}".format(lib_ext)),
join_path(site_packages, "_lowlevel__lib.so"),
)
# patch invalid read mode
filter_file(r"'(.*)'\), 130\)", r"'\1'))", join_path(site_packages, "_lowlevel.py"))