arrow-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From u..@apache.org
Subject arrow git commit: ARROW-429: Revert ARROW-379 until git-archive issues are resolved
Date Mon, 19 Dec 2016 20:11:46 GMT
Repository: arrow
Updated Branches:
  refs/heads/master c369709c4 -> 68e39c686


ARROW-429: Revert ARROW-379 until git-archive issues are resolved

These changes are resulting in GitHub producing archive tarballs with non-deterministic contents.

Author: Wes McKinney <wes.mckinney@twosigma.com>

Closes #243 from wesm/ARROW-429 and squashes the following commits:

49f6edb [Wes McKinney] Revert "ARROW-379: Use setuptools_scm for Python versioning"


Project: http://git-wip-us.apache.org/repos/asf/arrow/repo
Commit: http://git-wip-us.apache.org/repos/asf/arrow/commit/68e39c68
Tree: http://git-wip-us.apache.org/repos/asf/arrow/tree/68e39c68
Diff: http://git-wip-us.apache.org/repos/asf/arrow/diff/68e39c68

Branch: refs/heads/master
Commit: 68e39c6868d449f10243707ca1a7513aaa29761f
Parents: c369709
Author: Wes McKinney <wes.mckinney@twosigma.com>
Authored: Mon Dec 19 21:11:25 2016 +0100
Committer: Uwe L. Korn <uwelk@xhochy.com>
Committed: Mon Dec 19 21:11:25 2016 +0100

----------------------------------------------------------------------
 dev/release/00-prepare.sh  |  5 +++++
 python/.git_archival.txt   |  1 -
 python/.gitattributes      |  1 -
 python/pyarrow/__init__.py | 10 ++--------
 python/setup.cfg           | 20 --------------------
 python/setup.py            | 23 +++++++++++++++++++++--
 6 files changed, 28 insertions(+), 32 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/arrow/blob/68e39c68/dev/release/00-prepare.sh
----------------------------------------------------------------------
diff --git a/dev/release/00-prepare.sh b/dev/release/00-prepare.sh
index 00af5e7..3423a3e 100644
--- a/dev/release/00-prepare.sh
+++ b/dev/release/00-prepare.sh
@@ -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/68e39c68/python/.git_archival.txt
----------------------------------------------------------------------
diff --git a/python/.git_archival.txt b/python/.git_archival.txt
deleted file mode 100644
index 95cb3ee..0000000
--- a/python/.git_archival.txt
+++ /dev/null
@@ -1 +0,0 @@
-ref-names: $Format:%D$

http://git-wip-us.apache.org/repos/asf/arrow/blob/68e39c68/python/.gitattributes
----------------------------------------------------------------------
diff --git a/python/.gitattributes b/python/.gitattributes
deleted file mode 100644
index 00a7b00..0000000
--- a/python/.gitattributes
+++ /dev/null
@@ -1 +0,0 @@
-.git_archival.txt  export-subst

http://git-wip-us.apache.org/repos/asf/arrow/blob/68e39c68/python/pyarrow/__init__.py
----------------------------------------------------------------------
diff --git a/python/pyarrow/__init__.py b/python/pyarrow/__init__.py
index 5af93fb..b9d3861 100644
--- a/python/pyarrow/__init__.py
+++ b/python/pyarrow/__init__.py
@@ -17,14 +17,6 @@
 
 # flake8: noqa
 
-from pkg_resources import get_distribution, DistributionNotFound
-try:
-    __version__ = get_distribution(__name__).version
-except DistributionNotFound:
-   # package is not installed
-   pass
-
-
 import pyarrow.config
 
 from pyarrow.array import (Array,
@@ -50,3 +42,5 @@ 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/68e39c68/python/setup.cfg
----------------------------------------------------------------------
diff --git a/python/setup.cfg b/python/setup.cfg
deleted file mode 100644
index caae3e0..0000000
--- a/python/setup.cfg
+++ /dev/null
@@ -1,20 +0,0 @@
-# Licensed to the Apache Software Foundation (ASF) under one
-# or more contributor license agreements.  See the NOTICE file
-# distributed with this work for additional information
-# regarding copyright ownership.  The ASF licenses this file
-# 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
-# KIND, either express or implied.  See the License for the
-# specific language governing permissions and limitations
-# under the License.
-
-[build_sphinx]
-source-dir = doc/
-build-dir  = doc/_build

http://git-wip-us.apache.org/repos/asf/arrow/blob/68e39c68/python/setup.py
----------------------------------------------------------------------
diff --git a/python/setup.py b/python/setup.py
index 5acdca3..5f448f7 100644
--- a/python/setup.py
+++ b/python/setup.py
@@ -42,9 +42,27 @@ is_64_bit = sys.maxsize > 2**32
 if Cython.__version__ < '0.19.1':
     raise Exception('Please upgrade to Cython 0.19.1 or newer')
 
+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):
 
     def run(self):
@@ -254,12 +272,15 @@ 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"""
 
 setup(
     name="pyarrow",
     packages=['pyarrow', 'pyarrow.tests'],
+    version=VERSION,
     zip_safe=False,
     package_data={'pyarrow': ['*.pxd', '*.pyx']},
     # Dummy extension to trigger build_ext
@@ -269,8 +290,6 @@ setup(
         'clean': clean,
         'build_ext': build_ext
     },
-    use_scm_version = {"root": "..", "relative_to": __file__},
-    setup_requires=['setuptools_scm', 'setuptools_scm_git_archive'],
     install_requires=['cython >= 0.23', 'numpy >= 1.9', 'six >= 1.0.0'],
     description=DESC,
     license='Apache License, Version 2.0',


Mime
View raw message