Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
ebrains-spack-builds
Manage
Activity
Members
Labels
Plan
Issues
38
Issue boards
Milestones
Wiki
Code
Merge requests
29
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package Registry
Container Registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
EBRAINS RI
Tech Hub
Platform
EBRAINS Software Distribution
ebrains-spack-builds
Commits
675b000e
Commit
675b000e
authored
1 year ago
by
Eric Müller
Browse files
Options
Downloads
Patches
Plain Diff
feat(BSS-2): support spack fetch
parent
b64c2519
No related branches found
Branches containing commit
No related tags found
1 merge request
!500
feat(BSS-2): support spack fetch
Pipeline
#27992
passed with stage
in 13 hours, 34 minutes, and 47 seconds
Changes
2
Pipelines
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
packages/hxtorch/package.py
+30
-10
30 additions, 10 deletions
packages/hxtorch/package.py
packages/pynn-brainscales/package.py
+30
-10
30 additions, 10 deletions
packages/pynn-brainscales/package.py
with
60 additions
and
20 deletions
packages/hxtorch/package.py
+
30
−
10
View file @
675b000e
...
...
@@ -3,6 +3,7 @@
#
# SPDX-License-Identifier: (Apache-2.0 OR MIT)
import
os
import
unittest.mock
from
spack
import
*
from
spack.util.environment
import
EnvironmentModifications
...
...
@@ -18,7 +19,7 @@ class Hxtorch(WafPackage):
maintainers
=
[
'
emuller
'
]
version
(
'
7.0-rc1-fixup2
'
,
branch
=
'
waf
'
)
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
...
...
@@ -64,6 +65,33 @@ class Hxtorch(WafPackage):
depends_on
(
'
yaml-cpp+shared
'
,
type
=
(
'
build
'
,
'
link
'
,
'
run
'
))
extends
(
'
python
'
)
def
do_fetch
(
self
,
mirror_only
=
False
):
"""
Setup the project.
"""
self
.
stage
.
create
()
self
.
stage
.
fetch
(
mirror_only
)
# if fetcher didn't do anything, it's cached already
if
not
os
.
path
.
exists
(
self
.
stage
.
source_path
):
return
with
working_dir
(
self
.
stage
.
source_path
):
waf
=
which
(
'
./waf
'
)
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
)
)
# in the configure step, we need access to all archived .git folders
def
custom_archive
(
self
,
destination
):
super
(
spack
.
fetch_strategy
.
GitFetchStrategy
,
self
).
archive
(
destination
)
with
unittest
.
mock
.
patch
(
'
spack.fetch_strategy.GitFetchStrategy.archive
'
,
new
=
custom_archive
):
self
.
stage
.
cache_local
()
def
_setup_common_env
(
self
,
env
):
# grenade needs to find some libraries for the JIT-compilation of
# programs for BrainScaleS-2's embedded processor.
...
...
@@ -116,15 +144,7 @@ class Hxtorch(WafPackage):
# override configure step as we perform a project setup first
def
configure
(
self
,
spec
,
prefix
):
"""
Setup and configure the project.
"""
self
.
waf
(
'
setup
'
,
'
--repo-db-url=https://github.com/electronicvisions/projects
'
,
'
--without-munge
'
,
'
--without-hxcomm-hostarq
'
,
'
--without-hxcomm-extoll
'
,
'
--project=hxtorch
'
,
'
--release-branch=ebrains-
'
+
str
(
spec
.
version
)
)
"""
Configure the project.
"""
args
=
[
'
--prefix={0}
'
.
format
(
self
.
prefix
)]
args
+=
self
.
configure_args
()
...
...
This diff is collapsed.
Click to expand it.
packages/pynn-brainscales/package.py
+
30
−
10
View file @
675b000e
...
...
@@ -3,6 +3,7 @@
#
# SPDX-License-Identifier: (Apache-2.0 OR MIT)
import
os
import
unittest.mock
from
spack
import
*
from
spack.util.environment
import
EnvironmentModifications
...
...
@@ -18,7 +19,7 @@ class PynnBrainscales(WafPackage):
maintainers
=
[
'
emuller
'
]
version
(
'
7.0-rc1-fixup2
'
,
branch
=
'
waf
'
)
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
...
...
@@ -61,6 +62,33 @@ class PynnBrainscales(WafPackage):
depends_on
(
'
yaml-cpp+shared
'
,
type
=
(
'
build
'
,
'
link
'
,
'
run
'
))
extends
(
'
python
'
)
def
do_fetch
(
self
,
mirror_only
=
False
):
"""
Setup the project.
"""
self
.
stage
.
create
()
self
.
stage
.
fetch
(
mirror_only
)
# if fetcher didn't do anything, it's cached already
if
not
os
.
path
.
exists
(
self
.
stage
.
source_path
):
return
with
working_dir
(
self
.
stage
.
source_path
):
waf
=
which
(
'
./waf
'
)
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
)
)
# in the configure step, we need access to all archived .git folders
def
custom_archive
(
self
,
destination
):
super
(
spack
.
fetch_strategy
.
GitFetchStrategy
,
self
).
archive
(
destination
)
with
unittest
.
mock
.
patch
(
'
spack.fetch_strategy.GitFetchStrategy.archive
'
,
new
=
custom_archive
):
self
.
stage
.
cache_local
()
def
_setup_common_env
(
self
,
env
):
# grenade needs to find some libraries for the JIT-compilation of
# programs for BrainScaleS-2's embedded processor.
...
...
@@ -113,15 +141,7 @@ class PynnBrainscales(WafPackage):
# override configure step as we perform a project setup first
def
configure
(
self
,
spec
,
prefix
):
"""
Setup and configure the project.
"""
self
.
waf
(
'
setup
'
,
'
--repo-db-url=https://github.com/electronicvisions/projects
'
,
'
--without-munge
'
,
'
--without-hxcomm-hostarq
'
,
'
--without-hxcomm-extoll
'
,
'
--project=pynn-brainscales
'
,
'
--release-branch=ebrains-
'
+
str
(
spec
.
version
)
)
"""
Configure the project.
"""
args
=
[
'
--prefix={0}
'
.
format
(
self
.
prefix
)]
args
+=
self
.
configure_args
()
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment