
    &b                     0   d Z ddlZddlZddlZdZdZd ZefdZ ee          Z ee          Z	e	d         Z
dZd	Zd
                    ee          Z G d d          ZddZdZe	d         Z eee          Zd                    ee          ZdZdZdS )u<    Package metadata for the ‘python-daemon’ distribution.     Nzpython-daemonzversion_info.jsonc                 `    d}	 t          j        |           }n# t           j        $ r Y nw xY w|S )z Get the `Distribution` instance for distribution `name`.

        :param name: The distribution name for the query.
        :return: The `pkg_resources.Distribution` instance, or
            ``None`` if the distribution instance is not found.
        N)pkg_resourcesget_distributionDistributionNotFound)namedistributions     2/usr/lib/python3/dist-packages/daemon/_metadata.pyr   r      sK     L$5d;;-    s    ++c                     dddd}| >|                      |          r)|                     |          }t          j        |          }|S )a=   Get the version info from the installed distribution.

        :param distribution: The `pkg_resources.Distribution` instance
            representing the Python package to interrogate.
        :param filename: Base filename of the version info resource.
        :return: The version info as a mapping of fields.

        The version info is stored as a metadata file in the
        `distribution`.

        If the `distribution` is ``None``, or the version info
        metadata file is not found, the return value mapping fields
        have placeholder values.
        UNKNOWN)release_dateversion
maintainer)has_metadataget_metadatajsonloads)r   filenameversion_infocontents       r	   get_distribution_version_infor   $   s_    " & # L $$X.. 	/"//99G:g..L    r   z
Ben Finneyzben+python@benfinney.id.auz{name} <{email}>)r   emailc                        e Zd ZdZddZd ZdS )	YearRangez% A range of years spanning a period. Nc                 "    || _         || _        d S Nbeginend)selfr   r   s      r	   __init__zYearRange.__init__P   s    
r   c                     d                     |           }| j        &| j        | j        k    rd                     |           }|S )Nz{range.begin:04d})rangeu#   {range.begin:04d}–{range.end:04d})formatr   r   )r    texts     r	   __str__zYearRange.__str__T   sJ    ")))558x$*$$<CC$COOr   r   )__name__
__module____qualname____doc__r!   r&    r   r	   r   r   M   s=        //       r   r   c                     t          |           } 	 t          j                            |d          }|j        }n# t          t
          f$ r d}Y nw xY wt          | |          }|S )a   Construct the year range given a start and possible end date.

        :param begin_year: The beginning year (text, 4 digits) for the
            range.
        :param end_date: The end date (text, ISO-8601 format) for the
            range, or a non-date token string.
        :return: The range of years as a `YearRange` instance.

        If the `end_date` is not a valid ISO-8601 date string, the
        range has ``None`` for the end year.
        z%Y-%m-%dNr   )intdatetimestrptimeyear	TypeError
ValueErrorr   )
begin_yearend_dateend_year
year_ranges       r	   make_year_ranger7   \   s|     ZJ!$--h
CC
 =	 z"    :::Js    9 AA2001r   u-   Copyright © {year_range} {author} and others)r6   authorzApache-2z https://pagure.io/python-daemon/r   )r*   r.   r   r   distribution_nameversion_info_filenamer   r   r   r   version_installedauthor_nameauthor_emailr$   r9   r   r7   copyright_year_begin
build_datecopyright_year_range	copyrightlicenseurlr+   r   r	   <module>rE      sC   C B       $ +   "  5   <   122,,\:: +  +		"	"<	"	H	H          6  .)
&';ZHH ;BB' C 8 8	
(r   