diff --git a/.github/workflows/test_installer.yaml b/.github/workflows/test_installer.yaml index d9e6dc24..ef71d32c 100644 --- a/.github/workflows/test_installer.yaml +++ b/.github/workflows/test_installer.yaml @@ -1,12 +1,11 @@ on: push: - branches: [develop] + branches: ["develop"] pull_request: - branches: [develop] + branches: ["develop"] jobs: build: - runs-on: ubuntu-latest strategy: @@ -19,13 +18,27 @@ jobs: uses: actions/setup-python@v5 with: python-version: ${{ matrix.python-version }} - - name: Install dependencies + + - name: Create work directory run: | - python -m pip install --upgrade pip - pip install setuptools wheel + mkdir workdir + echo "WORKDIR=$(pwd)/workdir" >> $GITHUB_OUTPUT + + - name: Create and activate virtual environment + run: | + cd $WORKDIR + python -m venv .venv + source .venv/bin/activate + - name: Install package run: | - pip install . + cd $WORKDIR + source .venv/bin/activate + python -m pip install --upgrade pip + pip install $GITHUB_WORKSPACE + - name: Run post-installation test run: | - python -c "import hed" \ No newline at end of file + cd $WORKDIR + source .venv/bin/activate + python -c "from hed.models.hed_string import HedString; print('Import test passed.')" diff --git a/pyproject.toml b/pyproject.toml index 6c308f2b..bc817e5b 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -62,8 +62,11 @@ versionfile_build = "hed/_version.py" tag_prefix = "" parentdir_prefix = "hedtools-" -[tool.setuptools] -packages = ["hed"] + +[tool.setuptools.packages.find] +where = [""] +include = ["hed*"] +namespaces = false [tool.setuptools.package-data] hed = ["schema/schema_data/*.xml"]