Commit 969d3a14 authored by Jonathan Lambrechts's avatar Jonathan Lambrechts
Browse files

build directly from setup.py

parent 4c568710
all :
make -C seamshlib/build
cp seamshlib/build/libseamsh.so seamsh/
python setup.py install --user
html:
......
......@@ -56,9 +56,9 @@ ENV OSXCROSS_HOST=x86_64-apple-darwin19
### doc
USER root
RUN apt-get update && apt-get install -y python3-pip gmsh gdal-bin python3-scipy && pip3 install gmsh-dev sphinx sphinx-rtd-theme sphinx-autodoc-typehints gdal
RUN apt-get update && apt-get install -y python3-pip gmsh gdal-bin python3-scipy && pip3 install sphinx sphinx-rtd-theme sphinx-autodoc-typehints gdal
ENV PYTHONPATH=/usr/local/lib/python3/dist-packages/gmsh-git-Linux64-sdk/lib/
RUN pip3 install -i https://gmsh.info/python-packages --force-reinstall --no-cache-dir gmsh-nox-dev
USER validator
VOLUME ["/etc/gitlab-runner"]
......
......@@ -18,7 +18,8 @@
# along with this program (see COPYING file). If not,
# see <http://www.gnu.org/licenses/>.
import setuptools
from setuptools import setup, Extension
import pkg_resources
import sys
import os
......@@ -30,10 +31,12 @@ commit_tag = os.environ.get("CI_COMMIT_TAG")
if commit_tag and (commit_tag.startswith("v-") or commit_tag.startswith("w-")):
version = commit_tag[2:]
lib_ext = {"linux-x86_64":".so"}[pkg_resources.get_platform()]
os.environ["SETUPTOOLS_EXT_SUFFIX"] = lib_ext
lib = Extension("seamsh.libseamsh", sources = ["seamshlib/seamsh.c","seamshlib/polymesh.c","seamshlib/robustPredicates.c"])
setuptools.setup(
setup(
name="seamsh",
version=version,
author="Jonathan Lambrechts",
......@@ -44,6 +47,7 @@ setuptools.setup(
include_package_data=True,
url="https://git.immc.ucl.ac.be/jlambrechts/seamsh",
packages=["seamsh"],
ext_modules = [lib],
package_dir={"seamsh":"seamsh"},
package_data={"seamsh":["*.so","*.dll","*.dll.a","*.dylib","COPYING.txt","AUTHORS.txt","LICENSE.txt"]},
classifiers=[
......@@ -60,7 +64,3 @@ setuptools.setup(
install_requires=["scipy","numpy","gdal","gmsh"],
python_requires='>=3.6'
)
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment