Browse Source

Fixup setup.cfg paths for tripleo-get-hash

Use relative paths for etc/config.yaml and share/ (not absolute) for
the ansible python module.

Also fixup setup.cfg to use data files and not options.data_files
as the latter is not available on setuptools < 40

Change-Id: I4c65db70abb6972671f38628aa3e37eaaf30c767
changes/26/792126/3
Marios Andreou 4 weeks ago
parent
commit
e86d75219c
2 changed files with 8 additions and 6 deletions
  1. +5
    -4
      tripleo-get-hash/setup.cfg
  2. +3
    -2
      tripleo-get-hash/tripleo_get_hash/tripleo_hash_info.py

+ 5
- 4
tripleo-get-hash/setup.cfg View File

@ -1,7 +1,7 @@
[metadata]
name = tripleo-get-hash
author = Marios Andreou
author_email = marios@redhat.com
author_email = openstack-discuss@lists.openstack.org
description = Get the tripleo build hash for a known RDO named tag. See https://opendev.org/openstack/tripleo-repos/src/branch/master/tripleo-get-hash/README.md#what-is-tripleo-get-hash for more information.
long_description = file: README.md LICENSE
long_description_content_type = text/markdown
@ -28,6 +28,7 @@ tests_require =
console_scripts =
tripleo-get-hash = tripleo_get_hash.__main__:cli_entrypoint
[options.data_files]
/usr/local/etc/tripleo_get_hash/ = config.yaml
/usr/share/ansible/plugins/modules/ = tripleo_get_hash.py
[files]
data_files =
etc/tripleo_get_hash/ = config.yaml
share/ansible/plugins/modules/ = tripleo_get_hash.py

+ 3
- 2
tripleo-get-hash/tripleo_get_hash/tripleo_hash_info.py View File

@ -89,9 +89,10 @@ class TripleOHashInfo:
def _resolve_local_config_path():
""" For running from source checkout, try ../config.yaml. For
pip install (--user) try ../etc/tripleo_get_hash/config.yaml
pip install (--user) try ../local/etc/tripleo_get_hash/
"""
for _path in ['config.yaml', 'etc/tripleo_get_hash/config.yaml']:
for _path in ['config.yaml',
'usr/local/etc/tripleo_get_hash/config.yaml']:
_local_config = os.path.join(
os.path.split(os.path.split(
os.path.abspath(__file__)


Loading…
Cancel
Save