
    AVh                         d Z ddlmZ ddlZddlmZ ddlm	Z
 ddlmZ ddlmZ ddlmZ ddlmZ dd	lmZ  ed
      d        Z ed      d        Z ed      d        Z ed      d        Z ed      d        Zy)zCSystem configuration library.

API docstring: tensorflow.sysconfig
    N)pywrap_tf_session)CXX11_ABI_FLAG)CXX_VERSION)MONOLITHIC_BUILD)VERSION
build_info)	tf_exportzsysconfig.get_includec                  p    ddl } t        j                  t        j                  | j                        d      S )ziGet the directory containing the TensorFlow C++ header files.

  Returns:
    The directory as string.
  r   Ninclude
tensorflow_os_pathjoindirname__file__tfs    T/home/dcms/DCMS/lib/python3.12/site-packages/tensorflow/python/platform/sysconfig.pyget_includer   !   s'     	x''4i	@@    zsysconfig.get_libc                  n    ddl } t        j                  t        j                  | j                              S )zjGet the directory containing the TensorFlow framework library.

  Returns:
    The directory as string.
  r   Nr   r   s    r   get_libr   0   s%     	x''4	55r   zsysconfig.get_compile_flagsc                  F   g } | j                  dt               z         | j                  dt        z         d}t        dk(  rd}n#t        dk(  rd}nt        dk(  rd	}nt        d
k(  rd}|r| j                  |       | j                  dt	        j
                         z         | S )a  Returns the compilation flags for compiling with TensorFlow.

  The returned list of arguments can be passed to the compiler for compiling
  against TensorFlow headers. The result is platform dependent.

  For example, on a typical Linux system with Python 3.7 the following command
  prints `['-I/usr/local/lib/python3.7/dist-packages/tensorflow/include',
  '-D_GLIBCXX_USE_CXX11_ABI=1', '-DEIGEN_MAX_ALIGN_BYTES=64']`

  >>> print(tf.sysconfig.get_compile_flags())

  Returns:
    A list of strings for the compiler flags.
  z-I%sz-D_GLIBCXX_USE_CXX11_ABI=%dNi z--std=c++11i z--std=c++14i z--std=c++17i z--std=c++20z-DEIGEN_MAX_ALIGN_BYTES=%d)appendr   _CXX11_ABI_FLAG_CXX_VERSIONr   get_eigen_max_align_bytes)flagscxx_version_flags     r   get_compile_flagsr!   ;   s      %,,v%&,,,>?V$v$v$v$	LL!",,+ ::<= >	,r   zsysconfig.get_link_flagsc                     t        j                         dk(  } t        j                  d      d   }g }t        sH|j                  dt               z         | r|j                  d|z         |S |j                  d|z         |S )a  Returns the linker flags for linking with TensorFlow.

  The returned list of arguments can be passed to the linker for linking against
  TensorFlow. The result is platform dependent.

  For example, on a typical Linux system with Python 3.7 the following command
  prints `['-L/usr/local/lib/python3.7/dist-packages/tensorflow',
  '-l:libtensorflow_framework.so.2']`

  >>> print(tf.sysconfig.get_link_flags())

  Returns:
    A list of strings for the linker flags.
  Darwin.r   z-L%sz-ltensorflow_framework.%sz -l:libtensorflow_framework.so.%s)	_platformsystem_VERSIONsplit_MONOLITHIC_BUILDr   r   )is_macverr   s      r   get_link_flagsr,   ^   sz      )&sA#
%		LL')#$ll.45 
, ll5;<	,r   zsysconfig.get_build_infoc                  "    t         j                   S )aa  Get a dictionary describing TensorFlow's build environment.

  Values are generated when TensorFlow is compiled, and are static for each
  TensorFlow package. The return value is a dictionary with string keys such as:

    - cuda_version
    - cudnn_version
    - is_cuda_build
    - is_rocm_build
    - msvcp_dll_names
    - nvcuda_dll_name
    - cudart_dll_name
    - cudnn_dll_name

  Note that the actual keys and values returned by this function is subject to
  change across different versions of TensorFlow or across platforms.

  Returns:
    A Dictionary describing TensorFlow's build environment.
  r    r   r   get_build_infor/   z   s    , 
		r   )__doc__os.pathpathr   platformr%   tensorflow.python.clientr   $tensorflow.python.framework.versionsr   r   r   r   r   r)   r   r'   tensorflow.python.platformr	    tensorflow.python.util.tf_exportr
   r   r   r!   r,   r/   r.   r   r   <module>r8      s       6 R L V D 1 6 "#A $A 6  6 () *D %& '6 %& 'r   