HEX
Server: Apache
System: Linux server2.voipitup.com.au 4.18.0-553.104.1.lve.el8.x86_64 #1 SMP Tue Feb 10 20:07:30 UTC 2026 x86_64
User: posscale (1027)
PHP: 8.2.29
Disabled: exec,passthru,shell_exec,system
Upload Files
File: //opt/alt/python38/lib/python3.8/site-packages/daemon/__pycache__/_metadata.cpython-38.pyc
U

��1`{�@s�dZddlmZmZddlZddlZddlZeZdZ	dZ
dd�Ze
fdd	�Zee	�Z
ee
�Zed
ZdZdZd
jeed�ZGdd�d�Zddd�ZdZedZeee�Zdjeed�ZdZdZdS)u< Package metadata for the ‘python-daemon’ distribution. �)�absolute_import�unicode_literalsNz
python-daemonzversion_info.jsoncCs.d}zt�|�}Wntjk
r(YnX|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.pyrsrcCs6dddd�}|dk	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�


rr
z
Ben Finneyzben+python@benfinney.id.auz{name} <{email}>)r�emailc@s&eZdZdZddd�Zdd�ZeZdS)�	YearRangez% A range of years spanning a period. NcCs||_||_dS)N��begin�end)�selfrrr	r	r
�__init__VszYearRange.__init__cCs2dj|d�}|jdk	r.|j|jkr.dj|d�}|S)Nz{range.begin:04d})�rangeu#{range.begin:04d}–{range.end:04d})�formatrr)r�textr	r	r
�__unicode__Zs

zYearRange.__unicode__)N)�__name__�
__module__�__qualname__�__doc__rr!�__str__r	r	r	r
rSs
rc	CsNt|�}ztj�|d�}Wnttfk
r6d}YnX|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_rangeds

r1�2001ru-Copyright © {year_range} {author} and others)r0�authorzApache-2z https://pagure.io/python-daemon/)N)r%�
__future__rrr(rr�type�
__metaclass__�distribution_name�version_info_filenamerrrr�version_installed�author_name�author_emailrr3rr1�copyright_year_begin�
build_date�copyright_year_range�	copyright�license�urlr	r	r	r
�<module>
s6�


