diff --git a/CMakeLists.txt b/CMakeLists.txt index 1315d9b..fe5e518 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -1,20 +1,8 @@ cmake_minimum_required(VERSION 2.8.12) project(pydegensac) -add_definitions(-DA64) -add_definitions(-std=c++11) add_definitions(-fPIC) - - -FIND_PACKAGE(OpenMP) -if (OPENMP_FOUND) - SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${OpenMP_CXX_FLAGS}") - set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} ${OpenMP_CXX_FLAGS}") - set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} ${OpenMP_C_FLAGS}") -endif (OPENMP_FOUND) - - enable_language (Fortran) FIND_PACKAGE(LAPACK REQUIRED) if (LAPACK_FOUND) diff --git a/docker/Dockerfile b/docker/Dockerfile new file mode 100644 index 0000000..186cede --- /dev/null +++ b/docker/Dockerfile @@ -0,0 +1,24 @@ +FROM quay.io/pypa/manylinux1_x86_64:latest + +#Taken from https://github.com/skvark/opencv-python/blob/master/docker/Dockerfile_x86_64 +RUN curl -O -L https://cmake.org/files/v3.9/cmake-3.9.0.tar.gz && \ + tar -xf cmake-3.9.0.tar.gz && \ + cd cmake-3.9.0 && \ + #manylinux1 provides curl-devel equivalent and libcurl statically linked + # against the same newer OpenSSL as other source-built tools + # (1.0.2s as of this writing) + yum -y install zlib-devel && \ + #configure does a bootstrap make under the hood + export MAKEFLAGS=-j$(getconf _NPROCESSORS_ONLN) && \ + ./configure --system-curl && \ + make && \ + make install && \ + cd .. && \ + rm -rf cmake-3.9.0* + +# https://trac.ffmpeg.org/wiki/CompilationGuide/Centos#GettheDependencies +# manylinux provides the toolchain and git; we provide cmake +RUN yum install -y lapack-devel blas-devel + + +ENV PATH "$HOME/bin:$PATH" diff --git a/docker/how-to-create-wheel.txt b/docker/how-to-create-wheel.txt new file mode 100644 index 0000000..a1da24b --- /dev/null +++ b/docker/how-to-create-wheel.txt @@ -0,0 +1,4 @@ +login into docker +alias cmake=/usr/local/bin/cmake +/opt/python/cp36-cp36m/bin/python3 setup.py bdist_wheel +auditwheel repair dist/pydegensac-0.1.1-cp36-cp36m-linux_x86_64.whl diff --git a/setup.py b/setup.py index 222f87c..0c9eb42 100755 --- a/setup.py +++ b/setup.py @@ -91,7 +91,7 @@ def copy_test_file(self, src_file): copyfile(src_file, dest_file) copymode(src_file, dest_file) -requirements = [ 'numpy', 'cmake'] +requirements = [ ] setup( name='pydegensac', @@ -106,6 +106,7 @@ def copy_test_file(self, src_file): packages=find_packages('src'), package_dir={'':'src'}, ext_modules=[CMakeExtension('pydegensac/pydegensac')], + extra_compile_args = ["-O0"], cmdclass=dict(build_ext=CMakeBuild), #test_suite='tests', zip_safe=False,