Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
27 changes: 27 additions & 0 deletions repos/spack_repo/builtin/packages/py_httpx_sse/package.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
# Copyright Spack Project Developers. See COPYRIGHT file for details.
#
# SPDX-License-Identifier: (Apache-2.0 OR MIT)

from spack_repo.builtin.build_systems.python import PythonPackage

from spack.package import *


class PyHttpxSse(PythonPackage):
"""Consume Server-Sent Events (SSE) with HTTPX."""

homepage = "https://github.com/florimondmanca/httpx-sse"
pypi = "httpx-sse/httpx-sse-0.4.0.tar.gz"

maintainers("aprozo")

license("MIT", checked_by="aprozo")

version("0.4.0", sha256="1e81a3a3070ce322add1d3529ed42eb5f70817f45ed6ec915ab753f961139721")

depends_on("python@3.8:", type=("build", "run"))
depends_on("py-setuptools", type="build")
depends_on("py-setuptools-scm", type="build")
depends_on("py-wheel", type="build")

depends_on("py-httpx", type=("build", "run"))
48 changes: 48 additions & 0 deletions repos/spack_repo/builtin/packages/py_mcp/package.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
# Copyright Spack Project Developers. See COPYRIGHT file for details.
#
# SPDX-License-Identifier: (Apache-2.0 OR MIT)

from spack_repo.builtin.build_systems.python import PythonPackage

from spack.package import *


class PyMcp(PythonPackage):
"""The official Python SDK for the Model Context Protocol (MCP)."""

homepage = "https://github.com/modelcontextprotocol/python-sdk"
pypi = "mcp/mcp-1.28.1.tar.gz"

maintainers("aprozo")

license("MIT", checked_by="aprozo")

version("1.28.1", sha256="d51e36a5f5644faea4f85ea649bfffa6bc6c26770d42798ad6a3de3d2ba69683")

# Default off: the cli extra pulls py-typer, whose newest builtin version
# pins py-click@:8.1.8 and cannot unify with environments that need
# click 8.3+ (e.g. eic_xl via flask). MCP servers only need mcp core.
variant("cli", default=False, description="Command-line tooling (mcp CLI)")

depends_on("python@3.10:", type=("build", "run"))
depends_on("py-hatchling", type="build")

depends_on("py-anyio@4.5:", type=("build", "run"))
depends_on("py-httpx@0.27.1:1", type=("build", "run"))
depends_on("py-httpx-sse@0.4:", type=("build", "run"))
depends_on("py-jsonschema@4.20:", type=("build", "run"))
depends_on("py-pydantic@2.11:2", type=("build", "run"))
depends_on("py-pydantic-settings@2.5.2:", type=("build", "run"))
# pyjwt[crypto]: the crypto extra just adds cryptography
depends_on("py-pyjwt@2.10.1:", type=("build", "run"))
depends_on("py-cryptography", type=("build", "run"))
depends_on("py-python-multipart@0.0.9:", type=("build", "run"))
depends_on("py-sse-starlette@1.6.1:", type=("build", "run"))
depends_on("py-starlette@0.27:", type=("build", "run"))
depends_on("py-typing-extensions@4.9:", type=("build", "run"))
depends_on("py-typing-inspection@0.4.1:", type=("build", "run"))
depends_on("py-uvicorn@0.31.1:", type=("build", "run"))

with when("+cli"):
depends_on("py-python-dotenv@1:", type=("build", "run"))
depends_on("py-typer@0.16:", type=("build", "run"))
8 changes: 8 additions & 0 deletions repos/spack_repo/builtin/packages/py_pyjwt/package.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,13 @@ class PyPyjwt(PythonPackage):

license("MIT")

# Newer sdists use the PEP 625 lowercase filename, so the version
# carries its own url.
version(
"2.10.1",
sha256="3cc5772eb20009233caf06e9d8a0577824723b44e6648ee0a2aedb6cf9381953",
url="https://files.pythonhosted.org/packages/source/p/pyjwt/pyjwt-2.10.1.tar.gz",
)
version("2.4.0", sha256="d42908208c699b3b973cbeb01a969ba6a96c821eefb1c5bfe4c390c01d67abba")
version("2.1.0", sha256="fba44e7898bbca160a2b2b501f492824fc8382485d3a6f11ba5d0c1937ce6130")
version("1.7.1", sha256="8d59a976fb773f3e6a39c85636357c4f0e242707394cadadd9814f5cbaa20e96")
Expand All @@ -25,6 +32,7 @@ class PyPyjwt(PythonPackage):

depends_on("python@2.7:2.8,3.4:", type=("build", "run"))
depends_on("python@3.6:", when="@2.1.0:", type=("build", "run"))
depends_on("python@3.9:", when="@2.10:", type=("build", "run"))
depends_on("py-setuptools", type="build")
depends_on("py-cryptography@3.3.1:", when="+crypto", type=("build", "run"))
depends_on("py-cryptography@1.4:", when="+crypto", type=("build", "run"))
Expand Down
24 changes: 24 additions & 0 deletions repos/spack_repo/builtin/packages/py_restrictedpython/package.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
# Copyright Spack Project Developers. See COPYRIGHT file for details.
#
# SPDX-License-Identifier: (Apache-2.0 OR MIT)

from spack_repo.builtin.build_systems.python import PythonPackage

from spack.package import *


class PyRestrictedpython(PythonPackage):
"""A restricted execution environment for Python to run untrusted code."""

homepage = "https://github.com/zopefoundation/RestrictedPython"
pypi = "RestrictedPython/restrictedpython-8.1.tar.gz"

maintainers("aprozo")

license("ZPL-2.1", checked_by="aprozo")

version("8.1", sha256="4a69304aceacf6bee74bdf153c728221d4e3109b39acbfe00b3494927080d898")

depends_on("python@3.9:", type=("build", "run"))
depends_on("py-setuptools@78.1.1:80", type="build")
depends_on("py-wheel", type="build")
27 changes: 27 additions & 0 deletions repos/spack_repo/builtin/packages/py_sse_starlette/package.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
# Copyright Spack Project Developers. See COPYRIGHT file for details.
#
# SPDX-License-Identifier: (Apache-2.0 OR MIT)

from spack_repo.builtin.build_systems.python import PythonPackage

from spack.package import *


class PySseStarlette(PythonPackage):
"""SSE plugin for Starlette / FastAPI, serving Server-Sent Events."""

homepage = "https://github.com/sysid/sse-starlette"
pypi = "sse-starlette/sse_starlette-2.1.3.tar.gz"

maintainers("aprozo")

license("BSD-3-Clause", checked_by="aprozo")

version("2.1.3", sha256="9cd27eb35319e1414e3d2558ee7414487f9529ce3b3cf9b21434fd110e017169")

depends_on("python@3.8:", type=("build", "run"))
depends_on("py-pdm-backend", type="build")

depends_on("py-anyio", type=("build", "run"))
depends_on("py-starlette", type=("build", "run"))
depends_on("py-uvicorn", type=("build", "run"))
Loading