Skip to content
Open
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
12 changes: 6 additions & 6 deletions .github/actions/build-manylinux/python2.7/build_alembic.sh
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ cd /home/
# Download and build dependencies of alembic

# Download, build and install python
wget https://www.python.org/ftp/python/2.7.18/Python-2.7.18.tgz
wget --no-check-certificate https://www.python.org/ftp/python/2.7.18/Python-2.7.18.tgz
tar -xzf Python-2.7.18.tgz
cd Python-2.7.18
./configure --enable-optimizations --enable-shared --enable-unicode=ucs4
Expand All @@ -23,31 +23,31 @@ python2.7 get-pip.py
python2.7 -m pip install numpy

# Boost 1.55
wget https://sourceforge.net/projects/boost/files/boost/1.55.0/boost_1_55_0.tar.gz/download -O boost.tar.gz
wget --no-check-certificate https://sourceforge.net/projects/boost/files/boost/1.55.0/boost_1_55_0.tar.gz/download -O boost.tar.gz
tar -xzf boost.tar.gz
cd boost_1_55_0
./bootstrap.sh --with-libraries=program_options,python --with-python=/usr/local/bin/python2.7
./b2 install
cd .. && rm -rf boost_1_55_0 boost.tar.gz

# Ilmbase
wget http://download.savannah.gnu.org/releases/openexr/ilmbase-2.2.0.tar.gz
wget --no-check-certificate http://download.savannah.gnu.org/releases/openexr/ilmbase-2.2.0.tar.gz
tar -xzf ilmbase-2.2.0.tar.gz
cd ilmbase-2.2.0
./configure
make install -j 4
cd .. && rm -rf ilmbase-2.2.0 ilmbase.2.2.0.tar.gz

# PyIlmBase
wget http://download.savannah.gnu.org/releases/openexr/pyilmbase-2.2.0.tar.gz
wget --no-check-certificate http://download.savannah.gnu.org/releases/openexr/pyilmbase-2.2.0.tar.gz
tar -xzf pyilmbase-2.2.0.tar.gz
cd pyilmbase-2.2.0
PYTHON=/usr/local/bin/python2.7 ./configure
make -j 4 && make install
cd .. && rm -rf pyilmbase-2.2.0 pyilmbase.2.2.0.tar.gz

# Build cmake 3.20
wget https://github.com/Kitware/CMake/releases/download/v3.20.0/cmake-3.20.0.tar.gz
wget --no-check-certificate https://github.com/Kitware/CMake/releases/download/v3.20.0/cmake-3.20.0.tar.gz
tar -xzf cmake-3.20.0.tar.gz
cd cmake-3.20.0
./bootstrap
Expand All @@ -61,7 +61,7 @@ python2.7 setup.py bdist_wheel
find . -type f -iname "*-linux*.whl" -execdir sh -c "auditwheel repair '{}' -w ./ --plat '${PLAT}' || { echo 'Repairing wheels failed.'; auditwheel show '{}'; exit 1; }" \;

# Install our wheel
WHEEL=$(find . -type f -iname "*-manylinux*.whl")
WHEEL=$(find . -type f -iname "*-linux*.whl")
echo "Successfully built wheel, running a test pip install: $WHEEL"
python2.7 -m pip install "$WHEEL"

Expand Down
12 changes: 11 additions & 1 deletion .github/actions/build-manylinux/python3.7/build_alembic.sh
Original file line number Diff line number Diff line change
Expand Up @@ -8,11 +8,21 @@ cd /github/workspace/ # Default location of packages in docker action
python3.7 setup.py bdist_wheel
python3.7 -m pip show alembic

# Patchelf 0.14.5
wget --no-check-certificate https://github.com/NixOS/patchelf/releases/download/0.14.5/patchelf-0.14.5.tar.gz
tar -xzf patchelf-0.14.5.tar.gz
cd patchelf-0.14.5
./configure
make -j 4 && make install

# Return to default location docker action
cd /github/workspace/

