B
    5b                 @   s<  d Z dgZdZdZdZdZdZddd	d
ddgZddddddZdddddZ	dZ
dZdZdZdZeZddlmZ eddddddgZee
eeeeZd ed!d   Z ZZejdkre	ed  Zed"eed# f 7 Zeed$krd%ed#  nd&eed# f 7 Zeeeed#  7 Zd)d'dZee Zed(kr8ee d!S )*a  Unique place where the version number is defined.

provides:
* version = "1.2.3" or "1.2.3-beta4"
* version_info = named tuple (1,2,3,"beta",4)
* hexversion: 0x010203B4
* strictversion = "1.2.3b4
* debianversion = "1.2.3~beta4"
* calc_hexversion: the function to transform a version_tuple into an integer

This is called hexversion since it only really looks meaningful when viewed as the
result of passing it to the built-in hex() function.
The version_info value may be used for a more human-friendly encoding of the same information.

The hexversion is a 32-bit number with the following layout:
Bits (big endian order)     Meaning
1-8     PY_MAJOR_VERSION (the 2 in 2.1.0a3)
9-16     PY_MINOR_VERSION (the 1 in 2.1.0a3)
17-24     PY_MICRO_VERSION (the 0 in 2.1.0a3)
25-28     PY_RELEASE_LEVEL (0xA for alpha, 0xB for beta, 0xC for release candidate and 0xF for final)
29-32     PY_RELEASE_SERIAL (the 3 in 2.1.0a3, zero for final releases)

Thus 2.1.0a3 is hexversion 0x020100a3.

u   Jérôme KiefferZMITz9European Synchrotron Radiation Facility, Grenoble, Francez
15/12/2020Z
productionZrestructuredtextdateversion_infostrictversion
hexversiondebianversioncalc_hexversion    
            )devalphabeta	candidatefinalabZrc)r   r   r   r         r   )
namedtuplemajorminormicroreleaselevelserialz%d.%d.%dNz-%s%sr   z~adev%iz~%s%ic             C   s   yt |}W n  tk
r,   t|d}Y nX t |}||d d> O }|t |d d> O }|t |d d> O }|t | d d> O }|S )a  Calculate the hexadecimal version number from the tuple version_info:

    :param major: integer
    :param minor: integer
    :param micro: integer
    :param relev: integer or string
    :param serial: integer
    :return: integer always increasing with revision numbers
    r   r               )int
ValueErrorRELEASE_LEVEL_VALUEget)r   r   r   r   r   Zhex_version r$   2lib/python3.7/site-packages/hdf5plugin/_version.pyr   ]   s    
__main__)r   r   r   r   r   )__doc__Z__authors__Z__license__Z__copyright__Z__date__Z
__status__Z__docformat____all__r"   ZPRERELEASE_NORMALIZED_NAMEZMAJORZMINORZMICROZRELEVZSERIALr   collectionsr   Z_version_infor   r   versionr   r   Z_prereleasestrr   r   __name__printr$   r$   r$   r%   <module>2   sH   
(

