ó
    HWhñ  ã                   óä   • S r SSKrSSKrSSKrSSKJr  SSKJr   " S S5      r " S S\5      r	 SSK
r  SS	 jr\R                  S:X  a  SrSSKJr  S rgSSKJr  g! \ a
      SS
 jr N2f = f)z,
Backports of fixes for joblib dependencies
é    N)Úbasename)Úutilc                   óF   • \ rS rSrSrSS jrS rS rS rS r	S	 r
S
 rSrg)ÚVersioné   úêBackport from deprecated distutils

We maintain this backport to avoid introducing a new dependency on
`packaging`.

We might rexplore this choice in the future if all major Python projects
introduce a dependency on packaging anyway.
Nc                 ó6   • U(       a  U R                  U5        g g ©N©Úparse©ÚselfÚvstrings     Ú2/usr/lib/python3/dist-packages/joblib/backports.pyÚ__init__ÚVersion.__init__   ó   € ÞØ�J‰J�wÕð ó    c                 óP   • U R                   R                  < S[        U 5      < S3$ )Nz ('z'))Ú	__class__Ú__name__Ústr©r   s    r   Ú__repr__ÚVersion.__repr__   s   € Ø"Ÿn™n×5Ô5´s¸4¶yÐAÐAr   c                 óD   • U R                  U5      nU[        L a  U$ US:H  $ ©Nr   ©Ú_cmpÚNotImplemented©r   ÚotherÚcs      r   Ú__eq__ÚVersion.__eq__   ó&   € Ø�I‰I�eÓˆØ”ÒØˆHØ�A‰vˆr   c                 óD   • U R                  U5      nU[        L a  U$ US:  $ r   r   r!   s      r   Ú__lt__ÚVersion.__lt__#   ó&   € Ø�I‰I�eÓˆØ”ÒØˆHØ�1‰uˆr   c                 óD   • U R                  U5      nU[        L a  U$ US:*  $ r   r   r!   s      r   Ú__le__ÚVersion.__le__)   r&   r   c                 óD   • U R                  U5      nU[        L a  U$ US:„  $ r   r   r!   s      r   Ú__gt__ÚVersion.__gt__/   r*   r   c                 óD   • U R                  U5      nU[        L a  U$ US:¬  $ r   r   r!   s      r   Ú__ge__ÚVersion.__ge__5   r&   r   © r
   )r   Ú
__module__Ú__qualname__Ú__firstlineno__Ú__doc__r   r   r$   r(   r,   r/   r2   Ú__static_attributes__r4   r   r   r   r      s+   † ñô òBòòòòõr   r   c                   ót   • \ rS rSrSr\R                  " S\R                  5      rSS jr	S r
S rS rS	 rS
rg)ÚLooseVersioné<   r   z(\d+ | [a-z]+ | \.)Nc                 ó6   • U(       a  U R                  U5        g g r
   r   r   s     r   r   ÚLooseVersion.__init__H   r   r   c                 ó  • Xl         U R                  R                  U5       Vs/ s H  nU(       d  M  US:w  d  M  UPM     nn[        U5       H  u  pE [	        U5      X4'   M     X0l        g s  snf ! [
         a     M0  f = f)NÚ.)r   Úcomponent_reÚsplitÚ	enumerateÚintÚ
ValueErrorÚversion)r   r   ÚxÚ
componentsÚiÚobjs         r   r   ÚLooseVersion.parseL   s‡   € ð ŒØ!%×!2Ñ!2×!8Ñ!8¸Ô!Aó )Ò!A˜AÜó Ø  C™x÷ Ñ!Aˆ
ð )ä 
Ö+‰FˆAðÜ # C£�
“ñ ,ð "�ùò)øô
 ó Úðús!   ¤A,³A,»A,ÁA1Á1
