Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
6 changes: 6 additions & 0 deletions .github/workflows/test-spack.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,12 @@ jobs:
run: |
git clone --depth 1 https://github.com/spack/spack /tmp/spack
pip install -e .[all]
pip install pytest

- name: Test Spack
run: |
export PATH=/tmp/spack/bin:$PATH
pytest -xs tests/test_spack.py

- name: List Files
run: ls .
Expand Down
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ and **Merged pull requests**. Critical items to know are:
The versions coincide with releases on pip. Only major versions will be released as tags on Github.

## [0.0.x](https://github.scom/syspack/pakages/tree/main) (0.0.x)
- bug with parsing hidden (and non package directories) in spack (0.0.19)
- bugfixes to install and adding GitHub action (0.0.18)
- checking for existing mirrors before adding blindly
- updates to spack build (0.0.17)
Expand Down
4 changes: 3 additions & 1 deletion pakages/builders/spack/client.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@
import pakages.builders.spack.cache as spack_cache
import pakages.client
import pakages.oras
import pakages.utils
from pakages.logger import logger


Expand Down Expand Up @@ -49,7 +50,8 @@ def parse_package_request(self, packages):

# If we don't have packages and we have a repo, derive from PWD
if repo and not packages:
packages = os.listdir(repo)
for path in pakages.utils.recursive_find(repo, "package.py"):
packages.append(os.path.basename(os.path.dirname(path)))

# Finally, add the repository
if repo:
Expand Down
2 changes: 1 addition & 1 deletion pakages/version.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
__copyright__ = "Copyright 2021-2022, Vanessa Sochat and Alec Scott"
__license__ = "Apache-2.0"

__version__ = "0.0.18"
__version__ = "0.0.19"
AUTHOR = "Vanessa Sochat, Alec Scott"
NAME = "pakages"
PACKAGE_URL = "https://github.com/syspack/pakages"
Expand Down
Empty file.
26 changes: 26 additions & 0 deletions tests/test_spack.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
#!/usr/bin/python

# Copyright (C) 2022 Vanessa Sochat.

# This Source Code Form is subject to the terms of the
# Mozilla Public License, v. 2.0. If a copy of the MPL was not distributed
# with this file, You can obtain one at http://mozilla.org/MPL/2.0/.

import os
import pytest
from pakages.builders.spack import SpackClient

here = os.path.abspath(os.path.dirname(__file__))

def test_list_dir(tmp_path):
"""
Test upgrade from a filesystem registry.
"""
cli = SpackClient()
pwd = os.getcwd()
test_dir = os.path.join(here, "spack")
os.chdir(test_dir)

request = cli.parse_package_request(['.'])
assert len(request) == 1
assert "zlib" in request