+
     i  c                   sV    R t ^ RIt^ RIt^ RIt^ RIt^ RIHt RsR tR t	R t
RR ltR# )	zBGet stuff from /usr/share/input-remapper, depending on the prefix.N)loggerFc            	      s   \        \        P                  P                  R R4      P	                  R4      RR\        P
                  P                  \        P                  R4      .,           4      p V  FL  p\        P
                  P                  VR4      p\        P
                  P                  V4      '       g   KJ  Vu # 	  R# )ZXDG_DATA_DIRS Z:z/usr/local/share/z/usr/share/zshare/input-remapperN)
ZsetosenvirongetZsplitpathjoinsiteZ	USER_BASEexists)Zxdg_data_dirsZxdg_data_dirZ	candidates      ?/usr/lib/python3.14/site-packages/inputremapper/configs/data.py_try_standard_locationsr   #   s     


+11#6GGLL2
	
M &GGLL/?@	77>>)$$ &
     c                 s   Rp  \         P                  ! R4      ^ ,          P                  p RpV '       dy   RV 9  dr   RV 9  dk   \        P                  P                  V R4      p\        P                  P                  V4      '       g&   \        '       g   \        P
                  ! RV4       RpV#   \         d    \        P
                  ! R4        Li ; i)z<Look for the data dir at the packages installation location.Nr   z%failed to figure out package locationz	-packagesZpythondataz-e, but data missing at "%s")pkg_resourcesZrequireZlocationZ	Exceptionr    debugr   r   r   r	   logged)Zsourcer   s     r
   _try_python_package_locationr   7   s    F&&'78;DD D +V+0Fww||FF+ww~~d##6;TBDK  <=s   'B/ /!CCc                 s    \         P                  P                  RR4      p V f   R# \         P                  P	                  V 4      '       d   V # \
        P                  ! RV  R24       R# )z7Check if input-remappers data can be found at DATA_DIR.ZDATA_DIRNZ"z" does not exist)r   r   r   r   r	   r    error)Zdata_dirs    r
   _try_env_data_dirr   O   sP    zz~~j$/H	ww~~hq($456r   c                sF   \        4       ;'       g    \        4       ;'       g    \        4       pVf-   \        P                  ! R4       \
        P                  ! ^
4       \        '       g   \        P                  ! RV4       Rs\        P                  P                  W4      # )zDepending on the installation prefix, return the data dir.

Since it is a nightmare to get stuff installed with pip across
distros this is somewhat complicated. Ubuntu uses /usr/local/share
for data_files (setup.py) and manjaro uses /usr/share.
z#Could not find the application datazFound data at "%s"T)r   r   r   r    r   sysZexitr   r   r   r   r   )Zfilenamer   s   & r
   get_data_pathr   ^   sz     	 	% 	%')	% 	%"$ 	 |:;6)4077<<''r   )r   )Z__doc__r   r   r   r   Zinputremapper.logging.loggerr    r   r   r   r   r   ) r   r
   <module>r      s5   * I 
  
  /	(0(r   