You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@systemds.apache.org by ar...@apache.org on 2020/09/19 16:25:35 UTC

[systemds] branch master updated: [SYSTEMDS-2667] Automate upload distribution archives to pypi

This is an automated email from the ASF dual-hosted git repository.

arnabp20 pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/systemds.git


The following commit(s) were added to refs/heads/master by this push:
     new 97a0df3  [SYSTEMDS-2667] Automate upload distribution archives to pypi
97a0df3 is described below

commit 97a0df3c7837bc35206baf5b0590c99361460ec5
Author: arnabp <ar...@tugraz.at>
AuthorDate: Sat Sep 19 18:13:45 2020 +0200

    [SYSTEMDS-2667] Automate upload distribution archives to pypi
    
    This patch adds a script to generate and upload distribution archives
    to pypi repo. A successful test run is done to upload to testpypi repo.
---
 .../project_info.py => dev/release/pypi_upload.sh  | 29 ++++++++++++++++++----
 src/main/python/systemds/project_info.py           |  2 +-
 2 files changed, 25 insertions(+), 6 deletions(-)

diff --git a/src/main/python/systemds/project_info.py b/dev/release/pypi_upload.sh
similarity index 52%
copy from src/main/python/systemds/project_info.py
copy to dev/release/pypi_upload.sh
index 9bbd1ff..7106011 100644
--- a/src/main/python/systemds/project_info.py
+++ b/dev/release/pypi_upload.sh
@@ -1,3 +1,4 @@
+#!/usr/bin/env bash
 #-------------------------------------------------------------
 #
 # Licensed to the Apache Software Foundation (ASF) under one
@@ -19,8 +20,26 @@
 #
 #-------------------------------------------------------------
 
-# This file can be used to pass maven project properties to python
-# via string substitutions using the maven-resources-plugin
-__project_group_id__ = 'org.apache.systemds'
-__project_artifact_id__ = 'systemds'
-__project_version__ = '0.2.0-SNAPSHOT'
+#BASE_DIR=$(pwd)
+#BASE_DIR="/c/virtual\ D/SystemDS/systemds"
+BASE_DIR="../.." #points to systemds directory
+RELEASE_WORK_DIR=$BASE_DIR/target/release2
+RELEASE_VERSION=2.0.0
+eval cd $RELEASE_WORK_DIR/systemds/src/main/python
+
+# Steps:
+# 1. update systemds/project_info.py with the new version
+sed -i "s/$RELEASE_VERSION-SNAPSHOT/$RELEASE_VERSION/" systemds/project_info.py
+
+# 2. generate distribution archives
+python3 create_python_dist.py
+
+# 3. upload the distribution archives to testpypi/pypi
+#    - For testing follow https://packaging.python.org/tutorials/packaging-projects/
+#    - Note: for testing use command prompt in windows and use Edit->paste to paste 
+#      the API token (known issues)
+
+#python -m twine upload --repository testpypi dist/* #Test
+#python twine upload dist/*  #Real
+
+exit
diff --git a/src/main/python/systemds/project_info.py b/src/main/python/systemds/project_info.py
index 9bbd1ff..8a6f953 100644
--- a/src/main/python/systemds/project_info.py
+++ b/src/main/python/systemds/project_info.py
@@ -23,4 +23,4 @@
 # via string substitutions using the maven-resources-plugin
 __project_group_id__ = 'org.apache.systemds'
 __project_artifact_id__ = 'systemds'
-__project_version__ = '0.2.0-SNAPSHOT'
+__project_version__ = '2.0.0-SNAPSHOT'