Commit 76c2cde6 authored by LAMBERT Jean-charles's avatar LAMBERT Jean-charles

add wheel support to macosx

parent 86a9f082
Pipeline #1467 passed with stage
in 1 minute and 12 seconds
......@@ -16,8 +16,9 @@ stages:
variables :
TWINE_USERNAME: jcl
TWINE_PASSWORD: $TEST_PY_PASSWD
WHEEL : 0
WHEEL : 0
TESTPYPI : 0
OSX : 0
before_script:
# clone
......@@ -26,6 +27,9 @@ before_script:
#- git branch -r
#- git checkout origin/new_cmake
#
# BUILD wheels for all linux flavors/python
#
manylinux2010 :
stage : build
image : portus.lam.fr/jclamber/unsio-manylinux2010
......@@ -48,6 +52,7 @@ manylinux2010 :
paths:
- test-*.res
- wheel/*
expire_in: 1 week
push-testpypi-manylinux2010:
stage: testpypi
......@@ -63,6 +68,32 @@ push-testpypi-manylinux2010:
- wheel/
#
# BUILD wheels for macosx
#
OSX:
stage : build
tags:
- osx_10.13.6
only :
variables:
- $OSX == "1"
script:
# build
- CI/scriptOSX/build-unsio.sh
- CI/scriptOSX/build-wheel.sh
- CI/scriptOSX/repair-wheel.sh
- CI/scriptOSX/test-unsio.sh
cache:
key: osx
paths:
- wheel/
artifacts:
name: "osx-wheel"
paths:
- test-*.res
- wheel/*
expire_in: 1 week
#
# RPM Distros
#
opensuse42.3 :
......
#!/bin/bash
# build wheel
#PATH=/opt/usr/bin/:/opt/python/cp27-cp27m/bin:${PATH} pip wheel ./unsio/ -w wheelhouse
......
#!/bin/bash
cd /
git clone https://gitlab.lam.fr/jclamber/unsio.git
......
#!/bin/bash
# Bundle external shared libraries into the wheels
for whl in wheelhouse/*unsio*.whl; do
echo "repairing $whl...."
auditwheel repair "$whl" -w ./wheel
done
#!/bin/bash
# install & test wheel
for PYPATH in /opt/python/*; do
......
#!/bin/bash
# Configure building environment
# We must deactivate RPATH (-DNO_RPATH=1) to allow to unsiolib to
# be included into the wheels
cmake . -DNO_RPATH=1
make -j 2
make install
#!/bin/bash
# Activate python environement
# Build wheel
for PYENV in ${HOME}/venv/unsio*; do
echo "Activate ${PYENV}...."
source ${PYENV}/bin/activate
pip wheel --no-deps ./ -w wheelhouse
deactivate
done
#!/bin/bash
# Activate python37 to have delocate-wheel
# delocate-wheel works the same with all python versions
source ${HOME}/venv/unsio37/bin/activate
# Bundle external shared libraries into the wheels
for whl in wheelhouse/*unsio*.whl; do
echo "repairing $whl...."
delocate-wheel "$whl" -w ./wheel
done
# de-activate python37
deactivate
#!/bin/bash
# Install unsio wheel for every python
# Run test program
for PYVER in 34 35 36 37; do
PYENV=${HOME}/venv/unsio${PYVER}
echo "Activate ${PYENV}...."
source ${PYENV}/bin/activate
pip install wheel/*unsio*${PYVER}*-macosx*.whl
python -m unsio.test.ctestunsio --out test-${PYVER}.res
deactivate
done
......@@ -51,7 +51,7 @@ class CUNS_OUT:
General method to set Data to uns snapshot
Argument:
- data_array : 1D numpy_array or value to save
- data_array : 1D numpy_array or single value to save
- select : component or list of components (ex: gas or gas,stars)
- tag : pos,vel,mass,rho...etc see https://projets.lam.fr/projects/unsio/wiki/GetDataDescription
......
//-*- C -*-
//-*- C -*-
// ============================================================================
// Copyright Jean-Charles LAMBERT - 2008-2015
// Centre de donneeS Astrophysiques de Marseille (CeSAM)
// e-mail: Jean-Charles.Lambert@lam.fr
// address: Aix Marseille Universite, CNRS, LAM
// Laboratoire d'Astrophysique de Marseille
// Pole de l'Etoile, site de Chateau-Gombert
// 38, rue Frederic Joliot-Curie
// 13388 Marseille cedex 13 France
// CNRS UMR 7326
// Copyright Jean-Charles LAMBERT - 2008-2019
// Centre de donneeS Astrophysiques de Marseille (CeSAM)
// e-mail: Jean-Charles.Lambert@lam.fr
// address: Aix Marseille Universite, CNRS, LAM
// Laboratoire d'Astrophysique de Marseille
// Pole de l'Etoile, site de Chateau-Gombert
// 38, rue Frederic Joliot-Curie
// 13388 Marseille cedex 13 France
// CNRS UMR 7326
// ============================================================================
// Swig python interface for UNSIO
// ============================================================================
......@@ -126,4 +126,3 @@
//%template(CunsOutF) uns::CunsOut2<float>;
%template(CunsOut) uns::CunsOut2<float>;
%template(CunsOutD) uns::CunsOut2<double>;
......@@ -87,7 +87,7 @@ def setup_package():
long_description_content_type='text/markdown',
author='Jean-Charles LAMBERT',
author_email='jean-charles.lambert@lam.fr',
url='https://projets.lam.fr/projects/unsio',
url='https://projets.lam.fr/projects/unsio/wiki',
license='CeCILL2.1 (https://opensource.org/licenses/CECILL-2.1)',
classifiers=[
"Intended Audience :: Developers",
......@@ -122,7 +122,7 @@ def setup_package():
os.environ['HOME']+'/local/unsio/lib/x86_64-linux-gnu',
'/usr/lib64', '/lib64'],
runtime_library_dirs=[
os.environ['HOME']+'/local/unsio/lib',
os.environ['HOME']+'/local/unsio/lib',
os.environ['HOME']+'/local/unsio/lib/x86_64-linux-gnu',
'/usr/lib64', '/lib64']
)
......
Markdown is supported
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