You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@arrow.apache.org by we...@apache.org on 2016/10/21 20:27:12 UTC
arrow git commit: ARROW-342: Set Python version on release
Repository: arrow
Updated Branches:
refs/heads/master 446ec9bd6 -> 2f8449337
ARROW-342: Set Python version on release
Author: Uwe L. Korn <uw...@xhochy.com>
Closes #179 from xhochy/ARROW-342 and squashes the following commits:
15d0ce3 [Uwe L. Korn] ARROW-342: Set Python version on release
Project: http://git-wip-us.apache.org/repos/asf/arrow/repo
Commit: http://git-wip-us.apache.org/repos/asf/arrow/commit/2f844933
Tree: http://git-wip-us.apache.org/repos/asf/arrow/tree/2f844933
Diff: http://git-wip-us.apache.org/repos/asf/arrow/diff/2f844933
Branch: refs/heads/master
Commit: 2f84493371bd8fae30b8e042984c9d6ba5419c5f
Parents: 446ec9b
Author: Uwe L. Korn <uw...@xhochy.com>
Authored: Fri Oct 21 16:27:00 2016 -0400
Committer: Wes McKinney <we...@twosigma.com>
Committed: Fri Oct 21 16:27:00 2016 -0400
----------------------------------------------------------------------
dev/release/00-prepare.sh | 9 +++++++--
python/.gitignore | 1 +
python/pyarrow/__init__.py | 1 +
python/setup.py | 24 ++++++++++++++++++++----
4 files changed, 29 insertions(+), 6 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/arrow/blob/2f844933/dev/release/00-prepare.sh
----------------------------------------------------------------------
diff --git a/dev/release/00-prepare.sh b/dev/release/00-prepare.sh
index 3c1fb9a..3423a3e 100644
--- a/dev/release/00-prepare.sh
+++ b/dev/release/00-prepare.sh
@@ -7,9 +7,9 @@
# to you under the Apache License, Version 2.0 (the
# "License"); you may not use this file except in compliance
# with the License. You may obtain a copy of the License at
-#
+#
# http://www.apache.org/licenses/LICENSE-2.0
-#
+#
# Unless required by applicable law or agreed to in writing,
# software distributed under the License is distributed on an
# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
@@ -43,4 +43,9 @@ mvn release:prepare -Dtag=${tag} -DreleaseVersion=${version} -DautoVersionSubmod
cd -
+cd "${SOURCE_DIR}/../../python"
+sed -i "s/VERSION = '[^']*'/VERSION = '${version}'/g" setup.py
+sed -i "s/ISRELEASED = False/ISRELEASED = True/g" setup.py
+cd -
+
echo "Finish staging binary artifacts by running: sh dev/release/01-perform.sh"
http://git-wip-us.apache.org/repos/asf/arrow/blob/2f844933/python/.gitignore
----------------------------------------------------------------------
diff --git a/python/.gitignore b/python/.gitignore
index 7e2e360..07f2835 100644
--- a/python/.gitignore
+++ b/python/.gitignore
@@ -25,6 +25,7 @@ MANIFEST
# Generated sources
*.c
*.cpp
+pyarrow/version.py
# Python files
# setup.py working directory
http://git-wip-us.apache.org/repos/asf/arrow/blob/2f844933/python/pyarrow/__init__.py
----------------------------------------------------------------------
diff --git a/python/pyarrow/__init__.py b/python/pyarrow/__init__.py
index 8b131aa..775ce7e 100644
--- a/python/pyarrow/__init__.py
+++ b/python/pyarrow/__init__.py
@@ -42,3 +42,4 @@ from pyarrow.schema import (null, bool_,
DataType, Field, Schema, schema)
from pyarrow.table import Column, RecordBatch, Table, from_pandas_dataframe
+from pyarrow.version import version as __version__
http://git-wip-us.apache.org/repos/asf/arrow/blob/2f844933/python/setup.py
----------------------------------------------------------------------
diff --git a/python/setup.py b/python/setup.py
index d040ea7..9904977 100644
--- a/python/setup.py
+++ b/python/setup.py
@@ -50,10 +50,25 @@ build_type = 'Debug'
if Cython.__version__ < '0.19.1':
raise Exception('Please upgrade to Cython 0.19.1 or newer')
-MAJOR = 0
-MINOR = 1
-MICRO = 0
-VERSION = '%d.%d.%ddev' % (MAJOR, MINOR, MICRO)
+VERSION = '0.1.0'
+ISRELEASED = False
+
+if not ISRELEASED:
+ VERSION += '.dev'
+
+setup_dir = os.path.abspath(os.path.dirname(__file__))
+
+
+def write_version_py(filename=os.path.join(setup_dir, 'pyarrow/version.py')):
+ a = open(filename, 'w')
+ file_content = "\n".join(["",
+ "# THIS FILE IS GENERATED FROM SETUP.PY",
+ "version = '%(version)s'",
+ "isrelease = '%(isrelease)s'"])
+
+ a.write(file_content % {'version': VERSION,
+ 'isrelease': str(ISRELEASED)})
+ a.close()
class clean(_clean):
@@ -238,6 +253,7 @@ class build_ext(_build_ext):
return [self._get_cmake_ext_path(name)
for name in self.get_names()]
+write_version_py()
DESC = """\
Python library for Apache Arrow"""