Skip to content
Snippets Groups Projects
Commit 96495767 authored by Jean-Baptiste Delisle's avatar Jean-Baptiste Delisle
Browse files

Deploy on Pypi

parent 6657210a
No related branches found
No related tags found
No related merge requests found
Pipeline #29074 passed
......@@ -73,6 +73,10 @@ Release and deploy on Production:
- git config --global user.name 'Gitlab CI'
- git config --global user.email ''
- git remote set-url origin "https://gitlab-ci-token:$RELEASE_TOKEN@gitlab.unige.ch/jean-baptiste.delisle/spleaf.git"
- export PATH=$PATH:$PWD/../miniconda/bin/
- source $PWD/../miniconda/etc/profile.d/conda.sh
- conda env create -f spleaf_env.yml
- conda activate spleaf
script:
# Tag
- VERSION=`grep __version__ spleaf/__info__.py | sed 's/.*version__ = "//' | sed 's/"//'`
......@@ -82,10 +86,14 @@ Release and deploy on Production:
- CHANGES=`cat CHANGES.txt`
# Add release on gitlab (via gitlab API)
- curl -X POST -H "PRIVATE-TOKEN:$RELEASE_TOKEN" -F "name=Release spleaf $TAG_VERSION" -F "tag_name=$TAG_VERSION" -F "ref=$TAG_VERSION" -F "description=Changes:$CHANGES" 'https://gitlab.unige.ch/api/v4/projects/1383/releases'
# Deploy on production
# Deploy on https://obswww.unige.ch/~delisle/
- cp dist/*.tar.gz /www/people/delisle/public/spleaf
- rm -rf /www/people/delisle/public/spleaf/doc/*
- cp -R doc/build/html/* /www/people/delisle/public/spleaf/doc
- rm -rf /www/people/delisle/public/spleaf/doc_hist/${TAG_VERSION}
- cp -R doc/build/html /www/people/delisle/public/spleaf/doc_hist/${TAG_VERSION}
# Deploy on Pypi
- python -m twine upload dist/*.tar.gz
# Upgrade to next version
- MAJOR_DIGIT=`echo $VERSION | awk -F. '{print $1}'`
- MINOR_DIGIT=`echo $VERSION | awk -F. '{print $2}'`
......@@ -98,4 +106,7 @@ Release and deploy on Production:
- git add spleaf/__info__.py
- git commit -m "Upgrade project to next version $NEW_VERSION"
- git push origin master --quiet
after_script:
- conda deactivate
- conda env remove -n spleaf
when: manual
graft spleaf
include COPYING
......@@ -23,11 +23,11 @@ Installation
The S+LEAF package can be installed using the pip utility
``pip install --extra-index-url https://obswww.unige.ch/~delisle spleaf``
``pip install spleaf``
and upgraded with
``pip install --extra-index-url https://obswww.unige.ch/~delisle spleaf --upgrade``
``pip install spleaf --upgrade``
Usage
-----
......
......@@ -26,6 +26,8 @@ path = os.path.abspath(os.path.dirname(__file__))
info = {}
with open(os.path.join(path, 'spleaf', '__info__.py'), 'r') as f:
exec(f.read(), info)
with open('README.rst', 'r', encoding='utf-8') as readme:
long_description = readme.read()
c_ext = Extension('spleaf.libspleaf',
sources=['spleaf/pywrapspleaf.c', 'spleaf/libspleaf.c'],
......@@ -37,6 +39,7 @@ setup(name=info['__title__'],
author_email=info['__author_email__'],
license=info['__license__'],
description=info['__description__'],
long_description=long_description,
url=info['__url__'],
packages=['spleaf'],
ext_modules=[c_ext],
......
......@@ -9,3 +9,4 @@ dependencies:
- numpydoc
- matplotlib
- scipy
- twine
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment