srio / wheels

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

wheels for the Oasys project

The easy installation of OASYS (https://oasys-kit.github.io/) requires creating wheels of three packages that contain C, C++ and/or fortran code:

Wheels are required for 3 platforms (linux, MacOS and Windows).

In Linux, the wheels are created with dockers available in https://github.com/pypa/manylinux, typically running python setup.py bdist_wheel and then we run auditwheel repair <WHEEL> --plat "manylinux2014_x86_64" -w wheels.

The creationof wheels for different python version is automated using the ESRF bob system: https://gitlab.esrf.fr/silx/bob

Status(available wheels)

in bob:

in pypi:

Other information

For Oasys:

  • xraylib 4.1.2 [at least in MacOS] does not work with Oasys standard numpy 1.19.2 but requires a higher version (it works with 1.21.6)
  • Before upgrading Shadow in MacOS, remove the old installation ```rm -rf /Applications/Oasys1.2.app/Contents/Frameworks/Python.framework/Versions/3.7/lib/python3.7/site-packages/Shadow/``

Docker memorandum:

(it may need "sudo" before the command)

  • Load docker: docker run -it quay.io/pypa/manylinux2010_x86_64 /bin/bash
  • To select python to use export PATH=/opt/python/cp36-cp36m/bin:${PATH}
  • List all running/stopped docker: docker ps -a
  • Stop a docker: docker stop <CONTAINER ID>
  • Remove a docker: docker rm <CONTAINER ID>
  • List images: docker images
  • Remove an image: docker rmi <IMAGE ID>

CentOS memorandum:

docker pull centos
docker run -it centos /bin/bash
...

cd /etc/yum.repos.d/
sed -i 's/mirrorlist/#mirrorlist/g' /etc/yum.repos.d/CentOS-*
sed -i 's|#baseurl=http://mirror.centos.org|baseurl=http://vault.centos.org|g' /etc/yum.repos.d/CentOS-*
yum update -y
yum install wget
yum install git

Update pypi with bob wheels:

cd shadow3/dist
wget -r -nd --no-parent -A '*.gz' https://silx.gitlab-pages.esrf.fr/bob/shadow3/
wget -r -nd --no-parent -A '*.whl' https://silx.gitlab-pages.esrf.fr/bob/shadow3/
cd ..
python -m twine upload dist/*

About

License:MIT License