From 1014de41d53c305b736ae7180228bc75648faea1 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Eric=20M=C3=BCller?= <mueller@kip.uni-heidelberg.de>
Date: Fri, 15 Mar 2024 09:25:05 +0100
Subject: [PATCH] feat(BSS2): add new versions for next release

---
 packages/hxtorch/package.py          | 27 +++++++++++++++++--------
 packages/oppulance/package.py        |  4 ++++
 packages/pynn-brainscales/package.py | 30 +++++++++++++++++++---------
 3 files changed, 44 insertions(+), 17 deletions(-)

diff --git a/packages/hxtorch/package.py b/packages/hxtorch/package.py
index 63c3e5cc..eac2bab6 100644
--- a/packages/hxtorch/package.py
+++ b/packages/hxtorch/package.py
@@ -19,12 +19,14 @@ class Hxtorch(WafPackage):
 
     maintainers = ['emuller']
 
+    version('8.0-a1',         tag='hxtorch-8.0-a1')
     version('7.0-rc1-fixup3', tag='hxtorch-7.0-rc1-fixup3')
     version('7.0-rc1-fixup2', tag='hxtorch-7.0-rc1-fixup2')
     version('7.0-rc1-fixup1', branch='waf')
 
     # compiler for the BrainScaleS-2 embedded processor ("PPU"); needed for
     # building/linking, at runtime and for testing
+    depends_on('oppulance@8.0-a1', when='@8.0-a1', type=('build', 'link', 'run', 'test'))
     depends_on('oppulance@7.0-rc1-fixup3', when='@7.0-rc1-fixup3', type=('build', 'link', 'run', 'test'))
     depends_on('oppulance@7.0-rc1-fixup2', when='@7.0-rc1-fixup2', type=('build', 'link', 'run', 'test'))
     depends_on('oppulance@7.0-rc1-fixup1', when='@7.0-rc1-fixup1', type=('build', 'link', 'run', 'test'))
@@ -81,14 +83,23 @@ class Hxtorch(WafPackage):
 
         with working_dir(self.stage.source_path):
             python = which('python3')
-            python('./waf', 'setup', '--repo-db-url=https://github.com/electronicvisions/projects',
-                '--clone-depth=2',
-                '--without-munge',
-                '--without-hxcomm-hostarq',
-                '--without-hxcomm-extoll',
-                '--project=hxtorch',
-                '--release-branch=ebrains-' + str(self.spec.version)
-            )
+            if self.spec.satisfies('@:7'):
+                python('./waf', 'setup', '--repo-db-url=https://github.com/electronicvisions/projects',
+                    '--clone-depth=2',
+                    '--without-munge',
+                    '--without-hxcomm-hostarq',
+                    '--without-hxcomm-extoll',
+                    '--project=hxtorch',
+                    '--release-branch=ebrains-' + str(self.spec.version)
+                )
+            else:
+                python('./waf', 'setup', '--repo-db-url=https://github.com/electronicvisions/projects',
+                    '--clone-depth=2',
+                    '--without-munge',
+                    '--without-hxcomm-hostarq',
+                    '--project=hxtorch',
+                    '--release-branch=ebrains-' + str(self.spec.version)
+                )
 
         # in the configure step, we need access to all archived .git folders
         def custom_archive(self, destination):
diff --git a/packages/oppulance/package.py b/packages/oppulance/package.py
index c6e2021b..25f86d7f 100644
--- a/packages/oppulance/package.py
+++ b/packages/oppulance/package.py
@@ -21,6 +21,10 @@ class Oppulance(Package):
     depends_on('gmp')
 
     releases = [
+        {
+            'version': '8.0-a1',
+            'tag': 'ebrains-8.0-a1'
+        },
         {
             'version': '7.0-rc1-fixup3',
             'tag': 'ebrains-7.0-rc1-fixup3'
diff --git a/packages/pynn-brainscales/package.py b/packages/pynn-brainscales/package.py
index 4b088549..6e9a7089 100644
--- a/packages/pynn-brainscales/package.py
+++ b/packages/pynn-brainscales/package.py
@@ -18,13 +18,15 @@ class PynnBrainscales(WafPackage):
     git      = "https://github.com/electronicvisions/pynn-brainscales.git"
 
     maintainers = ['emuller']
-    
+
+    version('8.0-a1',         tag='pynn-brainscales-8.0-a1')
     version('7.0-rc1-fixup3', tag='pynn-brainscales-7.0-rc1-fixup3')
     version('7.0-rc1-fixup2', tag='pynn-brainscales-7.0-rc1-fixup2')
     version('7.0-rc1-fixup1', branch='waf')
 
     # compiler for the BrainScaleS-2 embedded processor ("PPU"); needed for
     # building/linking, at runtime and for testing
+    depends_on('oppulance@8.0-a1', when='@8.0-a1', type=('build', 'link', 'run', 'test'))
     depends_on('oppulance@7.0-rc1-fixup3', when='@7.0-rc1-fixup3', type=('build', 'link', 'run', 'test'))
     depends_on('oppulance@7.0-rc1-fixup2', when='@7.0-rc1-fixup2', type=('build', 'link', 'run', 'test'))
     depends_on('oppulance@7.0-rc1-fixup1', when='@7.0-rc1-fixup1', type=('build', 'link', 'run', 'test'))
@@ -78,14 +80,24 @@ class PynnBrainscales(WafPackage):
 
         with working_dir(self.stage.source_path):
             python = which('python3')
-            python('./waf', 'setup', '--repo-db-url=https://github.com/electronicvisions/projects',
-                '--clone-depth=2',
-                '--without-munge',
-                '--without-hxcomm-hostarq',
-                '--without-hxcomm-extoll',
-                '--project=pynn-brainscales',
-                '--release-branch=ebrains-' + str(self.spec.version)
-            )
+            if self.spec.satisfies('@:7'):
+                python('./waf', 'setup', '--repo-db-url=https://github.com/electronicvisions/projects',
+                    '--clone-depth=2',
+                    '--without-munge',
+                    '--without-hxcomm-hostarq',
+                    '--without-hxcomm-extoll',
+                    '--project=pynn-brainscales',
+                    '--release-branch=ebrains-' + str(self.spec.version)
+                )
+            else:
+                python('./waf', 'setup', '--repo-db-url=https://github.com/electronicvisions/projects',
+                    '--clone-depth=2',
+                    '--without-munge',
+                    '--without-hxcomm-hostarq',
+                    '--project=pynn-brainscales',
+                    '--release-branch=ebrains-' + str(self.spec.version)
+                )
+
 
         # in the configure step, we need access to all archived .git folders
         def custom_archive(self, destination):
-- 
GitLab