releases/openstack_releases/__init__.py
Doug Hellmann 415e86c465 add list-deliverables command
Add a command to print a list of the names of deliverables that match
specified criteria, like having a certain release.

Change-Id: I52844446e288513b0a575c922a83d72f803f9f17
Signed-off-by: Doug Hellmann <doug@doughellmann.com>
2016-11-22 10:29:06 -05:00

17 lines
499 B
Python

import os
import os.path
# Try to guess where the deliverables directory is relative to where
# the code is imported from.
_venv = os.environ.get('VIRTUAL_ENV', '')
if _venv:
deliverable_dir = os.path.dirname(_venv)
if deliverable_dir.endswith('.tox'):
deliverable_dir = os.path.dirname(deliverable_dir)
deliverable_dir = os.path.join(deliverable_dir, 'deliverables')
else:
deliverable_dir = os.path.join(
os.path.dirname(__file__),
'../deliverables',
)