U
    M[^                     @   s.   d Z ddlZddlmZ dZdZdddZdS )z
Version determination functions

These are in their own file so they can be imported by setup.py before we have
any of our dependencies installed.
    N)check_outputz20.3c                 C   sZ   t dst S tjtjt}tjtj|drVdddddg}t|dd		 S t
S )
zAReturn the package version if set, otherwise return git describe.z@@PACKAGED_VERSIONz.gitZgitZdescribez
--abbrev=8z--match=[0-9]*z--longT)Zuniversal_newlines)PACKAGED_VERSION
startswithospathdirname__file__existsjoinr   strip__VERSION__)Z_argsZtopdircmd r   2/usr/lib/python3/dist-packages/uaclient/version.pyget_version   s    
r   )N)__doc__os.pathr   
subprocessr   r   r   r   r   r   r   r   <module>   s
   