From 5db440b61830d4d562d2fcc7f5d7998d40ef156e Mon Sep 17 00:00:00 2001 From: Ruslan Dautkhanov Date: Mon, 6 Nov 2017 16:43:13 -0700 Subject: [PATCH] fix filenames sorting 1. fix filenames sorting 2. move version to a separate file --- abalon/spark/sparkutils.py | 15 ++++++++++++++- abalon/version.py | 15 +++++++++++++++ setup.py | 23 +++++++++++++++++++++-- 3 files changed, 50 insertions(+), 3 deletions(-) create mode 100644 abalon/version.py diff --git a/abalon/spark/sparkutils.py b/abalon/spark/sparkutils.py index 7a9e527..476b351 100644 --- a/abalon/spark/sparkutils.py +++ b/abalon/spark/sparkutils.py @@ -1,3 +1,16 @@ +# -*- coding: utf-8 -*- +# +# Licensed 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. ########################################################################################################### @@ -118,7 +131,7 @@ def debug_print (message): files = [] for f in fs.listStatus(hadoop.fs.Path(src_dir)): if f.isFile(): - files.append(f.getPath()) + files.append(str(f.getPath())) if not files: raise ValueError("Source directory {} is empty".format(src_dir)) # determine order of files in which they will be written: diff --git a/abalon/version.py b/abalon/version.py new file mode 100644 index 0000000..1e42ba7 --- /dev/null +++ b/abalon/version.py @@ -0,0 +1,15 @@ +# -*- coding: utf-8 -*- +# +# Licensed 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. + +version = '1.4.0' diff --git a/setup.py b/setup.py index 8fdee85..07b3521 100644 --- a/setup.py +++ b/setup.py @@ -1,11 +1,30 @@ +# -*- coding: utf-8 -*- +# +# Licensed 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. + from setuptools import setup, find_packages +import imp + +version = imp.load_source( + 'airflow.version', os.path.join('abalon', 'version.py')).version + # http://setuptools.readthedocs.io/en/latest/setuptools.html setup(name='abalon', - version='1.3.0', - packages=find_packages(), + version=version, + packages=find_packages(exclude=['tests*']), # install_requires=['docutils>=0.3'],