You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@ariatosca.apache.org by ra...@apache.org on 2017/06/25 14:01:18 UTC
[3/3] incubator-ariatosca git commit: ARIA-280 Change package name
ARIA-280 Change package name
Changed package name from 'aria' to 'apache-ariatosca',
in accordance with Apache's standards.
The CLI '--version' command will now also show the correct
package name.
Additionally, fixed the download_url field in setup.py -
it now includes an '-incubating' suffix.
Project: http://git-wip-us.apache.org/repos/asf/incubator-ariatosca/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-ariatosca/commit/668ddcb7
Tree: http://git-wip-us.apache.org/repos/asf/incubator-ariatosca/tree/668ddcb7
Diff: http://git-wip-us.apache.org/repos/asf/incubator-ariatosca/diff/668ddcb7
Branch: refs/heads/ARIA-280-change-package-name
Commit: 668ddcb75a164ef8c119dff102a560e3f59daa7f
Parents: 51d0542
Author: Ran Ziv <ra...@gigaspaces.com>
Authored: Thu Jun 22 15:39:28 2017 +0300
Committer: Ran Ziv <ra...@gigaspaces.com>
Committed: Sun Jun 25 17:01:10 2017 +0300
----------------------------------------------------------------------
README.rst | 4 ++--
aria/__init__.py | 7 ++++---
aria/cli/core/aria.py | 25 ++-----------------------
setup.py | 7 ++++---
4 files changed, 12 insertions(+), 31 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/incubator-ariatosca/blob/668ddcb7/README.rst
----------------------------------------------------------------------
diff --git a/README.rst b/README.rst
index dc53d47..d4740cd 100644
--- a/README.rst
+++ b/README.rst
@@ -36,10 +36,10 @@ To install ARIA directly from PyPI (using a ``wheel``), use::
pip install apache-ariatosca
To install ARIA from source, download the source tarball from
-`PyPI <https://pypi.python.org/pypi/apache-ariatosca>`__, extract it, and run::
+`PyPI <https://pypi.python.org/pypi/apache-ariatosca>`__, extract and ``cd`` into the extract dir, and run::
pip install --upgrade pip setuptools
- pip install incubator-ariatosca
+ pip install .
| The source package comes along with relevant examples, documentation, ``requirements.txt`` (for installing specifically the frozen dependencies' versions with which ARIA was tested) and more.
|
http://git-wip-us.apache.org/repos/asf/incubator-ariatosca/blob/668ddcb7/aria/__init__.py
----------------------------------------------------------------------
diff --git a/aria/__init__.py b/aria/__init__.py
index 34db3a8..bed1dc6 100644
--- a/aria/__init__.py
+++ b/aria/__init__.py
@@ -20,10 +20,11 @@ ARIA top level package
import sys
import pkg_resources
-__version__ = pkg_resources.get_distribution('aria').version
+aria_package_name = 'apache-ariatosca'
+__version__ = pkg_resources.get_distribution(aria_package_name).version
-from .orchestrator.decorators import workflow, operation
-from . import (
+from .orchestrator.decorators import workflow, operation # pylint: disable=wrong-import-position
+from . import ( # pylint: disable=wrong-import-position
extension,
utils,
parser,
http://git-wip-us.apache.org/repos/asf/incubator-ariatosca/blob/668ddcb7/aria/cli/core/aria.py
----------------------------------------------------------------------
diff --git a/aria/cli/core/aria.py b/aria/cli/core/aria.py
index 56fe2f7..331caca 100644
--- a/aria/cli/core/aria.py
+++ b/aria/cli/core/aria.py
@@ -13,11 +13,9 @@
# See the License for the specific language governing permissions and
# limitations under the License.
-
import os
import sys
import difflib
-import StringIO
import traceback
import inspect
from functools import wraps
@@ -32,6 +30,7 @@ from .. import defaults
from .. import helptexts
from ..inputs import inputs_to_dict
from ... import __version__
+from ... import aria_package_name
from ...utils.exceptions import get_exception_as_string
@@ -94,31 +93,11 @@ def mutually_exclusive_option(*param_decls, **attrs):
return decorator
-def _format_version_data(version,
- prefix=None,
- suffix=None,
- infix=None):
- all_data = dict(version=version)
- all_data['prefix'] = prefix or ''
- all_data['suffix'] = suffix or ''
- all_data['infix'] = infix or ''
- output = StringIO.StringIO()
- output.write('{prefix}{version}'.format(**all_data))
- output.write('{suffix}'.format(**all_data))
- return output.getvalue()
-
-
def show_version(ctx, param, value):
if not value:
return
- cli_version = _format_version_data(
- __version__,
- prefix='ARIA CLI ',
- infix=' ' * 5,
- suffix='')
-
- logger.info(cli_version)
+ logger.info('{0} {1}'.format(aria_package_name, __version__))
ctx.exit()
http://git-wip-us.apache.org/repos/asf/incubator-ariatosca/blob/668ddcb7/setup.py
----------------------------------------------------------------------
diff --git a/setup.py b/setup.py
index d2a914c..340cce2 100644
--- a/setup.py
+++ b/setup.py
@@ -22,7 +22,7 @@ from setuptools.command.install import install
from setuptools.command.develop import develop
-_PACKAGE_NAME = 'aria'
+_PACKAGE_NAME = 'apache-ariatosca'
_PYTHON_SUPPORTED_VERSIONS = [(2, 6), (2, 7)]
_EXTENSION_DIR = 'extensions'
_EXTENSION_NAMES = [
@@ -38,6 +38,7 @@ root_dir = os.path.dirname(__file__)
with open(os.path.join(root_dir, 'VERSION')) as version_file:
__version__ = version_file.read().strip()
+ incubating_version = '{0}-incubating'.format(__version__)
with open(os.path.join(root_dir, 'README.rst')) as readme:
long_description = readme.read()
@@ -106,11 +107,11 @@ setup(
description='ARIA',
long_description=long_description,
license='Apache License 2.0',
- author='aria',
+ author='ARIA',
author_email='dev@ariatosca.incubator.apache.org',
url='http://ariatosca.incubator.apache.org/',
download_url=(
- 'https://dist.apache.org/repos/dist/release/incubator/ariatosca/' + __version__),
+ 'https://dist.apache.org/repos/dist/release/incubator/ariatosca/' + incubating_version),
classifiers=[
'Development Status :: 4 - Beta',
'Environment :: Console',