###

### source distribution
# update version number
$ rm -rf dist/*
$ python3 setup.py sdist
$ twine check dist/*        # check syntax
$ python3 -m twine upload --repository testpypi dist/*    # upload at testpypi
$ python3 -m twine upload dist/*                          # uploade to the official

### building step-by-step
pip download -i  https://test.pypi.org/simple/ mfem
python3 setup.py install --prefix=~/sandbox --verbose --with-parallel

### test inside virtualenv
virtualenv env
source env/bin/activate

### test verious pip combinations
pip3 install -i  https://test.pypi.org/simple  mfem --no-binary mfem --verbose
pip3 install -i  https://test.pypi.org/simple  mfem --no-binary mfem --verbose --prefix=~/sandbox

virtualenv env
source env/bin/activate
pip3 install -i  https://test.pypi.org/simple  mfem --no-binary mfem --verbose


### docker ...

sudo docker pull quay.io/pypa/manylinux2010_x86_64
sudo docker run -it -v $(pwd):/io quay.io/pypa/manylinux2010_x86_64
###  (may not need this) yum install openssh-server openssh-clients
git clone git@github.com:mfem/PyMFEM.git
export PATH=/opt/python/cp36-cp36m/bin:$PATH
pip install numpy
pip install six
pip install auditwheel
pip install twine
python3 setup.py install
rm -rf dist/*
python3 setup.py bdist_wheel
export LD_LIBRARY_PATH=/root/PyMFEM/external/mfem/cmbuild_ser/:$LD_LIBRARY_PATH
rm -rf wheelhouse/*
auditwheel repair dist/mfem-4.2.1.30-cp38-cp38-linux_x86_64.whl
rm -rf dist/*
python3 setup.py sdist

### make a test release
testrelease_binary uses test_release branch and push a package to test PyPI.
this action triggers when a new tag whose name stats with test_ is
created.

