Skip to content

Latest commit

 

History

History
104 lines (79 loc) · 2.25 KB

HOWTO.md

File metadata and controls

104 lines (79 loc) · 2.25 KB

ecmwflibs

Compiling on a Mac

Creating the macos version of the package

First make sure you have the required packages:

brew install python3
brew install cmake
brew install pango cairo proj pkg-config
brew install netcdf ninja
pip3 install delocate wheel

This can be achieved by simply typing:

make tools

Then:

cd ~/git/ecmwflibs
make clean
make
twine upload wheelhouse/*

To select an earlier version of Python, use pyenv:

brew install pyenv
brew install pyenv-virtualenv
pyenv install 3.6.5
pyenv virtualenv 3.6.5 py36

pyenv activate py36
pip3 install ninja delocate wheel
cd ~/git/ecmwflibs
make clean
make
twine upload wheelhouse/*

Creating the linux version of the package

Cross compiling a Linux version on a Mac requires Docker installed.

cd ~/git/ecmwflibs
make image
make clean
./dockcross-build-ecmwflibs make
twine upload wheelhouse/*

You can also compile interactivaly

./dockcross-build-ecmwflibs bash
make
exit

Creating all linux versions of the package

cd ~/git/ecmwflibs
make image
make clean
./dockcross-build-ecmwflibs make wheels.linux
twine upload wheelhouse/*

Compiling on Linux

Not tried, but the docker-based solution should work.

Usefull links

On wheels:

https://snarky.ca/the-challenges-in-designing-a-library-for-pep-425/

[vagrant@centos8 ~]$ pip3 install ecmwflibs Collecting ecmwflibs Could not find a version that satisfies the requirement ecmwflibs (from versions: ) No matching distribution found for ecmwflibs [vagrant@centos8 ~]$ pip3 install --upgrade pip3 Collecting pip3 Could not find a version that satisfies the requirement pip3 (from versions: ) No matching distribution found for pip3 [vagrant@centos8 ~]$ pip3 install --upgrade pip Collecting pip