spack/var/spack/repos/builtin/packages/py-pygit2/package.py
sid 943c8091c2
py-fairscale and dependencies py-pgzip libgit2 py-pygit2 (#39220)
* simple build of py-openai

* added variants to py-openai

* py-pandas-stubs is a dependency for py-openai

* fixed format and flake8 errors for py-openai

* black format error for py-pandas-stubs

* [@spackbot] updating style on behalf of sidpbury

* made style and format changes to py-openai

* made style and format changes to py-pandas-stubs

* py-types-pytz is a dependency for py-openai

* [@spackbot] updating style on behalf of sidpbury

* updated py-openpyxl for ver 3.0.7 and 3.1.2

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

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

* ajs requested changes for py-openai

* updated py-openpyxl for supported python

* [@spackbot] updating style on behalf of sidpbury

* updated py-openpyxl

* removed requirement.txt dependencies in  py-openpyxl

* removed python depends on from openpyxl

* updated package to support newer versions

* updated version of py-pygit2

* py-fairscale is a new package in support of torch

* py-pgzip is a dependency for py-fairscale

* switch fairscale pypi, added extra variant for convenience

* removed python dependency

* changed multiple requirement versions

* changes for upstream py-fairscale

* changes for upsteam py-pygit2

* Update package.py

* Update package.py

* sorted out some of the dependency versions

* removed version 1.12.2 because dependency could not be met

* updated py-cached-property dependency

* suggested changes from adamjstewart

---------

Co-authored-by: Adam J. Stewart <ajstewart426@gmail.com>
2023-09-11 16:11:02 -05:00

51 lines
2.4 KiB
Python

# 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 PyPygit2(PythonPackage):
"""Pygit2 is a set of Python bindings to the libgit2 shared library,
libgit2 implements the core of Git.
"""
homepage = "https://www.pygit2.org/"
pypi = "pygit2/pygit2-1.12.2.tar.gz"
version("1.12.1", sha256="56e85d0e66de957d599d1efb2409d39afeefd8f01009bfda0796b42a4b678358")
version("1.11.1", sha256="793f583fd33620f0ac38376db0f57768ef2922b89b459e75b1ac440377eb64ec")
version("1.6.0", sha256="7aacea4e57011777f4774421228e5d0ddb9a6ddb87ac4b542346d17ab12a4d62")
version("1.4.0", sha256="cbeb38ab1df9b5d8896548a11e63aae8a064763ab5f1eabe4475e6b8a78ee1c8")
version("1.3.0", sha256="0be93f6a8d7cbf0cc79ae2f0afb1993fc055fc0018c27e2bd01ba143e51d4452")
version("0.28.2", sha256="4d8c3fbbf2e5793a9984681a94e6ac2f1bc91a92cbac762dbdfbea296b917f86")
depends_on("py-setuptools", type="build")
# https://www.pygit2.org/install.html#version-numbers
depends_on("libgit2@1.6", when="@1.12")
depends_on("libgit2@1.5", when="@1.10:1.11")
depends_on("libgit2@1.4", when="@1.9")
depends_on("libgit2@1.3", when="@1.7:1.8")
depends_on("libgit2@1.1", when="@1.4:1.6")
depends_on("libgit2@1.0", when="@1.2:1.3")
depends_on("libgit2@0.99:1.0", when="@1.1")
depends_on("libgit2@0.28", when="@0.28:1.0")
depends_on("python@3.8:3.11", when="@1.11:1.12.1")
depends_on("python@:3.10", when="@1.7:1.10")
depends_on("python@:3.9", when="@1.4:1.6")
depends_on("python@:3.8", when="@1.0:1.3")
depends_on("python@:3.7", when="@0.28")
depends_on("py-six", type=("build", "run"), when="@:0.28.2")
depends_on("py-cffi@1.4.0:", when="@:1.5", type=("build", "run"))
depends_on("py-cffi@1.6.0:", when="@1.6:1.7", type=("build", "run"))
depends_on("py-cffi@1.9.1:", when="@1.8:", type=("build", "run"))
depends_on("py-cached-property", when="@1.1:1.5", type=("build", "run"))
depends_on("py-cached-property", when="@1.6: ^python@:3.7", type=("build", "run"))
def setup_build_environment(self, env):
spec = self.spec
# https://www.pygit2.org/install.html
env.set("LIBGIT2", spec["libgit2"].prefix)
env.set("LIBGIT2_LIB", spec["libgit2"].prefix.lib)