Skip to content

Commit

Permalink
Add an all-together tarball and make setuptools etc aware of installe…
Browse files Browse the repository at this point in the history
…d packages
  • Loading branch information
rupertnash committed Sep 13, 2021
1 parent 4987585 commit b6a797d
Show file tree
Hide file tree
Showing 2 changed files with 40 additions and 1 deletion.
30 changes: 29 additions & 1 deletion .github/workflows/ubuntu.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ on:
env:
VTK_VERSION: 8.2.0
ITK_VERSION: 4.13.3
VMTK_VERSION: 1.4.1-hemelb
VMTK_VERSION: 1.4.1-rc2
VMTK_HASH: 63a3b990328d8dfaa6ffd31968fc341cad9dbe67
PLATFORM: ubuntu

Expand Down Expand Up @@ -85,6 +85,12 @@ jobs:
if: steps.cache-vtk.outputs.cache-hit != 'true'
run: cmake --install build

- name: Make visible to setuptools
env:
SITE_PACKAGES_DIR: /opt/vtk/lib/python${{ matrix.python-version }}/site-packages
NAME: vtk
run: VERSION=$VTK_VERSION builder/bodge-dist-info.sh

- name: Make archive
working-directory: /opt/vtk
run: >
Expand Down Expand Up @@ -163,6 +169,12 @@ jobs:
if: steps.cache-itk.outputs.cache-hit != 'true'
run: cmake --install build

- name: Make visible to setuptools
env:
SITE_PACKAGES_DIR: /opt/itk/lib/python${{ matrix.python-version }}/site-packages
NAME: itk
run: VERSION=$ITK_VERSION builder/bodge-dist-info.sh

- name: Make archive
working-directory: /opt/itk
run: >
Expand Down Expand Up @@ -274,6 +286,12 @@ jobs:
if: steps.cache-vmtk.outputs.cache-hit != 'true'
run: cmake --install build

- name: Make visible to setuptools
env:
SITE_PACKAGES_DIR: /opt/vmtk/lib/python${{ matrix.python-version }}/site-packages
NAME: vmtk
run: VERSION=$VMTK_VERSION builder/bodge-dist-info.sh

- name: Make archive
working-directory: /opt/vmtk
run: >
Expand Down Expand Up @@ -318,6 +336,15 @@ jobs:
with:
name: VMTK-${{ env.VMTK_VERSION }}-${{ env.PLATFORM }}-py${{ matrix.python-version }}

- name: Make combined tarball
run: |
mkdir -p /opt/vmtk
tar -xzf VTK-${{ env.VTK_VERSION }}-${{ env.PLATFORM }}-py${{ matrix.python-version }}.tar.gz -C /opt/vmtk
tar -xzf ITK-${{ env.ITK_VERSION }}-${{ env.PLATFORM }}-py${{ matrix.python-version }}.tar.gz -C /opt/vmtk
tar -xzf VMTK-${{ env.VMTK_VERSION }}-${{ env.PLATFORM }}-py${{ matrix.python-version }}.tar.gz -C /opt/vmtk
cd /opt/vmtk
tar -czf ${{ github.workspace }}/all-${{ env.VMTK_VERSION }}-${{ env.PLATFORM }}-py${{ matrix.python-version }}.tar.gz *
- name: Add tarballs to release assets
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
Expand All @@ -326,3 +353,4 @@ jobs:
VTK-${{ env.VTK_VERSION }}-${{ env.PLATFORM }}-py${{ matrix.python-version }}.tar.gz
ITK-${{ env.ITK_VERSION }}-${{ env.PLATFORM }}-py${{ matrix.python-version }}.tar.gz
VMTK-${{ env.VMTK_VERSION }}-${{ env.PLATFORM }}-py${{ matrix.python-version }}.tar.gz
all-${{ env.VMTK_VERSION }}-${{ env.PLATFORM }}-py${{ matrix.python-version }}.tar.gz
11 changes: 11 additions & 0 deletions bodge-dist-info.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
#!/bin/bash

# Just make some basic stuff show up for setuptools

distinfo=$SITE_PACKAGES_DIR/$NAME-$VERSION.dist-info
mkdir -p $distinfo
cat > $distinfo/METADATA <<EOF
Metadata-Version: 2.1
Name: $NAME
Version: $VERSION
EOF

0 comments on commit b6a797d

Please sign in to comment.