Your IP : 216.73.216.85


Current Path : /opt/alt/python35/lib/python3.5/site-packages/daemon/__pycache__/
Upload File :
Current File : //opt/alt/python35/lib/python3.5/site-packages/daemon/__pycache__/_metadata.cpython-35.pyc



^�V��@sFdZddlmZmZddlZddlZddlZddlZddlZdZ	dZ
e
dd�Ze�ZedZ
ejd	�Zejd
ddg�Zd
d�ZdZdZdjdede�ZGdd�d�Zddd�ZdZedZeee�Zdjdede�ZdZdZdS)u< Package metadata for the ‘python-daemon’ distribution. �)�absolute_import�unicode_literalsNz
python-daemonzversion_info.jsoncCs�ddddddi}ytjt�}Wntjk
rHd}YnX|dk	r�|jt�r�|jt�}tj|�}|S)a\ Get the version info from the installed distribution.

        :param filename: Base filename of the version info resource.
        :return: The version info as a mapping of fields. If the
            distribution is not available, the mapping is empty.

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

        �release_date�UNKNOWN�version�
maintainerN)	�
pkg_resources�get_distribution�distribution_name�DistributionNotFound�has_metadata�version_info_filename�get_metadata�json�loads)�filename�version_info�distribution�content�r�A/opt/alt/python35/lib/python3.5/site-packages/daemon/_metadata.py�get_distribution_version_infosrrz$^(?P<name>[^<]+) <(?P<email>[^>]+)>$�ParsedPerson�name�emailcCspd}tj|�}t|�rl|dk	rWtd|jd�d|jd��}ntd|dd�}|S)a- Parse a person field into name and email address.

        :param value: The text value specifying a person.
        :return: A 2-tuple (name, email) for the person's details.

        If the `value` does not match a standard person with email
        address, the `email` item is ``None``.

        Nrr)NN)�rfc822_person_regex�match�lenr�group)�value�resultrrrr�parse_person_fieldCs
r!z
Ben Finneyzben+python@benfinney.id.auz{name} <{email}>c@s7eZdZdZddd�Zdd�ZeZdS)�	YearRangez% A range of years spanning a period. NcCs||_||_dS)N)�begin�end)�selfr#r$rrr�__init__bs	zYearRange.__init__cCsIdjd|�}|jdk	rE|j|jkrEdjd|�}|S)Nz{range.begin:04d}�rangeu#{range.begin:04d}–{range.end:04d})�formatr$r#)r%�textrrr�__unicode__fs
zYearRange.__unicode__)�__name__�
__module__�__qualname__�__doc__r&r*�__str__rrrrr"_sr"c
Csht|�}ytjj|d�}Wnttfk
rEd}Yn
X|j}td|d|�}|S)a� Construct the year range given a start and possible end date.

        :param begin_date: The beginning year (text) 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#r$)�int�datetime�strptime�	TypeError�
ValueError�yearr")�
begin_year�end_date�end_year�
year_rangerrr�make_year_rangeps	r:�2001ru-Copyright © {year_range} {author} and othersr9�authorzApache-2z1https://alioth.debian.org/projects/python-daemon/)r.�
__future__rrr�re�collectionsr1rr
r
rr�version_installed�compiler�
namedtuplerr!�author_name�author_emailr(r<r"r:�copyright_year_begin�
build_date�copyright_year_range�	copyright�license�urlrrrr�<module>
s6