Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 7 additions & 2 deletions dev/release/00-prepare.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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"
1 change: 1 addition & 0 deletions python/.gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ MANIFEST
# Generated sources
*.c
*.cpp
pyarrow/version.py
# Python files

# setup.py working directory
Expand Down
1 change: 1 addition & 0 deletions python/pyarrow/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -42,3 +42,4 @@
DataType, Field, Schema, schema)

from pyarrow.table import Column, RecordBatch, Table, from_pandas_dataframe
from pyarrow.version import version as __version__
24 changes: 20 additions & 4 deletions python/setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -50,10 +50,25 @@
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):
Expand Down Expand Up @@ -238,6 +253,7 @@ def get_outputs(self):
return [self._get_cmake_ext_path(name)
for name in self.get_names()]

write_version_py()

DESC = """\
Python library for Apache Arrow"""
Expand Down