Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Johnfreeman/129 update dependencies #169

Closed
wants to merge 22 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
22 commits
Select commit Hold shift + click to select a range
f72fe27
JCF: Issue #129: have daq-cmake be a build-only dependency which brin…
May 6, 2022
a2fe6ce
JCF: Issue #129: update boost dependencies (main change is to build o…
May 6, 2022
061d438
JCF: Issue #129: generate the homepage field in package.py based on w…
May 8, 2022
36dd330
JCF: Issue #129: make sure umbrella packages also get homepages set
May 9, 2022
96bd53c
JCF: Issue #129: ensure daq-cmake is only a dependency of dunedaq whe…
May 9, 2022
3943f0d
JCF: Issue #129: add the new +dev variant of the dunedaq umbrella pac…
May 9, 2022
a6901f1
JCF: Issue #129: since the get_moo_model_path function in daq-cmake i…
May 11, 2022
342da79
JCF: Issue #129: beef up the daq-cmake dependencies to ensure a ~dev …
May 11, 2022
7e750e6
Merge branch 'develop' into johnfreeman/129_update_dependencies
May 13, 2022
9e99862
JCF: Issue #129: generate homepages via subprocess.Popen rather than …
May 17, 2022
8dec0df
JCF: Issue #129: at least for now, remove the concept of a +dev/~dev …
May 17, 2022
aa00dd0
JCF: Issue #129: cyrus-sasl was originally needed on the epdtdi build…
May 17, 2022
052b18b
JCF: Issue #129: modify depends_on calls in trigger's package.py to r…
May 18, 2022
b37598a
Merge branch 'develop' into johnfreeman/129_update_dependencies
Aug 17, 2022
349a28f
JCF: Issue #129: bring a couple of package.pys up-to-date wrt reduced…
Aug 17, 2022
f13fb79
JCF: Issue #129: ensure that packages needed for daq-cmake's build fu…
Aug 18, 2022
913e3a6
JCF: Issue #129: add run-time dependency on daq-cmake for its get_moo…
Aug 18, 2022
6835bdb
JCF: Issue #129: account for the fact that pybind11 isn't needed when…
Aug 18, 2022
0b47f94
JCF: Issue #129: a further correction to daq-cmake's relationship to …
Aug 19, 2022
8d46bf4
JCF: Issue #129: remove *explicit* dependence of dunedaq on daq-cmake…
Aug 19, 2022
59afabe
JCF: Issue #129: account for the fact that moo is actually loaded in …
Aug 26, 2022
73a994d
JCF: Issue #129: After discussion with Pengfei, have the no-dev varia…
Aug 27, 2022
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
46 changes: 42 additions & 4 deletions scripts/spack/make-release-repo.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
import os
import yaml
import argparse
import re
import shutil
import subprocess
import tempfile
Expand Down Expand Up @@ -108,6 +109,35 @@ def generate_repo_file(self, repo_path):
f.write(repo_string)
return

def generate_homepage_url(self, name, ver):
if re.search(r"^dunedaq-v[0-9]", ver):
ver_in_url = ver[len("dunedaq-"):]
official_doc_page = f"https://dune-daq-sw.readthedocs.io/en/{ver_in_url}/packages/{name}/"
else:
official_doc_page = f"https://dune-daq-sw.readthedocs.io/en/latest/packages/{name}/"

irun = subprocess.Popen(f"curl --head --silent --fail {official_doc_page}" , shell=True, stdout=subprocess.PIPE)
out = irun.communicate()
retval = irun.returncode

if retval == 0:
return official_doc_page

github_page = f"https://github.com/DUNE-DAQ/{name}/"

irun = subprocess.Popen(f"curl --head --silent --fail {github_page}" , shell=True, stdout=subprocess.PIPE)
out = irun.communicate()
retval = irun.returncode

if retval == 0:
return github_page

# We're probably dealing with an umbrella package if we've made it to this point
if re.search(r"^dunedaq-v[0-9]", ver):
return f"https://dune-daq-sw.readthedocs.io/en/{ver_in_url}/"
else:
return f"https://dune-daq-sw.readthedocs.io/en/latest/"

def generate_daq_package(self, repo_path, template_dir):
repo_dir = os.path.join(repo_path, "spack-repo", "packages")
template_dir = os.path.join(template_dir, "packages")
Expand All @@ -123,13 +153,15 @@ def generate_daq_package(self, repo_path, template_dir):
else:
lines = lines.replace("XVERSIONX", ipkg["version"])
lines = lines.replace("XHASHX", ipkg["commit"])
# get commit hash
lines = lines.replace("XHOMEPAGEX", self.generate_homepage_url(ipkg["name"], self.rdict["release"]))

ipkg_dir = os.path.join(repo_dir, ipkg["name"])
os.makedirs(ipkg_dir)
ipkgpy = os.path.join(ipkg_dir, "package.py")

with open(ipkgpy, 'w') as o:
o.write(lines)
print(f"Info: package.py has been written at {ipkgpy}.")
print(f"Info: from {os.getcwd()}, package.py has been written at {ipkgpy}.")
return

def generate_umbrella_package(self, repo_path, template_dir):
Expand All @@ -143,6 +175,7 @@ def generate_umbrella_package(self, repo_path, template_dir):
with open(itemp, 'r') as f:
lines = f.read()
lines = lines.replace("XRELEASEX", self.rdict["release"])
lines = lines.replace("XHOMEPAGEX", self.generate_homepage_url(ipkg, self.rdict["release"]))

# now add additional deps:
if ipkg == 'dunedaq':
Expand All @@ -159,14 +192,19 @@ def generate_umbrella_package(self, repo_path, template_dir):
else:
if "dunedaq" not in self.rdict["release"]:
iver = self.rdict["release"]
lines += f'\n depends_on(f"{iname}@{iver} build_type={{build_type}}", when=f"build_type={{build_type}}")'

if iname != "daq-cmake":
lines += f'\n depends_on(f"{iname}@{iver} build_type={{build_type}}", when=f"build_type={{build_type}}")'
else:
lines += f'\n depends_on(f"{iname}@{iver} build_type={{build_type}}", when=f"build_type={{build_type}} +dev")'

lines += '\n'
ipkg_dir = os.path.join(repo_dir, ipkg)
os.makedirs(ipkg_dir)
ipkgpy = os.path.join(ipkg_dir, "package.py")
with open(ipkgpy, 'w') as o:
o.write(lines)
print(f"Info: package.py has been written at {ipkgpy}.")
print(f"Info: from {os.getcwd()}, package.py has been written at {ipkgpy}.")
return

def generate_repo(self, outdir, tempdir, update_hash, release_name):
Expand Down
26 changes: 0 additions & 26 deletions spack-repos/externals/packages/cyrus-sasl/package.py

This file was deleted.

1 change: 0 additions & 1 deletion spack-repos/externals/packages/uhal/package.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@ class Uhal(Package):

version('2.8.1', sha256='73f26639a16ea65cecd367045ad0767a7eb4f5f8f488df1bbf121fc47aec3142', extension='tar.gz')

#depends_on('[email protected]+debug', type='build')
depends_on('boost', type='build')
depends_on('[email protected]', type=('build', 'link', 'run'))
depends_on('[email protected]', type=('build', 'link', 'run'))
Expand Down
8 changes: 4 additions & 4 deletions spack-repos/release-repo-template/packages/appfwk/package.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,15 +10,16 @@
class Appfwk(CMakePackage):
"""Home of daq_application and tools for writing DAQ modules"""

homepage = "https://dune-daq-sw.readthedocs.io/en/latest/packages/appfwk/"
homepage = "XHOMEPAGEX"
git = "https://github.com/DUNE-DAQ/appfwk.git"

maintainers = ["jcfreeman2"]

version("XVERSIONX", commit="XHASHX")


depends_on('daq-cmake')
depends_on('daq-cmake', type=('build', 'run'))
depends_on('py-moo', type=('build'))
depends_on('logging')
depends_on('cetlib')
depends_on('ers')
Expand All @@ -28,9 +29,8 @@ class Appfwk(CMakePackage):
depends_on('opmonlib')

depends_on('nlohmann-json')
depends_on('boost', type='build' )
depends_on("[email protected]")
depends_on('py-moo', type='build')
depends_on('boost' )

# DBT_DEBUG is used by daq-cmake to set compiler options
def cmake_args(self):
Expand Down
11 changes: 5 additions & 6 deletions spack-repos/release-repo-template/packages/cmdlib/package.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,22 +10,21 @@
class Cmdlib(CMakePackage):
"""Interfaces for commanded objects"""

homepage = "https://dune-daq-sw.readthedocs.io/en/latest/packages/cmdlib/"
homepage = "XHOMEPAGEX"
git = "https://github.com/DUNE-DAQ/cmdlib.git"

maintainers = ['jcfreeman2']

version("XVERSIONX", commit="XHASHX")

depends_on('daq-cmake')
depends_on('nlohmann-json')
depends_on("daq-cmake", type="build")
depends_on("py-moo", type="build")
depends_on('cetlib')
depends_on('intel-tbb')
depends_on('nlohmann-json')
depends_on('logging')
depends_on('ers')

depends_on('intel-tbb')
depends_on('py-moo', type='build')

# DBT_DEBUG is used by daq-cmake to set compiler options
def cmake_args(self):
if str(self.spec.variants['build_type']) == "build_type=Debug":
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,21 +10,21 @@
class Ctbmodules(CMakePackage):
"""Control modules for the Central Trigger Board"""

homepage = "https://dune-daq-sw.readthedocs.io/en/latest/packages/ctbmodules/"
homepage = "XHOMEPAGEX"
git = "https://github.com/DUNE-DAQ/ctbmodules.git"

maintainers = ["jcfreeman2"]

version("XVERSIONX", commit="XHASHX")

depends_on("daq-cmake")
depends_on("daq-cmake", type="build")
depends_on("py-moo", type="build")
depends_on("rcif")
depends_on("appfwk")
depends_on("opmonlib")
depends_on("logging")
depends_on("ers")

depends_on("py-moo", type='build')

# DBT_DEBUG is used by daq-cmake to set compiler options
def cmake_args(self):
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,14 +10,15 @@
class DaqCmake(CMakePackage):
"""CMake support for DUNE-DAQ packages"""

homepage = "https://dune-daq-sw.readthedocs.io/en/latest/packages/daq-cmake/"
homepage = "XHOMEPAGEX"
git = "https://github.com/DUNE-DAQ/daq-cmake.git"

maintainers = ["jcfreeman2"]

version("XVERSIONX", commit="XHASHX")

depends_on("py-pybind11")
depends_on("py-pybind11", type=("run"))
depends_on("cmake", type=("build"))

# DBT_DEBUG is used by daq-cmake to set compiler options
def cmake_args(self):
Expand Down
5 changes: 2 additions & 3 deletions spack-repos/release-repo-template/packages/daqconf/package.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,15 +10,14 @@
class Daqconf(CMakePackage):
"""Application to read out Felix data and store it in HDF5 files on disk"""

homepage = "https://github.com/DUNE-DAQ/daqconf"
homepage = "XHOMEPAGEX"
git = "https://github.com/DUNE-DAQ/daqconf.git"

maintainers = ["jcfreeman2"]

version("XVERSIONX", commit="XHASHX")

depends_on("daq-cmake")
depends_on("py-moo", type='build')
depends_on("daq-cmake", type=("build", "run"))

# DBT_DEBUG is used by daq-cmake to set compiler options
def cmake_args(self):
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,16 +10,15 @@
class Daqdataformats(CMakePackage):
"""DUNE DAQ data formats"""

homepage = "https://dune-daq-sw.readthedocs.io/en/latest/packages/daqdataformats/"
homepage = "XHOMEPAGEX"
git = "https://github.com/DUNE-DAQ/daqdataformats.git"

maintainers = ["jcfreeman2"]

version("XVERSIONX", commit="XHASHX")

depends_on("daq-cmake")
depends_on('boost' )
depends_on('py-moo', type='build')
depends_on("daq-cmake", type="build")
depends_on('boost', type='build' )

