mirror of
https://github.com/bensuperpc/dockcross.git
synced 2024-11-10 05:07:26 +01:00
commit
dda710167a
16
Makefile
16
Makefile
@ -2,9 +2,9 @@ DOCKER = docker
|
||||
ORG = dockcross
|
||||
BIN = bin
|
||||
|
||||
images: base android-arm linux-x86 linux-x64 manylinux-x64 linux-arm64 linux-armv5 linux-armv6 linux-armv7 windows-x86 windows-x64
|
||||
images: base android-arm linux-x86 linux-x64 manylinux-x64 manylinux-x86 linux-arm64 linux-armv5 linux-armv6 linux-armv7 windows-x86 windows-x64
|
||||
|
||||
test: base.test android-arm.test linux-x86.test linux-x64.test manylinux-x64.test linux-arm64.test linux-armv5.test linux-armv6.test linux-armv7.test windows-x86.test windows-x64.test
|
||||
test: base.test android-arm.test linux-x86.test linux-x64.test manylinux-x64.test manylinux-x86.test linux-arm64.test linux-armv5.test linux-armv6.test linux-armv7.test windows-x86.test windows-x64.test
|
||||
|
||||
android-arm: base android-arm/Dockerfile
|
||||
$(DOCKER) build -t $(ORG)/android-arm android-arm
|
||||
@ -81,6 +81,16 @@ manylinux-x64.test: manylinux-x64 test/run.py
|
||||
$(DOCKER) run --rm dockcross/manylinux-x64 > $(BIN)/dockcross-manylinux-x64 && chmod +x $(BIN)/dockcross-manylinux-x64
|
||||
$(BIN)/dockcross-manylinux-x64 /opt/python/cp35-cp35m/bin/python test/run.py
|
||||
|
||||
manylinux-x86/Dockerfile: manylinux-x86/Dockerfile.in common.docker
|
||||
sed '/common.docker/ r common.docker' manylinux-x86/Dockerfile.in > manylinux-x86/Dockerfile
|
||||
|
||||
manylinux-x86: manylinux-x86/Dockerfile
|
||||
$(DOCKER) build -t $(ORG)/manylinux-x86 -f manylinux-x86/Dockerfile .
|
||||
|
||||
manylinux-x86.test: manylinux-x86 test/run.py
|
||||
$(DOCKER) run --rm dockcross/manylinux-x86 > $(BIN)/dockcross-manylinux-x86 && chmod +x $(BIN)/dockcross-manylinux-x86
|
||||
$(BIN)/dockcross-manylinux-x86 /opt/python/cp35-cp35m/bin/python test/run.py
|
||||
|
||||
windows-x86: base windows-x86/Dockerfile windows-x86/settings.mk
|
||||
$(DOCKER) build -t $(ORG)/windows-x86 windows-x86
|
||||
|
||||
@ -105,4 +115,4 @@ base.test: base test/run.py
|
||||
mkdir -p $(BIN)
|
||||
$(DOCKER) run --rm dockcross/base > $(BIN)/dockcross-base && chmod +x $(BIN)/dockcross-base
|
||||
|
||||
.PHONY: images base android-arm linux-x86 linux-x64 manylinux-x64 linux-arm64 linux-armv5 linux-armv6 linux-armv7 windows-x86 windows-x64 tests %.test
|
||||
.PHONY: images base android-arm linux-x86 linux-x64 manylinux-x64 manylinux-x86 linux-arm64 linux-armv5 linux-armv6 linux-armv7 windows-x86 windows-x64 tests %.test
|
||||
|
@ -107,6 +107,14 @@ dockcross/manylinux-x64
|
||||
Also has support for the dockcross script, and it has installations of CMake, Ninja, and `scikit-build <http://scikit-build.org>`_
|
||||
|
||||
|
||||
.. |manylinux-x86-images| image:: https://badge.imagelayers.io/dockcross/manylinux-x86:latest.svg
|
||||
:target: https://imagelayers.io/?images=dockcross/manylinux-x86:latest
|
||||
|
||||
dockcross/manylinux-x86
|
||||
|manylinux-x86-images| Docker `manylinux <https://github.com/pypa/manylinux>`_ image for building Linux i686 `Python wheel packages <http://pythonwheels.com/>`_.
|
||||
Also has support for the dockcross script, and it has installations of CMake, Ninja, and `scikit-build <http://scikit-build.org>`_
|
||||
|
||||
|
||||
.. |windows-x64-images| image:: https://badge.imagelayers.io/dockcross/windows-x64:latest.svg
|
||||
:target: https://imagelayers.io/?images=dockcross/windows-x64:latest
|
||||
|
||||
|
@ -34,6 +34,8 @@ dependencies:
|
||||
- docker pull dockcross/linux-x86
|
||||
- if [[ -e ~/docker/manylinux-x64.tar ]]; then docker load -i ~/docker/manylinux-x64.tar; fi
|
||||
- docker pull dockcross/manylinux-x64
|
||||
- if [[ -e ~/docker/manylinux-x86.tar ]]; then docker load -i ~/docker/manylinux-x86.tar; fi
|
||||
- docker pull dockcross/manylinux-x86
|
||||
- if [[ -e ~/docker/windows-x64.tar ]]; then docker load -i ~/docker/windows-x64.tar; fi
|
||||
- docker pull dockcross/windows-x64
|
||||
- if [[ -e ~/docker/windows-x86.tar ]]; then docker load -i ~/docker/windows-x86.tar; fi
|
||||
@ -63,6 +65,8 @@ test:
|
||||
- mkdir -p ~/docker; docker save dockcross/linux-x86 > ~/docker/linux-x86.tar
|
||||
- make manylinux-x64.test
|
||||
- mkdir -p ~/docker; docker save dockcross/manylinux-x64 > ~/docker/manylinux-x64.tar
|
||||
- make manylinux-x86.test
|
||||
- mkdir -p ~/docker; docker save dockcross/manylinux-x86 > ~/docker/manylinux-x86.tar
|
||||
- make windows-x64.test:
|
||||
timeout: 3000
|
||||
- mkdir -p ~/docker; docker save dockcross/windows-x64 > ~/docker/windows-x64.tar
|
||||
@ -86,5 +90,6 @@ deployment:
|
||||
- docker push dockcross/linux-x64
|
||||
- docker push dockcross/linux-x86
|
||||
- docker push dockcross/manylinux-x64
|
||||
- docker push dockcross/manylinux-x86
|
||||
- docker push dockcross/windows-x64
|
||||
- docker push dockcross/windows-x86
|
||||
|
@ -40,3 +40,6 @@ ENV DEFAULT_DOCKCROSS_IMAGE dockcross/linux-x86
|
||||
# https://wiki.debian.org/CrossToolchains#In_jessie_.28Debian_8.29
|
||||
COPY Toolchain.cmake /usr/lib/${CROSS_TRIPLE}/
|
||||
ENV CMAKE_TOOLCHAIN_FILE /usr/lib/${CROSS_TRIPLE}/Toolchain.cmake
|
||||
|
||||
COPY linux32-entrypoint.sh /dockcross/
|
||||
ENTRYPOINT ["/dockcross/linux32-entrypoint.sh"]
|
||||
|
3
linux-x86/linux32-entrypoint.sh
Executable file
3
linux-x86/linux32-entrypoint.sh
Executable file
@ -0,0 +1,3 @@
|
||||
#!/bin/sh
|
||||
|
||||
linux32 "/dockcross/entrypoint.sh" "$@"
|
38
manylinux-x86/Dockerfile.in
Normal file
38
manylinux-x86/Dockerfile.in
Normal file
@ -0,0 +1,38 @@
|
||||
FROM quay.io/pypa/manylinux1_i686:latest
|
||||
MAINTAINER Matt McCormick "matt.mccormick@kitware.com"
|
||||
|
||||
#include "common.docker"
|
||||
|
||||
RUN cd /opt && \
|
||||
wget "http://smarden.org/runit/runit-2.1.2.tar.gz" && \
|
||||
tar xvzf runit-2.1.2.tar.gz && \
|
||||
cd admin/runit-2.1.2 && \
|
||||
./package/install
|
||||
|
||||
COPY manylinux-x64/install-skbuild.sh /usr/local/bin
|
||||
RUN /usr/local/bin/install-skbuild.sh
|
||||
|
||||
RUN yum -y install sudo
|
||||
|
||||
ENV CROSS_TRIPLE i686-linux-gnu
|
||||
ENV CROSS_ROOT /opt/rh/devtoolset-2/root/usr/bin
|
||||
ENV AS=${CROSS_ROOT}/as \
|
||||
AR=${CROSS_ROOT}/ar \
|
||||
CC=${CROSS_ROOT}/gcc \
|
||||
CPP=${CROSS_ROOT}/cpp \
|
||||
CXX=${CROSS_ROOT}/g++ \
|
||||
LD=${CROSS_ROOT}/ld
|
||||
|
||||
COPY linux-x86/${CROSS_TRIPLE}-noop.sh /usr/bin/${CROSS_TRIPLE}-noop
|
||||
|
||||
COPY manylinux-x86/Toolchain.cmake ${CROSS_ROOT}/../lib/
|
||||
ENV CMAKE_TOOLCHAIN_FILE ${CROSS_ROOT}/../lib/Toolchain.cmake
|
||||
ENV DEFAULT_DOCKCROSS_IMAGE dockcross/manylinux-x86
|
||||
|
||||
RUN curl -O https://cmake.org/files/v3.6/cmake-3.6.2-Linux-i386.tar.gz && \
|
||||
tar xzf cmake-3.6.2-Linux-i386.tar.gz && \
|
||||
cp -a cmake-3.6.2-Linux-i386/* /usr/ && \
|
||||
rm -rf cmake-3.6.2-Linux-i386
|
||||
|
||||
COPY linux-x86/linux32-entrypoint.sh /dockcross/
|
||||
ENTRYPOINT ["/dockcross/linux32-entrypoint.sh"]
|
16
manylinux-x86/Toolchain.cmake
Normal file
16
manylinux-x86/Toolchain.cmake
Normal file
@ -0,0 +1,16 @@
|
||||
set(CMAKE_SYSTEM_NAME Linux)
|
||||
set(CMAKE_SYSTEM_VERSION 1)
|
||||
set(CMAKE_SYSTEM_PROCESSOR i686)
|
||||
|
||||
set(cross_triple "i686-linux-gnu")
|
||||
|
||||
set(CMAKE_C_COMPILER /opt/rh/devtoolset-2/root/usr/bin/gcc)
|
||||
set(CMAKE_CXX_COMPILER /opt/rh/devtoolset-2/root/usr/bin/g++)
|
||||
set(CMAKE_ASM_COMPILER /opt/rh/devtoolset-2/root/usr/bin/as)
|
||||
set(CMAKE_Fortran_COMPILER /opt/rh/devtoolset-2/root/usr/bin/gfortran)
|
||||
|
||||
# Discard path returned by pkg-config and associated with HINTS in module
|
||||
# like FindOpenSSL.
|
||||
set(CMAKE_IGNORE_PATH /usr/lib/x86_64-linux-gnu/ /usr/lib/x86_64-linux-gnu/lib/)
|
||||
|
||||
set(CMAKE_CROSSCOMPILING_EMULATOR /usr/bin/${cross_triple}-noop)
|
5
manylinux-x86/install-skbuild.sh
Executable file
5
manylinux-x86/install-skbuild.sh
Executable file
@ -0,0 +1,5 @@
|
||||
#!/bin/bash
|
||||
|
||||
for PIP in /opt/python/*/bin/pip; do
|
||||
$PIP install scikit-build==0.3.0
|
||||
done
|
Loading…
Reference in New Issue
Block a user