Repository URL to install this package:
|
Version:
0.1.31-1 ▾
|
odigos-demo-inventory
/
opt
/
odigos-demo-inventory
/
site-packages
/
installer
/
__pycache__
/
destinations.cpython-311.pyc
|
|---|
§
hµµh¤' ã óØ d Z ddlZddlZddlZddlmZ ddlmZmZm Z m
Z
mZmZm
Z
mZ ddlmZmZ ddlmZ ddlmZmZmZmZmZ erddlmZmZ G d d
¦ « Z G d de¦ « ZdS )
z:Handles all file writing and post-installation processing.é N)ÚPath)Ú
TYPE_CHECKINGÚBinaryIOÚ
CollectionÚDictÚIterableÚOptionalÚTupleÚUnion)ÚHashÚRecordEntry)ÚScript)ÚSchemeÚconstruct_record_fileÚcopyfileobj_with_hashingÚfix_shebangÚmake_file_executable)ÚLauncherKindÚ
ScriptSectionc
ó e Zd ZdZdedededddef
dZd ed
eedf de d
e
def
dZd ededee
eef ddfdZdS )ÚWheelDestinationz¿Handles writing the unpacked files, script generation and ``RECORD`` generation.
Subclasses provide the concrete script generation logic, as well as the RECORD file
(re)writing.
ÚnameÚmoduleÚattrÚsectionr Úreturnc ó t )a Write a script in the correct location to invoke given entry point.
:param name: name of the script
:param module: module path, to load the entry point from
:param attr: final attribute access, for the entry point
:param section: Denotes the "entry point section" where this was specified.
Valid values are ``"gui"`` and ``"console"``.
:type section: str
Example usage/behaviour::
>>> dest.write_script("pip", "pip._internal.cli", "main", "console")
©ÚNotImplementedError)Úselfr r r r s úA/usr/local/lib/python3.11/site-packages/installer/destinations.pyÚwrite_scriptzWheelDestination.write_script' s
õ" "Ð!ó ÚschemeÚpathúos.PathLike[str]ÚstreamÚ
is_executablec ó t )a Write a file to correct ``path`` within the ``scheme``.
:param scheme: scheme to write the file in (like "purelib", "platlib" etc).
:param path: path within that scheme
:param stream: contents of the file
:param is_executable: whether the file should be made executable
The stream would be closed by the caller, after this call.
Example usage/behaviour::
>>> with open("__init__.py") as stream:
... dest.write_file("purelib", "pkg/__init__.py", stream)
r )r r$ r% r' r( s r! Ú
write_filezWheelDestination.write_file: s
õ, "Ð!r# Úrecord_file_pathÚrecordsNc ó t )a Finalize installation, after all the files are written.
Handles (re)writing of the ``RECORD`` file.
:param scheme: scheme to write the ``RECORD`` file in
:param record_file_path: path of the ``RECORD`` file with that scheme
:param records: entries to write to the ``RECORD`` file
Example usage/behaviour::
>>> dest.finalize_installation("purelib")
r )r r$ r+ r, s r! Úfinalize_installationz&WheelDestination.finalize_installationR s
õ&