From 98e6e4a3a5caeadbed542cb92cea8746f7492b88 Mon Sep 17 00:00:00 2001 From: "Adam J. Stewart" Date: Fri, 27 Aug 2021 12:57:07 -0500 Subject: New package: py-flit (#25630) --- .../repos/builtin/packages/py-flit-core/package.py | 26 ++++++++++++++++++++++ .../repos/builtin/packages/py-flit/package.py | 22 ++++++++++++++++++ 2 files changed, 48 insertions(+) create mode 100644 var/spack/repos/builtin/packages/py-flit-core/package.py create mode 100644 var/spack/repos/builtin/packages/py-flit/package.py (limited to 'var') diff --git a/var/spack/repos/builtin/packages/py-flit-core/package.py b/var/spack/repos/builtin/packages/py-flit-core/package.py new file mode 100644 index 0000000000..45ca520d2e --- /dev/null +++ b/var/spack/repos/builtin/packages/py-flit-core/package.py @@ -0,0 +1,26 @@ +# Copyright 2013-2021 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 import * + + +class PyFlitCore(Package): + """Distribution-building parts of Flit.""" + + homepage = "https://github.com/takluyver/flit" + url = "https://pypi.io/packages/py3/f/flit-core/flit_core-3.3.0-py3-none-any.whl" + + version('3.3.0', sha256='9b247b3095cb3c43933a59a7433f92ddfdd7fc843e08ef0f4550d53a9cfbbef6', expand=False) + + extends('python') + depends_on('python@3.4:', type=('build', 'run')) + depends_on('py-pip', type='build') + depends_on('py-toml', type=('build', 'run')) + + def install(self, spec, prefix): + # Install wheel instead of installing from source + # to prevent circular dependency on flit + pip = which('pip') + pip('install', self.stage.archive_file, '--prefix={0}'.format(prefix)) diff --git a/var/spack/repos/builtin/packages/py-flit/package.py b/var/spack/repos/builtin/packages/py-flit/package.py new file mode 100644 index 0000000000..0cd7a62363 --- /dev/null +++ b/var/spack/repos/builtin/packages/py-flit/package.py @@ -0,0 +1,22 @@ +# Copyright 2013-2021 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 import * + + +class PyFlit(PythonPackage): + """Flit is a simple way to put Python packages and modules on PyPI.""" + + pypi = "flit/flit-3.3.0.tar.gz" + + version('3.3.0', sha256='65fbe22aaa7f880b776b20814bd80b0afbf91d1f95b17235b608aa256325ce57') + + depends_on('py-flit-core@3.3.0:', type=('build', 'run')) + depends_on('py-requests', type=('build', 'run')) + depends_on('py-docutils', type=('build', 'run')) + depends_on('py-toml', type=('build', 'run')) + + def setup_dependent_package(self, module, dependent_spec): + module.flit = Executable(self.prefix.bin.flit) -- cgit v1.2.3-70-g09d2