You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@ariatosca.apache.org by ra...@apache.org on 2017/05/25 15:49:56 UTC

[3/3] incubator-ariatosca git commit: ARIA-261 Single-source ARIA version

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/adf76079
Tree: http://git-wip-us.apache.org/repos/asf/incubator-ariatosca/tree/adf76079
Diff: http://git-wip-us.apache.org/repos/asf/incubator-ariatosca/diff/adf76079

Branch: refs/heads/ARIA-261-single-source-aria-version
Commit: adf76079568b6ccaf89871907b9b98c22ef6681e
Parents: 50b997e
Author: Ran Ziv <ra...@gigaspaces.com>
Authored: Thu May 25 12:18:58 2017 +0300
Committer: Ran Ziv <ra...@gigaspaces.com>
Committed: Thu May 25 18:49:49 2017 +0300

----------------------------------------------------------------------
 MANIFEST.in                  |  2 ++
 VERSION                      |  1 +
 aria/VERSION.py              | 21 ---------------------
 aria/__init__.py             | 13 ++++---------
 aria/parser/reading/jinja.py |  2 +-
 requirements.in              |  3 ++-
 requirements.txt             |  8 ++++++--
 setup.py                     | 14 +++++++++-----
 8 files changed, 25 insertions(+), 39 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-ariatosca/blob/adf76079/MANIFEST.in
----------------------------------------------------------------------
diff --git a/MANIFEST.in b/MANIFEST.in
index d934e18..6c79a3a 100644
--- a/MANIFEST.in
+++ b/MANIFEST.in
@@ -1,2 +1,4 @@
 include requirements.txt
+include VERSION
+include LICENSE
 recursive-include examples *

http://git-wip-us.apache.org/repos/asf/incubator-ariatosca/blob/adf76079/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/adf76079/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/adf76079/aria/__init__.py
----------------------------------------------------------------------
diff --git a/aria/__init__.py b/aria/__init__.py
index df75b1e..34db3a8 100644
--- a/aria/__init__.py
+++ b/aria/__init__.py
@@ -19,7 +19,8 @@ ARIA top level package
 
 import sys
 
-from .VERSION import version as __version__
+import pkg_resources
+__version__ = pkg_resources.get_distribution('aria').version
 
 from .orchestrator.decorators import workflow, operation
 from . import (
@@ -39,11 +40,6 @@ if sys.version_info < (2, 7):
 else:
     from pkgutil import iter_modules
 
-try:
-    import pkg_resources
-except ImportError:
-    pkg_resources = None
-
 __all__ = (
     '__version__',
     'workflow',
@@ -60,9 +56,8 @@ def install_aria_extensions():
     for loader, module_name, _ in iter_modules():
         if module_name.startswith('aria_extension_'):
             loader.find_module(module_name).load_module(module_name)
-    if pkg_resources:
-        for entry_point in pkg_resources.iter_entry_points(group='aria_extension'):
-            entry_point.load()
+    for entry_point in pkg_resources.iter_entry_points(group='aria_extension'):
+        entry_point.load()
     extension.init()
 
 

http://git-wip-us.apache.org/repos/asf/incubator-ariatosca/blob/adf76079/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/adf76079/requirements.in
----------------------------------------------------------------------
diff --git a/requirements.in b/requirements.in
index 1dd5b1f..ab06d93 100644
--- a/requirements.in
+++ b/requirements.in
@@ -28,8 +28,9 @@ SQLAlchemy>=1.1.0, <1.2  # version 1.2 dropped support of python 2.6
 wagon==0.6.0
 bottle>=0.12.0, <0.13
 Fabric>=1.13.0, <1.14
+setuptools>=35.0.0, <36.0.0
 click>=4.1, < 5.0
-colorama>=0.3.7, <= 0.3.9
+colorama>=0.3.7, <=0.3.9
 PrettyTable>=0.7,<0.8
 click_didyoumean==0.0.3
 backports.shutil_get_terminal_size==1.0.0

http://git-wip-us.apache.org/repos/asf/incubator-ariatosca/blob/adf76079/requirements.txt
----------------------------------------------------------------------
diff --git a/requirements.txt b/requirements.txt
index f7efce9..8551c65 100644
--- a/requirements.txt
+++ b/requirements.txt
@@ -17,6 +17,7 @@ total-ordering ; python_version < '2.7'  # only one version on pypi
 pypiwin32==219 ; sys_platform == 'win32'
 # ----------------------------------------------------------------------------------
 
+appdirs==1.4.3            # via setuptools
 args==0.1.0               # via clint
 asn1crypto==0.22.0        # via cryptography
 backports.shutil_get_terminal_size==1.0.0
@@ -41,7 +42,7 @@ logutils==0.3.4.1
 markupsafe==1.0           # via jinja2
 msgpack-python==0.4.8     # via cachecontrol
 networkx==1.9.1
-packaging==16.8           # via cryptography
+packaging==16.8           # via cryptography, setuptools
 paramiko==2.1.2           # via fabric
 prettytable==0.7.2
 pyasn1==0.2.3             # via paramiko
@@ -53,7 +54,10 @@ retrying==1.3.3
 ruamel.ordereddict==0.4.9  # via ruamel.yaml
 ruamel.yaml==0.11.15
 shortuuid==0.5.0
-six==1.10.0               # via cryptography, packaging, retrying
+six==1.10.0               # via cryptography, packaging, retrying, setuptools
 sqlalchemy==1.1.6
 wagon==0.6.0
 wheel==0.29.0             # via wagon
+
+# The following packages are considered to be unsafe in a requirements file:
+setuptools==35.0.2

http://git-wip-us.apache.org/repos/asf/incubator-ariatosca/blob/adf76079/setup.py
----------------------------------------------------------------------
diff --git a/setup.py b/setup.py
index c0ad75b..d43ce91 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'
@@ -35,9 +36,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(os.path.join(root_dir, 'VERSION')) as version_file:
+    __version__ = version_file.read().strip()
 
 install_requires = []
 extras_require = {}
@@ -104,9 +104,9 @@ class DevelopCommand(develop):
 
 setup(
     name=_PACKAGE_NAME,
-    version=version,
+    version=__version__,
     description='ARIA',
-    license='Apache License Version 2.0',
+    license='Apache License 2.0',
     author='aria',
     author_email='dev@ariatosca.incubator.apache.org',
     url='http://ariatosca.org',
@@ -119,6 +119,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'],
@@ -136,6 +139,7 @@ setup(
             'profiles/aria-1.0/**'
         ]
     },
+    platforms=['any'],
     zip_safe=False,
     install_requires=install_requires,
     extras_require=extras_require,