ef pddlZddlmZddlZejjZGddZGddeZdS)N)logc^eZdZdZdZdZdZdZdZ dZ dZ d Z d Z e d Zd S) Installerz -nspkg.pthc|}|sdS|}|j|t jd|t |j|}|jrt|dSt|d5}| |ddddS#1swxYwYdS)Nz Installing %swt) _get_all_ns_packages_get_nspkg_fileoutputsappendrinfomap_gen_nspkg_linedry_runlistopen writelines)selfnspfilenamelinesfs u/builddir/build/BUILD/imunify360-venv-2.3.5/opt/imunify360/venv/lib/python3.11/site-packages/setuptools/namespaces.pyinstall_namespaceszInstaller.install_namespaces s''))  F'')) H%%% (+++D(#.. <  KKK F (D ! ! Q LL                     sB<<CCc|}tj|sdSt jd|tj|dS)Nz Removing %s)r ospathexistsrr remove)rrs runinstall_namespaceszInstaller.uninstall_namespacessV''))w~~h''  F ))) (c~tj|\}}||jzSN)rrsplitext _get_target nspkg_ext)rr_s rr zInstaller._get_nspkg_file$s4g&&t'7'7'9'9:: !$.((r c|jSr")targetrs rr$zInstaller._get_target(s {r ) zimport sys, types, osz#has_mfs = sys.version_info > (3, 5)z$p = os.path.join(%(root)s, *%(pth)r)z4importlib = has_mfs and __import__('importlib.util')z-has_mfs and __import__('importlib.machinery')zm = has_mfs and sys.modules.setdefault(%(pkg)r, importlib.util.module_from_spec(importlib.machinery.PathFinder.find_spec(%(pkg)r, [os.path.dirname(p)])))zCm = m or sys.modules.setdefault(%(pkg)r, types.ModuleType(%(pkg)r))z7mp = (m or []) and m.__dict__.setdefault('__path__',[])z(p not in mp) and mp.append(p))z4m and setattr(sys.modules[%(parent)r], %(child)r, m)cdS)Nz$sys._getframe(1).f_locals['sitedir']r)s r _get_rootzInstaller._get_rootAs55r ct|d}|}|j}|d\}}}|r ||jz }d|tzdzS)N.; )tuplesplitr, _nspkg_tmpl rpartition_nspkg_tmpl_multijoinlocals)rpkgpthroot tmpl_linesparentsepchilds rrzInstaller._gen_nspkg_lineDs}CIIcNN##~~%  ^^C00U  1 $0 0Jxx ##fhh.55r c |jjpg}ttt t |j|S)z,Return sorted list of all package namespaces) distributionnamespace_packagessortedsetflattenr _pkg_names)rpkgss rrzInstaller._get_all_ns_packagesMs< 39rc'#dot"<"<==>>???r c#K|d}|r/d|V||-dSdS)z Given a namespace package, yield the components of that package. >>> names = Installer._pkg_names('a.b.c') >>> set(names) == set(['a', 'a.b', 'a.b.c']) True r.N)r2r6pop)r8partss rrEzInstaller._pkg_namesRs` # ((5// ! ! ! IIKKK     r N)__name__ __module__ __qualname__r%rrr r$r3r5r,rr staticmethodrEr+r rrr sI   ")))K"(Q;666666@@@   \   r rceZdZdZdZdS)DevelopInstallercDtt|jSr")reprstregg_pathr)s rr,zDevelopInstaller._get_rootcsC &&'''r c|jSr")egg_linkr)s rr$zDevelopInstaller._get_targetfs }r N)rJrKrLr,r$r+r rrOrObs2(((r rO) r distutilsr itertoolschain from_iterablerDrrOr+r rrZs  / 'VVVVVVVVryr