Skip to content

[FEATURE] spack recipe with parallel variant #779

@mattfil

Description

@mattfil

Problem

In the spack recipe of pymoo, the parallel variants are not supported https://github.com/spack/spack-packages/blob/develop/repos/spack_repo/builtin/packages/py_pymoo/package.py. It would be nice to have them, e.g. with py-joblib.

Proposed Solution

from spack.package import *

class PyPymoo(PythonPackage):

    homepage = "https://pymoo.org"
    git="https://github.com/anyoptimization/pymoo.git"
    pypi = "pymoo/pymoo-0.5.0.tar.gz"
    maintainers("liuyangzhuan")

    license("Apache-2.0")

    version("main",tag="main")
    version("0.6.1.6",tag="0.6.1.6")
    version("0.6.1.5", tag="0.6.1.5")
    version("0.6.1.3", tag="0.6.1.3")
    with default_args(deprecated=True):
        version("0.5.0", sha256="2fbca1716f6b45e430197ce4ce2210070fd3b6b9ec6b17bb25d98486115272c2")
        version("0.4.2", sha256="6ec382a7d29c8775088eec7f245a30fd384b42c40f230018dea0e3bcd9aabdf1")

    depends_on("c", type="build")
    depends_on("cxx", type="build")
    variant("joblib", default=True, description="Enable optional joblib dependency")
    
    with default_args(type="build"):
        depends_on("py-setuptools")
        depends_on("py-setuptools@77:", when="@0.6.1.5")
        depends_on("py-cython@0.29:", when="@0.6.1.3:")

    with default_args(type=("build", "run")):
        depends_on("python@3.4:")
        depends_on("py-autograd")
        depends_on("py-joblib", when="+joblib")
        depends_on("py-moocore")
        
        with when("@0.6.1.5"):
            depends_on("py-numpy@1.19.3:")

        with when("@0.6.1.3:"):
            depends_on("python@3.9:")
            depends_on("py-numpy@1.15:")
            depends_on("py-scipy@1.1:")
            depends_on("py-matplotlib@3:")
            depends_on("py-autograd@1.4:")
            depends_on("py-cma@3.2.2:")
            depends_on("py-alive-progress")
            depends_on("py-dill")
            depends_on("py-deprecated")`

Alternatives

No response

Additional Context

No response

Metadata

Metadata

Assignees

No one assigned

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions