Skip to content

Commit

Permalink
Disable install of mac sdk
Browse files Browse the repository at this point in the history
Handle case where version is in the extension for a library
Include c++ library for linking mixed program
  • Loading branch information
langmm committed May 22, 2024
1 parent 2d03801 commit 0f1e581
Show file tree
Hide file tree
Showing 4 changed files with 24 additions and 31 deletions.
25 changes: 0 additions & 25 deletions .github/workflows/test-install.yml
Original file line number Diff line number Diff line change
Expand Up @@ -488,11 +488,6 @@ jobs:
${{ matrix.python-version }} --use-mamba
'
- if: runner.os == 'macOS' && (matrix.install-method == 'conda' || matrix.install-method
== 'mamba')
name: (MACOS,CONDA) Install old MacOSX SDK for compatibility with the conda
llvm (7)
run: ./utils/setup_old_mac_sdk.sh
- if: runner.os == 'Linux' && matrix.install-sbml == true
name: (LINUX) Install ncurses 5 for SBML runs with libroadrunner
run: sudo apt-get install libncurses5 libncurses5-dev libncursesw5-dev
Expand Down Expand Up @@ -895,11 +890,6 @@ jobs:
${{ matrix.python-version }} --use-mamba
'
- if: runner.os == 'macOS' && (matrix.install-method == 'conda' || matrix.install-method
== 'mamba')
name: (MACOS,CONDA) Install old MacOSX SDK for compatibility with the conda
llvm (7)
run: ./utils/setup_old_mac_sdk.sh
- if: runner.os == 'Linux' && matrix.install-sbml == true
name: (LINUX) Install ncurses 5 for SBML runs with libroadrunner
run: sudo apt-get install libncurses5 libncurses5-dev libncursesw5-dev
Expand Down Expand Up @@ -1278,11 +1268,6 @@ jobs:
${{ matrix.python-version }} --use-mamba
'
- if: runner.os == 'macOS' && (matrix.install-method == 'conda' || matrix.install-method
== 'mamba')
name: (MACOS,CONDA) Install old MacOSX SDK for compatibility with the conda
llvm (7)
run: ./utils/setup_old_mac_sdk.sh
- if: runner.os == 'Linux' && matrix.install-sbml == true
name: (LINUX) Install ncurses 5 for SBML runs with libroadrunner
run: sudo apt-get install libncurses5 libncurses5-dev libncursesw5-dev
Expand Down Expand Up @@ -1642,11 +1627,6 @@ jobs:
${{ matrix.python-version }} --use-mamba
'
- if: runner.os == 'macOS' && (matrix.install-method == 'conda' || matrix.install-method
== 'mamba')
name: (MACOS,CONDA) Install old MacOSX SDK for compatibility with the conda
llvm (7)
run: ./utils/setup_old_mac_sdk.sh
- if: runner.os == 'Linux' && matrix.install-sbml == true
name: (LINUX) Install ncurses 5 for SBML runs with libroadrunner
run: sudo apt-get install libncurses5 libncurses5-dev libncursesw5-dev
Expand Down Expand Up @@ -2005,11 +1985,6 @@ jobs:
${{ matrix.python-version }} --use-mamba
'
- if: runner.os == 'macOS' && (matrix.install-method == 'conda' || matrix.install-method
== 'mamba')
name: (MACOS,CONDA) Install old MacOSX SDK for compatibility with the conda
llvm (7)
run: ./utils/setup_old_mac_sdk.sh
- if: runner.os == 'Linux' && matrix.install-sbml == true
name: (LINUX) Install ncurses 5 for SBML runs with libroadrunner
run: sudo apt-get install libncurses5 libncurses5-dev libncursesw5-dev
Expand Down
6 changes: 3 additions & 3 deletions utils/test-install-base.yml
Original file line number Diff line number Diff line change
Expand Up @@ -275,9 +275,9 @@ jobs:
conda deactivate
conda activate base
python utils/setup_test_env.py build ${{ matrix.install-method }} --python ${{ matrix.python-version }} --use-mamba
- name: (MACOS,CONDA) Install old MacOSX SDK for compatibility with the conda llvm (7)
if: runner.os == 'macOS' && (matrix.install-method == 'conda' || matrix.install-method == 'mamba')
run: ./utils/setup_old_mac_sdk.sh
# - name: (MACOS,CONDA) Install old MacOSX SDK for compatibility with the conda llvm (7)
# if: runner.os == 'macOS' && (matrix.install-method == 'conda' || matrix.install-method == 'mamba')
# run: ./utils/setup_old_mac_sdk.sh
- name: (LINUX) Install ncurses 5 for SBML runs with libroadrunner
if: runner.os == 'Linux' && matrix.install-sbml == true
run: sudo apt-get install libncurses5 libncurses5-dev libncursesw5-dev
Expand Down
2 changes: 2 additions & 0 deletions yggdrasil/drivers/CPPModelDriver.py
Original file line number Diff line number Diff line change
Expand Up @@ -167,6 +167,8 @@ class GPPLinker(GCCLinker):
languages = GPPCompiler.languages
default_executable = GPPCompiler.default_executable
toolset = GPPCompiler.toolset
standard_library = GPPCompiler.standard_library
libraries = {}


class ClangPPLinker(ClangLinker):
Expand Down
22 changes: 19 additions & 3 deletions yggdrasil/drivers/CompiledModelDriver.py
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@
_all_toolsets = [
'gnu', 'msvc', 'llvm',
]
_default_libtype = 'shared' # TODO: retry static'
_default_libtype = 'static' # TODO: retry static'
_conda_prefix = tools.get_conda_prefix()
_venv_prefix = tools.get_venv_prefix()
_system_suffix = ""
Expand Down Expand Up @@ -924,7 +924,11 @@ def splitext(cls, fname):
if fname.endswith('.dll.a'):
ext = '.dll.a'
return fname.rsplit(ext, 1)[0], ext
return os.path.splitext(fname)
base, ext = os.path.splitext(fname)
while ext and ext.startswith('.') and ext[1:].isnumeric():
base, ext2 = os.path.splitext(base)
ext = ext2 + ext
return (base, ext)

@property
def internal(self):
Expand Down Expand Up @@ -3021,6 +3025,15 @@ def _dependency_order(self, **kwargs):
self.driver.libraries.add_compiler_libraries(self.basetool)
alldeps.append((self.basetool.languages[0],
self.basetool.standard_library))
if ((self['libtype'] in self.linked_files
and self.tool('linker').standard_library
and self.is_rebuildable
and self.name != self.tool('linker').standard_library
and self.mixed_toolset)):
linker = self.tool('linker')
drv = import_component('model', linker.languages[0])
drv.libraries.add_compiler_libraries(linker)
alldeps.append((linker.languages[0], linker.standard_library))
spec_libs = self.parent_driver.libraries.specialized(**spec_kws)
for d in alldeps:
dep = spec_libs.get(d)
Expand Down Expand Up @@ -3637,6 +3650,8 @@ def _search_linked(self, filetype, **kwargs):
for lib in self.basetool.find_component(
self.name, cfg=self.cfg, flags=flags,
component_types='shared_libraries', **kwargs):
# TODO: temp
print(f"FIND_COMPONENT {self.name}: {lib}")
out = self._search_brute(lib, libtype='shared', **kwargs)
if out:
break
Expand Down Expand Up @@ -3683,7 +3698,8 @@ def _search_brute(self, fname, libtype=None, verbose=False,
fname = fname_base + fname_ext
else:
expected_ext = self.extension(libtype, return_all=True)
if fname_ext not in expected_ext:
if (((fname_ext not in expected_ext)
and not fname_ext.startswith(tuple(expected_ext)))):
fname = fname_base + expected_ext[0]
fname_ext = expected_ext[0]
if os.path.isfile(fname):
Expand Down

0 comments on commit 0f1e581

Please sign in to comment.