
    c%                     $    d dl Z d dlZddZd ZdS )    NFc                    t           j                            t           j                            |                    }t           j                            |d          }t           j                            |          s t           j                            |d          }t           j                            |           r*|st          d| z             dS t          j        |            t          j	        ddd          }t           j                            |          }t           j        
                    |          rt          j        || |d	           dS t          d
|z             dS )z4
    Copies the notebooks to the supplied path.
    z
./examplesz../exampleszC%s directory already exists, either delete it or set the force flagNz.ipynb_checkpointsz*.pycz*~T)ignoresymlinkszCannot find %s)ospathabspathdirnamejoinexistsprintshutilrmtreeignore_patternsisdircopytree)r   rootverboseforcefilepathexample_dirr   	tree_roots           *lib/python3.11/site-packages/pyct/build.pyexamplesr      s$    wrwt4455H',,x66K7>>+&& <gll8];;	w~~d  	WZ^^___Fd#$8'4HHF,,I	w}}Y ,	4FFFFFF*+++++    c                    ddl }t          j                            t          j                            |                     }t          j                            ||d          }	 ddlm} n	#  d}Y nxY w||j        	                    ||d          S t          d           |                    t          |d                    d	         S )
a1  
    Helper to get the current version from either git describe or the
    .version file (if available) - allows for param to not be available.

    Normally used in setup.py as follows:

    >>> from pyct.build import get_setup_version
    >>> version = get_setup_version(__file__, reponame)  # noqa
    r   Nz.version)versionz$Format:%h$)archive_commitzWARNING: param>=1.6.0 unavailable. If you are installing a package, this warning can safely be ignored. If you are creating a package or otherwise operating in a git repository, you should install param>=1.6.0.rversion_string)jsonr   r   r   r	   r
   paramr   Versionsetup_versionr   loadopen)r   reponamer    r   version_file_pathr   s         r   get_setup_versionr(      s     KKKwrwt4455HXxDD!!!!!!! I,,XxP],^^^  c  	d  	d  	dyy/55667GHHs   #A* *A0)FF)r   r   r   r(    r   r   <module>r*      sI    				 , , , ,*I I I I Ir   