From 043528816e2116897ffcfff0dde3bd3cd121ded8 Mon Sep 17 00:00:00 2001 From: lepelog Date: Sun, 24 May 2020 19:41:48 +0200 Subject: [PATCH] manylinux working --- README.md | 7 +++++++ build-on-manylinux.sh | 20 ++++++++++++++++++++ src/CMakeLists.txt | 2 +- 3 files changed, 28 insertions(+), 1 deletion(-) create mode 100644 build-on-manylinux.sh diff --git a/README.md b/README.md index 5a5245e..3b3e6b7 100644 --- a/README.md +++ b/README.md @@ -45,6 +45,13 @@ When no binary build is available, pip will automatically build from source duri To build and install from source run `pip3 install .`. +### Building for manylinux +- Use the manylinux docker container in this directory: + `docker run -v $PWD:/home/build/nlzss11 -ti quay.io/pypa/manylinux2010_x86_64 bash` +- Install cmake3 via yum and override old cmake +- Install pybind11 from source +- run `setup.py bdist_wheel` with every cpython version you want from `/opt/python` + ## License This software is licensed under the terms of the GNU General Public License, version 2 or later. diff --git a/build-on-manylinux.sh b/build-on-manylinux.sh new file mode 100644 index 0000000..7e17234 --- /dev/null +++ b/build-on-manylinux.sh @@ -0,0 +1,20 @@ +# activate devtoolset to be able to use c++17 +/opt/rh/devtoolset-8/enable + +# install cmake +yum install -y cmake3 +# override old +ln -sf /usr/bin/cmake3 /usr/bin/cmake + +# install pybind11 +mkdir ~/temp_pybind +cd ~/temp_pybind +curl -L https://github.com/pybind/pybind11/archive/v2.5.0.tar.gz -o pybind11.tar.gz && tar -xzf pybind11.tar.gz && cd pybind11-2.5.0/ + +mkdir build && cd build +cmake -DPYBIND11_TEST=false .. +make && make install + +cd ~ && rm -rf ~/temp_pybind + +cd /home/build/nlzss11 diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt index ceed336..b2f0be6 100644 --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt @@ -1,4 +1,4 @@ -cmake_minimum_required(VERSION 3.10) +cmake_minimum_required(VERSION 3.0) project(nlzss11 CXX) if (MSVC)