@@ -592,6 +592,25 @@ def version(self):
592592)
593593config .add_extension (_db )
594594
595+ # ------------------------------------------------------------------
596+ # _pex dependency library
597+
598+ _pex_path = os .path .join ("src" , "pex" , "pex" )
599+ _pex_sources = set (glob .glob (os .path .join (_pex_path , "*.cc" )))
600+
601+ _pex = Library (
602+ config .root + "._pex" ,
603+ define_macros = config .macros () + [("MAKE_PEX_LIBRARY" , 1 )],
604+ include_dirs = [_tl_path , _gsi_path , _db_path , _pex_path ],
605+ extra_objects = [config .path_of ("_tl" , _tl_path ), config .path_of ("_gsi" , _gsi_path ), config .path_of ("_db" , _db_path )],
606+ language = "c++" ,
607+ libraries = config .libraries ('_pex' ),
608+ extra_link_args = config .link_args ("_pex" ),
609+ extra_compile_args = config .compile_args ("_pex" ),
610+ sources = list (_pex_sources ),
611+ )
612+ config .add_extension (_pex )
613+
595614# ------------------------------------------------------------------
596615# _lib dependency library
597616
@@ -869,6 +888,28 @@ def version(self):
869888 sources = list (db_sources ),
870889)
871890
891+ # ------------------------------------------------------------------
892+ # pex extension library
893+
894+ pex_path = os .path .join ("src" , "pymod" , "pex" )
895+ pex_sources = set (glob .glob (os .path .join (pex_path , "*.cc" )))
896+
897+ pex = Extension (
898+ config .root + ".pexcore" ,
899+ define_macros = config .macros (),
900+ include_dirs = [_db_path , _tl_path , _gsi_path , _pya_path , _pex_path ],
901+ extra_objects = [
902+ config .path_of ("_db" , _db_path ),
903+ config .path_of ("_pex" , _pex_path ),
904+ config .path_of ("_tl" , _tl_path ),
905+ config .path_of ("_gsi" , _gsi_path ),
906+ config .path_of ("_pya" , _pya_path ),
907+ ],
908+ extra_link_args = config .link_args ("pexcore" ),
909+ extra_compile_args = config .compile_args ("pexcore" ),
910+ sources = list (pex_sources ),
911+ )
912+
872913# ------------------------------------------------------------------
873914# lib extension library
874915
@@ -1010,8 +1051,8 @@ def version(self):
10101051 package_data = {config .root : ["src/pymod/distutils_src/klayout/*.pyi" ]},
10111052 data_files = [(config .root , ["src/pymod/distutils_src/klayout/py.typed" ])],
10121053 include_package_data = True ,
1013- ext_modules = [_tl , _gsi , _pya , _rba , _db , _lib , _rdb , _lym , _laybasic , _layview , _ant , _edt , _img ]
1054+ ext_modules = [_tl , _gsi , _pya , _rba , _db , _pex , _lib , _rdb , _lym , _laybasic , _layview , _ant , _edt , _img ]
10141055 + db_plugins
1015- + [tl , db , lib , rdb , lay , pya ],
1056+ + [tl , db , pex , lib , rdb , lay , pya ],
10161057 cmdclass = {'build_ext' : klayout_build_ext }
10171058 )
0 commit comments