
    ԸBe%                     "    d dl Z d dlZddZd Zy)    Nc                    t         j                  j                  t         j                  j                  |            }t         j                  j	                  |d      }t         j                  j                  |      s t         j                  j	                  |d      }t         j                  j                  |       r&|st        d| z         yt        j                  |        t        j                  ddd      }t         j                  j                  |      }t         j                  j                  |      rt        j                  || |d	       yt        d
|z         y)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.12/site-packages/pyct/build.pyexamplesr      s     wwrwwt45H'',,x6K77>>+&ggll8];	ww~~dWZ^^_d##$8'4HF,I	ww}}Y	4F*+    c                 v   ddl }t        j                  j                  t        j                  j	                  |             }t        j                  j                  ||d      }	 ddlm} ||j                  j                  ||d      S t        d       |j                  t        |d            d	   S #  d}Y OxY w)
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     wwrwwt45HXxD! ,,XxP],^^  c  	dyy/567GHHs   #B2 2B8)FF)r   r   r   r(    r   r   <module>r*      s    	 ,*Ir   