Skip to content
Snippets Groups Projects
Commit 7680d966 authored by Andrew Rowley's avatar Andrew Rowley
Browse files

Try just getting it ourselves

parent 28870e03
No related branches found
No related tags found
No related merge requests found
......@@ -7,10 +7,12 @@ from spack.package import *
from spack.fetch_strategy import URLFetchStrategy
from spack.store import find
from llnl.util import tty
from os import makedirs
from urllib.request import urlretrieve
import os
_JAR_URL = "https://github.com/SpiNNakerManchester/JavaSpiNNaker/releases/download/7.0.0/spinnaker-exe.jar"
_JAR_SHA256 = "2d909c7fb3aa15886acf26febb1bd48e25db0c347a231944aa6a5f86107bb55b"
class PySpinnfrontendcommon(PythonPackage):
"""This package provides utilities for specifying binary data
......@@ -19,8 +21,6 @@ class PySpinnfrontendcommon(PythonPackage):
homepage = "https://github.com/SpiNNakerManchester/SpiNNFrontEndCommon"
pypi = "SpiNNFrontEndCommon/SpiNNFrontEndCommon-1!7.0.0.tar.gz"
resource(name="spinnaker-exe.jar", url=_JAR_URL, checksum=_JAR_SHA256, expand=False, destination="JavaSpiNNaker/SpiNNaker-front-end/target")
version("7.0.0", sha256="07539734ed0105472d06d655bbd92e149ef44c77c388fcca28857558faa6dd10")
depends_on("python@3.7:", type=("build", "run"))
......@@ -40,8 +40,12 @@ class PySpinnfrontendcommon(PythonPackage):
python_spec = find("python@3.7:")[0]
python_version = ".".join(str(v) for v in python_spec.version.version[0:2])
python_lib = f"python{python_version}"
site_packages = prefix.lib.join(python_lib).site_packages
install_tree("JavaSpiNNaker", site_packages.JavaSpiNNaker)
site_packages = prefix.lib.join(python_lib).join("site-packages")
java_folder = site_packages.JavaSpiNNaker.join("SpiNNaker-front-end").target
java_exe = java_folder.join("spinnaker-exe.jar")
makedirs(java_folder)
urlretrieve(_JAR_URL, java_exe)
tty.debug(f"Received {java_exe} from {_JAR_URL}")
# Test where things are now installed
tty.debug(f"Checking contents of {prefix}")
......
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment