Skip to content

Commit

Permalink
Add importlib_metadata for python <=3.8
Browse files Browse the repository at this point in the history
  • Loading branch information
rjfarmer committed Jan 28, 2024
1 parent 8652f59 commit 9ed7bed
Show file tree
Hide file tree
Showing 4 changed files with 20 additions and 2 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/qemu.yml
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ jobs:
apt-get update &&
apt-get install -y cmake git python3 python-is-python3 python3-dev python3-venv python3-pip python3-numpy automake libc6-dev linux-libc-dev gcc gfortran &&
git config --global --add safe.directory /gfort2py &&
python -m pip install build wheel pytest dataclasses_json cpyparsing platformdirs
python -m pip install build wheel pytest dataclasses_json cpyparsing platformdirs importlib_metadata
"
docker commit ${TOOLCHAIN_NAME} ${TOOLCHAIN_NAME}
docker save -o docker_${TOOLCHAIN_NAME}.tar ${TOOLCHAIN_NAME}
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/scripts/run_arm.sh
Original file line number Diff line number Diff line change
Expand Up @@ -14,4 +14,4 @@ docker load -i docker_${TOOLCHAIN_NAME}.tar

docker start ${TOOLCHAIN_NAME}

docker run -v $(pwd):/gfort2py --platform ${PLATFORM_NAME} ${TOOLCHAIN_NAME}/bin/bash -c "cd /gfort2py && python -m pip install . && python -m pytest -v"
docker run -v $(pwd):/gfort2py --platform ${PLATFORM_NAME} ${TOOLCHAIN_NAME} /bin/bash -c "cd /gfort2py && python -m pip install . && python -m pytest -v"
17 changes: 17 additions & 0 deletions .github/workflows/scripts/run_s390x.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
#!/bin/bash

export NAME="s390x"
export TOOLCHAIN_NAME="s390x-linux-gnu"
export DOCKER_CONTAINER="s390x/ubuntu:22.04"
export PLATFORM_NAME="linux/s390x"

cd ~/src/gfort2py/tests
make clean
cd ~/src/gfort2py

docker run --rm --privileged multiarch/qemu-user-static --reset -p yes
docker load -i docker_${TOOLCHAIN_NAME}.tar

docker start ${TOOLCHAIN_NAME}

docker run -v $(pwd):/gfort2py --platform ${PLATFORM_NAME} ${TOOLCHAIN_NAME} /bin/bash -c "cd /gfort2py && python -m pip install . && python -m pytest -v"
1 change: 1 addition & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,7 @@ dependencies = [
"cpyparsing >=2.4.7, <=2.5",
"platformdirs >=3, <=5",
"dataclasses_json >=0.6, <=1.0",
"importlib_metadata" # Needed for python <3.8
]

dynamic = ["version"]
Expand Down

0 comments on commit 9ed7bed

Please sign in to comment.