
­­­­­­­­­­­­­­­­­­
<!DOCTYPE html>
<html>
U
    1`{                     @   s   d Z ddlmZmZ ddlZddlZddlZeZdZ	dZ
dd Ze
fdd	Zee	ZeeZed
 ZdZdZdjeedZG dd dZdddZdZed ZeeeZdjeedZdZdZdS )u<    Package metadata for the ‘python-daemon’ distribution.     )absolute_importunicode_literalsNzpython-daemonzversion_info.jsonc                 C   s.   d}zt | }W n t jk
r(   Y nX |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distribution r	   A/opt/alt/python38/lib/python3.8/site-packages/daemon/_metadata.pyr      s    r   c                 C   s6   dddd}| dk	r2|  |r2| |}t|}|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
maintainerN)has_metadataget_metadatajsonloads)r   filenameversion_infocontentr	   r	   r
   get_distribution_version_info*   s    


r   r   z
Ben Finneyzben+python@benfinney.id.auz{name} <{email}>)r   emailc                   @   s&   e Zd ZdZdddZdd ZeZdS )	YearRangez% A range of years spanning a period. Nc                 C   s   || _ || _d S )Nbeginend)selfr   r   r	   r	   r
   __init__V   s    zYearRange.__init__c                 C   s2   dj | d}| jd k	r.| j| jkr.dj | d}|S )Nz{range.begin:04d})rangeu#   {range.begin:04d}–{range.end:04d})formatr   r   )r   textr	   r	   r
   __unicode__Z   s
    
zYearRange.__unicode__)N)__name__
__module____qualname____doc__r   r!   __str__r	   r	   r	   r
   r   S   s   
r   c              	   C   sN   t | } ztj|d}W n ttfk
r6   d}Y nX |j}t| |d}|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	TypeError
ValueErroryearr   )
begin_yearend_dateend_year
year_ranger	   r	   r
   make_year_ranged   s    
r1   2001r   u-   Copyright © {year_range} {author} and others)r0   authorzApache-2z https://pagure.io/python-daemon/)N)r%   
__future__r   r   r(   r   r   type__metaclass__distribution_nameversion_info_filenamer   r   r   r   version_installedauthor_nameauthor_emailr   r3   r   r1   copyright_year_begin
build_datecopyright_year_range	copyrightlicenseurlr	   r	   r	   r
   <module>
   s6   


 