a
h? @ sL d dl m mZ d dlmZ d dlmZ d dlm Z G dd dejZdS ) N)DistutilsSetupError)log)newer_pairwise_groupc @ s e Zd ZdZdd ZdS )
build_clibav
Override the default build_clib behaviour to do the following:
1. Implement a rudimentary timestamp-based dependency system
so 'compile()' doesn't run every time.
2. Add more keys to the 'build_info' dictionary:
* obj_deps - specify dependencies for each object compiled.
this should be a dictionary mapping a key
with the source filename to a list of
dependencies. Use an empty string for global
dependencies.
* cflags - specify a list of additional flags to pass to
the compiler.
c C sr |D ]f\}}| d}|d u s.t|ttfs:td| t|}td| | dt }t|tsrtd| g }| dt }t|ttfstd| |D ]P}|g} | | | |t }
t|
ttfstd| | |
| | q| j
j|| jd}t
||g g fkrT| d}| d }
| d
}| j
j|| j||
|| jd | j
j||| j| jd qd S )
Nsourceszfin 'libraries' option (library '%s'), 'sources' must be present and must be a list of source filenameszbuilding '%s' libraryobj_depsz\in 'libraries' option (library '%s'), 'obj_deps' must be a dictionary of type 'source: list' )
output_dirmacrosinclude_dirscflags)r r
r Zextra_postargsdebug)r r
)get
isinstancelisttupler r infodictextendappendZcompilerZobject_filenamesZ
build_tempr compiler
Zcreate_static_libr )selfZ librariesZlib_nameZ
build_infor r ZdependenciesZglobal_depssourceZsrc_depsZ
extra_depsZexpected_objectsr
r r r A/usr/lib/python3.9/site-packages/setuptools/command/build_clib.pybuild_libraries s|
zbuild_clib.build_librariesN)__name__
__module____qualname____doc__r r r r r r s r )
Zdistutils.command.build_clibZcommandr ZorigZdistutils.errorsr Z distutilsr Zsetuptools.dep_utilr r r r r