ariatosca-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From r..@apache.org
Subject incubator-ariatosca git commit: ARIA-261 Single-source ARIA version [Forced Update!]
Date Thu, 25 May 2017 11:03:33 GMT
Repository: incubator-ariatosca
Updated Branches:
  refs/heads/ARIA-261-single-source-aria-version 5e9cf14a1 -> 134a30597 (forced update)


ARIA-261 Single-source ARIA version


Project: http://git-wip-us.apache.org/repos/asf/incubator-ariatosca/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-ariatosca/commit/134a3059
Tree: http://git-wip-us.apache.org/repos/asf/incubator-ariatosca/tree/134a3059
Diff: http://git-wip-us.apache.org/repos/asf/incubator-ariatosca/diff/134a3059

Branch: refs/heads/ARIA-261-single-source-aria-version
Commit: 134a30597dec2a888cfea5a12cefdc909c274ba5
Parents: 0c98684
Author: Ran Ziv <ran@gigaspaces.com>
Authored: Thu May 25 12:18:58 2017 +0300
Committer: Ran Ziv <ran@gigaspaces.com>
Committed: Thu May 25 14:03:27 2017 +0300

----------------------------------------------------------------------
 MANIFEST.in                  |  1 +
 VERSION                      |  1 +
 aria/VERSION.py              | 21 ---------------------
 aria/__init__.py             |  6 ++++--
 aria/parser/reading/jinja.py |  2 +-
 setup.py                     | 12 ++++++++----
 6 files changed, 15 insertions(+), 28 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-ariatosca/blob/134a3059/MANIFEST.in
----------------------------------------------------------------------
diff --git a/MANIFEST.in b/MANIFEST.in
index d934e18..b6e5fb2 100644
--- a/MANIFEST.in
+++ b/MANIFEST.in
@@ -1,2 +1,3 @@
 include requirements.txt
+include VERSION
 recursive-include examples *

http://git-wip-us.apache.org/repos/asf/incubator-ariatosca/blob/134a3059/VERSION
----------------------------------------------------------------------
diff --git a/VERSION b/VERSION
new file mode 100644
index 0000000..6c6aa7c
--- /dev/null
+++ b/VERSION
@@ -0,0 +1 @@
+0.1.0
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-ariatosca/blob/134a3059/aria/VERSION.py
----------------------------------------------------------------------
diff --git a/aria/VERSION.py b/aria/VERSION.py
deleted file mode 100644
index 9ce332c..0000000
--- a/aria/VERSION.py
+++ /dev/null
@@ -1,21 +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.
-
-"""
-ARIA Version module:
-    * version: ARIA Package version
-"""
-
-version = '0.1.0'  # pylint: disable=C0103

http://git-wip-us.apache.org/repos/asf/incubator-ariatosca/blob/134a3059/aria/__init__.py
----------------------------------------------------------------------
diff --git a/aria/__init__.py b/aria/__init__.py
index df75b1e..5787cee 100644
--- a/aria/__init__.py
+++ b/aria/__init__.py
@@ -17,10 +17,9 @@
 ARIA top level package
 """
 
+import os
 import sys
 
-from .VERSION import version as __version__
-
 from .orchestrator.decorators import workflow, operation
 from . import (
     extension,
@@ -32,6 +31,9 @@ from . import (
     cli
 )
 
+with open(os.path.join(os.path.dirname(os.path.dirname(__file__)), 'VERSION')) as version_file:
+    __version__ = version_file.read().strip()
+
 if sys.version_info < (2, 7):
     # pkgutil in python2.6 has a bug where it fails to import from protected modules, which
causes
     # the entire process to fail. In order to overcome this issue we use our custom iter_modules

http://git-wip-us.apache.org/repos/asf/incubator-ariatosca/blob/134a3059/aria/parser/reading/jinja.py
----------------------------------------------------------------------
diff --git a/aria/parser/reading/jinja.py b/aria/parser/reading/jinja.py
index 17bf49e..687317a 100644
--- a/aria/parser/reading/jinja.py
+++ b/aria/parser/reading/jinja.py
@@ -14,7 +14,7 @@ import os
 
 from jinja2 import Template
 
-from ...VERSION import version
+from ... import __version__ as version
 from ..loading import LiteralLocation, LiteralLoader
 from .reader import Reader
 from .exceptions import ReaderSyntaxError

http://git-wip-us.apache.org/repos/asf/incubator-ariatosca/blob/134a3059/setup.py
----------------------------------------------------------------------
diff --git a/setup.py b/setup.py
index c0ad75b..1301f66 100644
--- a/setup.py
+++ b/setup.py
@@ -21,6 +21,7 @@ from setuptools import setup, find_packages
 from setuptools.command.install import install
 from setuptools.command.develop import develop
 
+
 _PACKAGE_NAME = 'aria'
 _PYTHON_SUPPORTED_VERSIONS = [(2, 6), (2, 7)]
 _EXTENSION_DIR = 'extensions'
@@ -28,6 +29,7 @@ _EXTENSION_NAMES = [
     'aria_extension_tosca'
 ]
 
+
 if (sys.version_info[0], sys.version_info[1]) not in _PYTHON_SUPPORTED_VERSIONS:
     raise NotImplementedError(
         '{0} Package support Python version 2.6 & 2.7 Only'.format(
@@ -35,9 +37,8 @@ if (sys.version_info[0], sys.version_info[1]) not in _PYTHON_SUPPORTED_VERSIONS:
 
 root_dir = os.path.dirname(__file__)
 
-version = '0.1.0'
-execfile(os.path.join(root_dir, _PACKAGE_NAME, 'VERSION.py'))
-
+with open(root_dir, 'VERSION') as version_file:
+    __version__ = version_file.read().strip()
 
 install_requires = []
 extras_require = {}
@@ -104,7 +105,7 @@ class DevelopCommand(develop):
 
 setup(
     name=_PACKAGE_NAME,
-    version=version,
+    version=__version__,
     description='ARIA',
     license='Apache License Version 2.0',
     author='aria',
@@ -119,6 +120,9 @@ setup(
         'License :: OSI Approved :: Apache Software License',
         'Operating System :: OS Independent',
         'Programming Language :: Python',
+        'Programming Language :: Python :: 2',
+        'Programming Language :: Python :: 2.6',
+        'Programming Language :: Python :: 2.7',
         'Topic :: Software Development :: Libraries :: Python Modules',
         'Topic :: System :: Networking',
         'Topic :: System :: Systems Administration'],


Mime
View raw message