# DBT_DEBUG is used by daq-cmake to set compiler options
def cmake_args(self):
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,15 +10,15 @@
class Dataformats(CMakePackage):
"""Raw data reinterpretation utilities"""

homepage = "https://dune-daq-sw.readthedocs.io/en/dunedaq-v2.8.0/packages/dataformats/"
homepage = "XHOMEPAGEX"
git = "https://github.com/DUNE-DAQ/dataformats.git"

maintainers = ["jcfreeman2"]

version("XVERSIONX", commit="XHASHX")


depends_on("daq-cmake")
depends_on("daq-cmake", type="build")
depends_on("ers")
depends_on('boost' )
depends_on("logging")
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,18 +10,17 @@
class Detchannelmaps(CMakePackage):
"""DUNE detectors channel maps"""

homepage = "https://dune-daq-sw.readthedocs.io/en/latest/packages/detchannelmaps/"
homepage = "XHOMEPAGEX"
git = "https://github.com/DUNE-DAQ/detchannelmaps.git"

maintainers = ["jcfreeman2"]

version("XVERSIONX", commit="XHASHX")

depends_on("daq-cmake")
depends_on("daq-cmake", type="build")
depends_on("cetlib")
depends_on("logging")
depends_on("ers")
depends_on('py-moo', type='build')

# DBT_DEBUG is used by daq-cmake to set compiler options
def cmake_args(self):
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,16 +10,15 @@
class Detdataformats(CMakePackage):
"""DUNE detectors data formats"""

homepage = "https://dune-daq-sw.readthedocs.io/en/latest/packages/detdataformats/"
homepage = "XHOMEPAGEX"
git = "https://github.com/DUNE-DAQ/detdataformats.git"

maintainers = ["jcfreeman2"]

version("XVERSIONX", commit="XHASHX")

depends_on("daq-cmake")
depends_on("boost")
depends_on('py-moo', type='build')
depends_on("daq-cmake", type="build")
depends_on("boost", type="build")

# DBT_DEBUG is used by daq-cmake to set compiler options
def cmake_args(self):
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,9 @@


class Devtools(BundlePackage):
"""The DUNE DAQ development tools"""
"""An umbrella package which pulls in the DUNE DAQ development tools"""

homepage = "https://dune-daq-sw.readthedocs.io/en/latest/"
homepage = "XHOMEPAGEX"

version("XRELEASEX")

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,18 +10,17 @@
class Dfmessages(CMakePackage):
"""Dataflow messages"""

homepage = "https://dune-daq-sw.readthedocs.io/en/latest/packages/dfmessages/"
homepage = "XHOMEPAGEX"
git = "https://github.com/DUNE-DAQ/dfmessages.git"

maintainers = ["jcfreeman2"]

version("XVERSIONX", commit="XHASHX")

depends_on("daq-cmake")
depends_on("serialization")
depends_on("daq-cmake", type="build")
depends_on("daqdataformats")

depends_on('boost' )
depends_on("serialization")
depends_on('boost', type='build' )

# DBT_DEBUG is used by daq-cmake to set compiler options
def cmake_args(self):
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,15 +10,16 @@
class Dfmodules(CMakePackage):
"""Dataflow Applications"""

homepage = "https://dune-daq-sw.readthedocs.io/en/latest/packages/dfmodules/"
homepage = "XHOMEPAGEX"
git = "https://github.com/DUNE-DAQ/dfmodules.git"

maintainers = ["jcfreeman2"]

version("XVERSIONX", commit="XHASHX")


depends_on("daq-cmake")
depends_on("daq-cmake", type=("build", "run"))
depends_on("py-moo", type="build")
depends_on("appfwk")
depends_on("logging")
depends_on("ers")
Expand All @@ -31,9 +32,6 @@ class Dfmodules(CMakePackage):
depends_on("trigger")
depends_on("serialization")
depends_on("readoutlibs")

depends_on("py-moo", type='build')

depends_on("boost")

# DBT_DEBUG is used by daq-cmake to set compiler options
Expand Down
Loading