o
    Uݢg-                     @  s0   d Z ddlmZ ddlZddlmZ dd ZdS )z0Utility for getting the version of the pipeline.    )annotationsNc               	   C  s   t jt jt jt jt} t j| d}t j| d}t j|rEt|}| }W d   | S 1 s<w   Y  | S ztj	g d|d}W | S  t
ya   d}Y | S w )zGet the version for the pipeline.

    Normally it will read this from the .version file in the package root, but
    if that is not found it will attempt to query git for the version.
    binz.versionN)gitdescribez--tagsz--alwaysz--dirty)cwdZunknown_version)ospathdirname__file__joinexistsopenread
tk_subproccheck_outputOSErrorstrip)Zrepo_base_dir
script_dirZ
version_fnfoutput r   a/oak/stanford/groups/akundaje/marinovg/programs/cellranger-9.0.1/lib/python/cellranger/version.pyget_version   s&   $


		r   )	__doc__
__future__r   os.pathr   Ztenkit.log_subprocessZlog_subprocessr   r   r   r   r   r   <module>   s
   