# Bundle external shared libraries into the wheels
find . -type f -iname "*-linux*.whl" -execdir sh -c "auditwheel repair '{}' -w ./ --plat '${PLAT}' || { echo 'Repairing wheels failed.'; auditwheel show '{}'; exit 1; }" \;

# Install our wheel
WHEEL=$(find . -type f -iname "*-manylinux*.whl")
WHEEL=$(find . -type f -iname "*-linux*.whl")
echo "Successfully built wheel, running a test pip install: $WHEEL"
python3.7 -m pip install --force-reinstall "$WHEEL"

Expand Down
22 changes: 22 additions & 0 deletions .github/actions/build-manylinux/python3.9/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
FROM aswf/ci-usd:2022.4

# install auditwheel and dependency
RUN yum install -y patchelf
RUN pip install auditwheel

# build imath dependency (although this comes with ci-usd so should be unnecessary)
RUN git clone --depth 1 --branch v3.0.4 https://github.com/AcademySoftwareFoundation/Imath.git /Imath
RUN mkdir /imathbuild
RUN cd /imathbuild
RUN cmake /Imath -DPYTHON=ON
RUN make
RUN make install

# Setup dev environment
ENV PLAT manylinux_2_17_x86_64

# Copy build script and build
COPY build_alembic.sh /entrypoint.sh
RUN chmod +x /entrypoint.sh

ENTRYPOINT [ "/entrypoint.sh" ]
7 changes: 7 additions & 0 deletions .github/actions/build-manylinux/python3.9/build-manylinux.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
# action.yml
name: 'Python 3.9 Manylinux Wheel'
author: 'Stefan Jeske, Max Last'
description: 'Build manylinux wheels for a Python package'
runs:
using: 'docker'
image: 'Dockerfile'
38 changes: 38 additions & 0 deletions .github/actions/build-manylinux/python3.9/build_alembic.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
#!/bin/bash

# Debugging options
set -e -x

# Build Alembic
cd /github/workspace/ # Default location of packages in docker action
python3.9 setup.py bdist_wheel
python3.9 -m pip show alembic

# Patchelf 0.14.5
wget --no-check-certificate https://github.com/NixOS/patchelf/releases/download/0.14.5/patchelf-0.14.5.tar.gz
tar -xzf patchelf-0.14.5.tar.gz
cd patchelf-0.14.5
./configure
make -j 4 && make install

# Return to default location docker action
cd /github/workspace/

# Bundle external shared libraries into the wheels
find . -type f -iname "*-linux*.whl" -execdir sh -c "auditwheel repair '{}' -w ./ --plat '${PLAT}' || { echo 'Repairing wheels failed.'; auditwheel show '{}'; exit 1; }" \;

# Install our wheel
WHEEL=$(find . -type f -iname "*-linux*.whl")
echo "Successfully built wheel, running a test pip install: $WHEEL"
python3.9 -m pip install --force-reinstall "$WHEEL"

python3.9 -m pip show alembic

echo "$PYTHONPATH"

# make sure python has access to the alembic libraries
export PYTHONPATH=$PYTHONPATH:/usr/local/lib/python3.9/site-packages

# Run tests before releasing build
cd ./python/PyAlembic/Tests
python3.9 -m unittest discover
9 changes: 9 additions & 0 deletions .github/workflows/wheels.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,4 +20,13 @@ jobs:
- uses: actions/upload-artifact@v2
with:
name: python3.7wheel
path: dist/*-manylinux*.whl
py39:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: ./.github/actions/build-manylinux/python3.9
- uses: actions/upload-artifact@v2
with:
name: python3.9wheel
path: dist/*-manylinux*.whl
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@ def build_extension(self, ext):

if missing_packages:
error = "Unable to find packages: %s" % missing_packages
raise Exception(error)
# raise Exception(error)

# build
cmake_args = ['-DCMAKE_LIBRARY_OUTPUT_DIRECTORY=' + extdir,
Expand Down