Commit 1c81181c authored by Daniel Scheffler's avatar Daniel Scheffler

Replaced deprecated PyPi upload commands by twine. Updated version info.

Signed-off-by: Daniel Scheffler's avatarDaniel Scheffler <danschef@gfz-potsdam.de>
parent 8b1029ef
Pipeline #4466 failed with stages
in 27 minutes and 3 seconds
...@@ -4,8 +4,6 @@ before_script: ...@@ -4,8 +4,6 @@ before_script:
# Advise GitLab that these environment vars should be loaded from the Variables config. # Advise GitLab that these environment vars should be loaded from the Variables config.
variables: variables:
PYPI_USER: SECURE
PYPI_PASSWORD: SECURE
ANACONDA_USER: SECURE ANACONDA_USER: SECURE
ANACONDA_PASSWORD: SECURE ANACONDA_PASSWORD: SECURE
ANACONDA_TOKEN: SECURE ANACONDA_TOKEN: SECURE
...@@ -109,14 +107,12 @@ deploy_pypi: ...@@ -109,14 +107,12 @@ deploy_pypi:
stage: deploy_pypi stage: deploy_pypi
dependencies: dependencies:
- test_py_tools_ds - test_py_tools_ds
script: # Configure the PyPI credentials, then push the package, and cleanup the creds. script:
- source /root/miniconda3/bin/activate - source /root/miniconda3/bin/activate
- printf "[distutils]\nindex-servers =\n pypi\n\n" >> ~/.pypirc - source activate ci_env
- printf "[pypi]\n""repository:"" https://upload.pypi.org/legacy/\n" >> ~/.pypirc - pip install -U twine
- printf "username= ${PYPI_USER}\n" >> ~/.pypirc - python setup.py sdist
- printf "password= ${PYPI_PASSWORD}\n" >> ~/.pypirc - twine upload dist/* # requires creds as environment variables
- python setup.py check sdist upload -r pypi # This will fail if your creds are bad.
- echo "" > ~/.pypirc && rm ~/.pypirc # If the above fails, this won't run.
only: only:
- /^v\d+\.\d+\.\d+([abc]\d*)?$/ # PEP-440 compliant version (tags) - /^v\d+\.\d+\.\d+([abc]\d*)?$/ # PEP-440 compliant version (tags)
except: except:
...@@ -129,6 +125,7 @@ deploy_anaconda: ...@@ -129,6 +125,7 @@ deploy_anaconda:
- test_py_tools_ds - test_py_tools_ds
script: script:
- source /root/miniconda3/bin/activate - source /root/miniconda3/bin/activate
- source activate ci_env
- conda install -y -q conda-build anaconda-client - conda install -y -q conda-build anaconda-client
- yum install -y patch # https://stackoverflow.com/questions/40392161/building-conda-skeleton-from-pypi-package-throws-error - yum install -y patch # https://stackoverflow.com/questions/40392161/building-conda-skeleton-from-pypi-package-throws-error
# - conda skeleton pypi py_tools_ds --output-dir public/conda.recipe/py_tools_ds # create recipe # - conda skeleton pypi py_tools_ds --output-dir public/conda.recipe/py_tools_ds # create recipe
...@@ -143,10 +140,3 @@ deploy_anaconda: ...@@ -143,10 +140,3 @@ deploy_anaconda:
- /^v\d+\.\d+\.\d+([abc]\d*)?$/ # PEP-440 compliant version (tags) - /^v\d+\.\d+\.\d+([abc]\d*)?$/ # PEP-440 compliant version (tags)
except: except:
- dev - dev
cleanup_pypirc:
stage: cleanup
when: always # this is important; run even if preceding stages failed.
script:
- rm -vf ~/.pypirc # we don't want to leave these around, but GitLab may clean up anyway.
...@@ -19,5 +19,5 @@ ...@@ -19,5 +19,5 @@
# You should have received a copy of the GNU Lesser General Public License along # You should have received a copy of the GNU Lesser General Public License along
# with this program. If not, see <http://www.gnu.org/licenses/>. # with this program. If not, see <http://www.gnu.org/licenses/>.
__version__ = '0.14.20' __version__ = '0.14.21'
__versionalias__ = '20190726_01' __versionalias__ = '20190814_01'
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment