Skip to content

Commit

Permalink
Add git config safe.directory workaround for versioneer
Browse files Browse the repository at this point in the history
  • Loading branch information
djhoese committed Jun 8, 2022
1 parent 14dba22 commit 5ab1323
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 3 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/deploy.yaml
Expand Up @@ -79,7 +79,7 @@ jobs:
/io/continuous_integration/build-manylinux-wheels.sh
- name: Check version number from inside wheel
if: matrix.docker-image != 'manylinux1_i686'
if: matrix.docker-image != 'manylinux2014_i686'
run: |
mv geotiepoints unused_src_to_prevent_local_import
python -m pip install --find-links=./dist/ python-geotiepoints
Expand Down
8 changes: 6 additions & 2 deletions continuous_integration/build-manylinux-wheels.sh
Expand Up @@ -3,14 +3,14 @@ set -e -x

# This is to be run by Docker inside a Docker image.
# You can test it locally on a Linux machine by installing docker and running from this repo's root:
# $ docker run -e PLAT=manylinux1_x86_64 -v `pwd`:/io quay.io/pypa/manylinux1_x86_64 /io/scripts/build-manylinux-wheels.sh
# $ docker run -e PLAT=manylinux2014_x86_64 -v `pwd`:/io quay.io/pypa/manylinux1_x86_64 /io/scripts/build-manylinux-wheels.sh

# * The -e just defines an environment variable PLAT=[docker name] inside the
# docker - auditwheel can't detect the docker name automatically.
# * The -v gives a directory alias for passing files in and out of the docker
# (/io is arbitrary). E.g the `setup.py` script would be accessed in the
# docker via `/io/setup.py`.
# * quay.io/pypa/manylinux1_x86_64 is the full docker image name. Docker
# * quay.io/pypa/manylinux2014_x86_64 is the full docker image name. Docker
# downloads it automatically.
# * The last argument is a shell command that the Docker will execute.
# Filenames must be from the Docker's perspective.
Expand All @@ -24,6 +24,10 @@ mkdir -p /io/temp-wheels
# Clean out any old existing wheels.
find /io/temp-wheels/ -type f -delete

# /io might be owned by someone else since we are in docker
# this may stop versioneer from using git the way it needs
git config --global --add safe.directory /io

# Iterate through available pythons.
for PYBIN in /opt/python/cp3{7,8,9,10}*/bin; do
"${PYBIN}/pip" install -q -U setuptools wheel build --cache-dir /io/pip-cache
Expand Down

0 comments on commit 5ab1323

Please sign in to comment.