~
d Z ddlZddlZddlZddlZddlZddlZddlZddlm Z ddl
mZ ddlm
Z
ddlmZ ddlmZ ddlmZ dd lmZmZmZmZmZmZmZmZmZmZ dd
lm Z m!Z!m"Z"m#Z# ddl$m%Z& ddl'm(Z( dd
l)m*Z* erddl+m,Z, ej- dk rddlm.Z. nerddl/m.Z. nddl0m1Z. ee2ef Z3 ede3 Z4 ej5 e6 Z7 G d de Z8dZ9dZ: G d de Z; G d de. Z< G d d Z= G d de= Z> G d d! Z?d"ed#e@fd$ZAd%ee2 d&ee2e2f d'ed#e@fd(ZBd) ZCd*e*d#ee2 fd+ZDd*e*d#ee2 fd,ZEd%ee2 d&ee2e2f d-e3d#ee2e2f fd.ZFd/e3d#e2fd0ZGd1ee2e2f d#ee2 fd2ZHd%ee2 d1ee2e2f d#eee2ee2 f fd3ZId1ee2e2f d#ee2e2f fd4ZJd5e2d6e2d7e2d8e2d#e@f
d9ZKd:e3d#e2fd;ZLde2d#e2fd?ZN G d@ dAe#jO ZPdBZQd>e2dCee2e2f dDee2ee2 f d#e2fdEZR G dF dGeS ZT G dH dIe"jU ZVdS )Ja
Create a wheel that, when installed, will make the source package 'editable'
(add it to the interpreter's path, including metadata) per PEP 660. Replaces
'setup.py develop'.
.. note::
One of the mechanisms briefly mentioned in PEP 660 to implement editable installs is
to create a separated directory inside ``build`` and use a .pth file to point to that
directory. In the context of this file such directory is referred as
*auxiliary build directory* or ``auxiliary_dir``.
N)suppress)Enum)cleandoc)chain)Path)TemporaryDirectory)
TYPE_CHECKINGDictIterableIteratorListMappingOptionalTupleTypeVarUnion)CommandSetuptoolsDeprecationWarningerrors
namespaces)build_pyfind_package_path)Distribution WheelFile) )Protocol)ABC_P)boundc J e Zd ZdZdZdZdZedee dd fd Z
dS )
_EditableModea
Possible editable installation modes:
`lenient` (new files automatically added to the package - DEFAULT);
`strict` (requires a new installation when files are added/removed); or
`compat` (attempts to emulate `python setup.py develop` - DEPRECATED).
strictlenientcompatmodereturnc |st j S | }|t j vrt j d|d |dk rd}t
j |t t | S )NzInvalid editable mode: z. Try: 'strict'.COMPATax
The 'compat' editable mode is transitional and will be removed
in future versions of `setuptools`.
Please adapt your code accordingly to use either the 'strict' or the
'lenient' modes.
For more information, please check:
https://setuptools.pypa.io/en/latest/userguide/development_mode.html
) r$ LENIENTupper__members__r OptionErrorwarningswarnr )clsr( _modemsgs /builddir/build/BUILDROOT/alt-python311-setuptools-65.6.3-2.el9.x86_64/opt/alt/python311/lib/python3.11/site-packages/setuptools/command/editable_wheel.pyconvertz_EditableMode.convertG s} ) ((
111$%Wt%W%W%WXXXHC
M#;<<<U## N)__name__
__module____qualname____doc__STRICTr, r+ classmethodr strr6 r7 r5 r$ r$ ; s_ FG
F$8C= $_ $ $ $ [$ $ $r7 r$ zU
New or renamed files may not be automatically picked up without a new installation.
zt
Options like `package-data`, `include/exclude-package-data` or
`packages.find.exclude/include` may have no effect.
c V e Zd ZdZdZdddd eej pd fgZd Zd Z d
Z
d Zd Zd
e
e fdZdedededefdZd Zd
eee eeef f fdZdedededed
eee eeef f f
dZd ZdefdZd ZdefdZdededed
dfd ZdS )!editable_wheelzkBuild 'editable' wheel for development.
(This command is reserved for internal use of setuptools).
z!create a PEP 660 'editable' wheel)z dist-dir=dz-directory to put final built distributions in)zdist-info-dir=Iz(path to a pre-build .dist-info directoryzmode=N c > d | _ d | _ d | _ d | _ d S N)dist_dir
dist_info_dirproject_dirr( selfs r5 initialize_optionsz!editable_wheel.initialize_optionsv s$
! r7 c | j }|j pt j | _ |j pi | _ t
| j p$t j | j d | _ d S )Ndist)
distributionsrc_rootoscurdirrI package_dirr rG pathjoin)rK rN s r5 finalize_optionszeditable_wheel.finalize_options| sX =5BI+1rT]Tbgll4;KV.T.TUU
r7 c | j d | | d | d }| | j | | d S # t $ r<}t j
d}t j t | |d }~ww xY w)NT)exist_okbdist_wheela
Support for editable installs via PEP 660 was recently introduced
in `setuptools`. If you are seeing this error, please report to:
https://github.com/pypa/setuptools/issues
Meanwhile you can try the legacy behavior by setting an
environment variable and trying to install again:
SETUPTOOLS_ENABLE_FEATURES="legacy-editable"
)rG mkdir_ensure_dist_inforeinitialize_commandget_finalized_commandwrite_wheelfilerH _create_wheel_file Exception traceback print_excr
InternalErrorr )rK rY exr4 s r5 runzeditable_wheel.run s >M...""$$$
%%m44444]CCK''(:;;;##K00000
>
>
>!!!
C &x}}552=
>s BB
C7C
Cc f | j W| d }| j |_ | | |j | _ d S t
| j d sJ t | j d sJ d S )N dist_infoz
.dist-infoMETADATA)
rH r\ rG
output_dirensure_finalizedre r> endswithr exists)rK rg s r5 r[ z editable_wheel._ensure_dist_info s %11+>>I#'=I &&(((MMOOO!*!8Dt)**33LAAAAA*J77>>@@@@@@@r7 c | j }|j sd S t | j | j dd }t |||| }| d S )NrD .) rO namespace_packagesr rI rS getresolve_NamespaceInstallerinstall_namespaces)rK installation_dir
pth_prefixrN rP installers r5 _install_namespacesz"editable_wheel._install_namespaces sw &