Skip to content

Commit

Permalink
Add py-cylc-flow@8.3.6 and patch out crooked logic to unset PYTHONPAT…
Browse files Browse the repository at this point in the history
…H in main cylc Python module
  • Loading branch information
climbfuji committed Dec 11, 2024
1 parent 31fa901 commit e2bde7f
Showing 1 changed file with 21 additions and 4 deletions.
25 changes: 21 additions & 4 deletions var/spack/repos/builtin/packages/py-cylc-flow/package.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,16 +11,19 @@ class PyCylcFlow(PythonPackage):

homepage = "https://cylc.org"
pypi = "cylc-flow/cylc-flow-8.1.4.tar.gz"
git = "https://github.com/cylc/cylc-flow.git"

maintainers("LydDeb", "climbfuji")

license("GPL-3.0-only")

# 8.3.6 not on PyPI server?
version("8.3.6", commit="7f63b43164638e27636b992b14b3fa088b692b94")
version("8.2.3", sha256="dd5bea9e4b8dad00edd9c3459a38fb778e5a073da58ad2725bc9b84ad718e073")
version("8.2.0", sha256="cbe35e0d72d1ca36f28a4cebe9b9040a3445a74253bc94051a3c906cf179ded0")
version("8.1.4", sha256="d1835ac18f6f24f3115c56b2bc821185484e834a86b12fd0033ff7e4dc3c1f63")

depends_on("py-setuptools@49:66,68:", type=("build", "run"))
depends_on("py-setuptools@49:66,68:", type=("build", "run"), when="@:8.2")
depends_on("py-aiofiles@0.7", type=("build", "run"), when="@:8.1")
depends_on("py-ansimarkup@1.0.0:", type=("build", "run"))
depends_on("py-async-timeout@3.0.0:", type=("build", "run"))
Expand All @@ -29,15 +32,29 @@ class PyCylcFlow(PythonPackage):
depends_on("py-jinja2@3.0", type=("build", "run"))
depends_on("py-metomi-isodatetime@3.0", type=("build", "run"), when="@:8.2.0")
depends_on("py-metomi-isodatetime@3:3.1", type=("build", "run"), when="@8.2.3:")
depends_on("py-protobuf@4.21.2:4.21", type=("build", "run"))
depends_on("py-packaging", type=("build", "run"), when="@8.3:")
depends_on("py-protobuf@4.21.2:4.21", type=("build", "run"), when="@:8.2")
depends_on("py-protobuf@4.24.4:4.24", type=("build", "run"), when="@8.3:")
depends_on("py-psutil@5.6.0:", type=("build", "run"))
depends_on("py-pyzmq@22:", type=("build", "run"), when="@8.2:")
depends_on("py-pyzmq@22", type=("build", "run"), when="@:8.1")
depends_on("py-importlib-metadata", type=("build", "run"), when="^python@:3.7")
depends_on("py-urwid@2", type=("build", "run"))
depends_on("py-importlib-metadata", type=("build", "run"), when="@:8.2 ^python@:3.7")
depends_on("py-importlib-metadata@5:", type=("build", "run"), when="@8.3: ^python@:3.11")
depends_on("py-urwid@2:2.6.1,2.6.4:2", type=("build", "run"))
depends_on("py-rx", type=("build", "run"))
depends_on("py-promise", type=("build", "run"))
depends_on("py-tomli@2:", type=("build", "run"), when="^python@:3.10")

# Non-Python dependencies
depends_on("graphviz", type="run")

# cylc thinks it's smarter than everyone else and unsets
# PYTHONPATH, then sets it from CYLC_PYTHONPATH ...
# https://github.com/cylc/cylc-flow/issues/5124
# We need to filter this out, spack knows what it is doing.
@run_after("install")
def fix_cylc_pythonpath_mangling(self):
python_version = self.spec["python"].version.up_to(2)
pydir = join_path(self.prefix.lib, "python{0}".format(python_version), "site-packages")
cylc_dot_py = join_path(pydir, "cylc/flow/scripts/cylc.py")
filter_file(r"^pythonpath_manip\(\)$", "# spack knows what it is doing, skip 'pythonpath_manip()'", cylc_dot_py)

0 comments on commit e2bde7f

Please sign in to comment.