A?Á>A?c                 ó   • U R                   $ r
   )r   r   s    r   Ú__str__ÚLooseVersion.__str__[   s   € Ø�|‰|Ðr   c                 ó   • S[        U 5      -  $ )NzLooseVersion ('%s'))r   r   s    r   r   ÚLooseVersion.__repr__^   s   € Ø$¤s¨4£yÑ0Ð0r   c                 ó  • [        U[        5      (       a  [        U5      nO[        U[        5      (       d  [        $ U R                  UR                  :X  a  gU R                  UR                  :  a  gU R                  UR                  :”  a  gg )Nr   éÿÿÿÿé   )Ú
isinstancer   r;   r    rF   )r   r"   s     r   r   ÚLooseVersion._cmpa   sj   € Ü�eœS×!Ñ!Ü  Ó'‰EÜ˜E¤<×0Ñ0Ü!Ð!à�<‰<˜5Ÿ=™=Ó(ØØ�<‰<˜%Ÿ-™-Ó'ØØ�<‰<˜%Ÿ-™-Ó'Øð (r   )rF   r   r
   )r   r5   r6   r7   r8   ÚreÚcompileÚVERBOSErA   r   r   rM   r   r   r9   r4   r   r   r;   r;   <   s7   † ñð —:’:Ð4°b·j±jÓA€Lô ò"òò1õr   r;   c           	      ó(  • [         R                  " SR                  U[        U 5      [        R
                  " 5       5      5        [        R                  " XX#XES9n[        [        R                  5      S:  a  X7l
        U(       a  SSKJn  U" U5        U$ )a  Custom memmap constructor compatible with numpy.memmap.

This function:
- is a backport the numpy memmap offset fix (See
  https://github.com/numpy/numpy/pull/8443 for more details.
  The numpy fix is available starting numpy 1.13)
- adds ``unlink_on_gc_collect``, which specifies  explicitly whether
  the process re-constructing the memmap owns a reference to the
  underlying file. If set to True, it adds a finalizer to the
  newly-created memmap that sends a maybe_unlink request for the
  memmaped file to resource_tracker.
z?[MEMMAP READ] creating a memmap (shape {}, filename {}, pid {}))ÚdtypeÚmodeÚoffsetÚshapeÚorderz1.13rS   )Úadd_maybe_unlink_finalizer)r   ÚdebugÚformatr   ÚosÚgetpidÚnpÚmemmapr;   Ú__version__r\   Ú_memmapping_reducerr_   )	ÚfilenamerZ   r[   r\   r]   r^   Úunlink_on_gc_collectÚmmr_   s	            r   Úmake_memmaprk   r   sn   € ô 	�
Š
ðß‘f˜U¤H¨XÓ$6¼¿	º	»ÓDô	
ô
 �YŠY�x°4Ø"ñ1ˆäœŸ™Ó'¨&Ó0ØŒIÞÝGÙ& rÔ*Øˆ	r   c                 ó   • [        S5      e)NzL'joblib.backports.make_memmap' should not be used if numpy is not installed.)ÚNotImplementedError)rh   rZ   r[   r\   r]   r^   ri   s          r   rk   rk   Ž   s   € ä!ð)ó*ð 	*r   Únt)é   é   )Úreplacec                 óÜ   • SnSnSnX2:  a   [        X5        ge ! [         a?  n[        USS5      [        ;   a$  [        R
                  " U5        X4-  nUS-  n SnAO	e SnAff = fX2:  a  Ma  NU)zšRenames ``src`` into ``dst`` overwriting ``dst`` if it exists.

On Windows os.replace can yield permission errors if executed by two
different processes.
rS   r   gü©ñÒMbP?ÚwinerrorNé   )rq   Ú	ExceptionÚgetattrÚaccess_denied_errorsÚtimeÚsleep)ÚsrcÚdstÚmax_sleep_timeÚtotal_sleep_timeÚ
sleep_timeÚexcs         r   Úconcurrency_safe_renamer€   š   s|   € ð ˆØÐØˆ
ØÓ/ð	Ü˜Ô!Øð øô ó Ü˜3 
¨DÓ1Ô5IÓIÜ—J’J˜zÔ*Ø$Ñ2Ð$Ø !‘O•Jàûðúð	 Ö/s   � š
A#¤4AÁAÁA#)Úuint8zr+r   NÚCF)r8   rb   rV   rx   Úos.pathr   Úmultiprocessingr   r   r;   Únumpyrd   rk   ÚImportErrorÚnamerw   rq   r€   r4   r   r   Ú<module>rˆ      s„   ðñó 
Û 	Û å Ý  ÷-ñ -ô`0�7ô 0ðf#*Ûà?@Ø@EôðF ‡7�7ˆdƒ?à"ÐÝóö. 6øðI ó *Ø?@Ø@Eö*ð*ús   ±A ÁA/Á.A/