Skip to content
Snippets Groups Projects
Commit 63aa1a96 authored by David Schwörer's avatar David Schwörer
Browse files

Add recipe to build wheels

parent 4fd9dfb9
No related branches found
No related tags found
No related merge requests found
Pipeline #95060 failed
image: quay.io/pypa/manylinux2014_x86_64
manylinux2014:
script:
- bash --login tools/pylib/_boutcore_build/build-wheels.sh
......@@ -8,7 +8,7 @@ helper.h:helper.h.in
helper.cxx:helper.cxx.in
boutcpp.pxd:boutcpp.pxd.in
TOGEN=setup.py boutcore.pyx resolve_enum.pxd helper.cxx helper.h boutcpp.pxd
TOGEN=setup.py boutcore.pyx resolve_enum.pxd helper.cxx helper.h boutcpp.pxd setup.cfg
$(TOGEN): Makefile $(BOUT_TOP)/make.config $(BOUT_TOP)/bin/bout-config common.sh
@echo " Generating $@"
@PATH=$(BOUT_TOP)/bin:$$PATH PY=$(PY) bash $@.in > $@.tmp \
......
......@@ -1771,4 +1771,6 @@ EOF
cat helper.py
cat ../boutconfig/__init__.py
bash resolve_enum_inv.pyx.in
yum -y install mpich-devel fftw-devel netcdf-*-devel
./configure --enable-shared
make -j 4
cd tools/pylib/_boutcore_build/
PLAT=$1
function repair_wheel {
wheel="$1"
if ! auditwheel show "$wheel"; then
echo "Skipping non-platform wheel $wheel"
else
auditwheel repair "$wheel" --plat "$PLAT" -w /io/wheelhouse/
fi
}
for PYBIN in /opt/python/*/bin;
do
make clean
$PYBIN/pip install -r numpy cython
PY=$PYBIN/python make
"${PYBIN}/pip" wheel . --no-deps -w wheelhouse/
done
for whl in wheelhouse/*.whl; do
LD_LIBRARY_PATH=$(realpath ../../../lib/) repair_wheel "$whl"
done
for PYBIN in /opt/python/*/bin/; do
"${PYBIN}/pip" install python-manylinux-demo --no-index -f /io/wheelhouse
(cd "$HOME"; "${PYBIN}/nosetests" pymanylinuxdemo)
done
version=$(git tag -l --points-at HEAD)
if ! $version ; then
version=$(PYTHONPATH=.. $PY -c "import boutconfig ; print(boutconfig.config['version'])").dev$(git log --oneline |wc -l)
fi
cat <<EOF
[metadata]
name = boutcore
version = $version
EOF
cat <<"EOF"
url = https://boutproject.github.io/
project_urls =
Bug Tracker = https://github.com/boutproject/BOUT-dev/issues
Documentation = https://omadesala.physics.dcu.ie/bout/
author = Ben Dudson et al
maintainer = David Schwörer
maintainer_email = dave@ipp.mpg.de
description = BOUT++: Plasma fluid finite-difference simulation code in curvilinear coordinate systems
license = LGPL
python_requires = >=3.5
long_description = file: README.md
long_description_content_type = text/markdown
classifiers =
Development Status :: 3 - Alpha
Intended Audience :: Science/Research
Intended Audience :: Education
Intended Audience :: Developers
License :: OSI Approved :: GNU Lesser General Public License v3 or later (GPLv3+)
Natural Language :: English
Operating System :: POSIX :: Linux
Programming Language :: Python :: 3.6
Programming Language :: Python :: 3.7
Programming Language :: Python :: 3.8
Programming Language :: Python :: 3.9
[options]
setup_requires =
setuptools>=42
setuptools_scm[toml]>=3.4
setuptools_scm_git_archive
cython
numpy
install_requires =
cython
numpy
tests_require =
pytest >= 3.3.0
include_package_data = True
packages = find:
[options.extras_require]
docs = sphinx >= 1.4
[build_sphinx]
project = $metadata.name
version = $metadata.version
release = $metadata.version
source-dir = docs
EOF
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment