
    xhe                        d dl mZ d dlZd dlmZ d dlmZmZ d dlm	Z	 ddl
mZ ddlmZ  ej        ej        	           d
ZddZdddZdS )    )annotationsN)	Namespace)abspath
expanduser)Sequence   )api)ArgumentParser)levela  

Tool to convert packages

conda convert converts pure Python packages to other platforms.

Packages are automatically organized in subdirectories according to platform,
e.g.,

osx-64/
  package-1.0-py33.tar.bz2
win-32/
  package-1.0-py33.tar.bz2

Examples:

Convert a package built with conda build to Windows 64-bit, and place the
resulting package in the current directory (supposing a default Anaconda
install on Mac OS X):

    conda convert package-1.0-py33.tar.bz2 -p win-64

argsSequence[str] | Nonereturn tuple[ArgumentParser, Namespace]c           	     (   t          ddt                    }|                    ddd           |                    dd	d
dg ddd            |                    dddd           |                    dddd           |                    dddd           |                    dddd            |                    d!d"ddd#$           |                    d%dd&           |                    d'd(dd)           ||                    |           fS )*Nzconda convertz
Various tools to convert conda packages. Takes a pure Python package build for
one platform and converts it to work on one or more other platforms, or
all.)progdescriptionepilogfiles+zPackage files to convert.)nargshelpz-pz
--platform	platformsappend)zosx-64z	osx-arm64zlinux-32zlinux-64zlinux-ppc64zlinux-ppc64lezlinux-s390xzlinux-armv6lzlinux-armv7lzlinux-aarch64zwin-32zwin-64z	win-arm64allz$Platform to convert the packages to.)destactionchoicesr   defaultz--dependenciesz-d*zAdditional (besides python) dependencies of the converted
        package.  To specify a version restriction for a dependency, wrap
        the dependency in quotes, like 'package >=2.0'.z--show-imports
store_trueFz6Show Python imports for compiled parts of the package.)r   r   r   z-fz--forcez=Force convert, even when a package has compiled C extensions.)r   r   z-oz--output-dir.zDirectory to write the output files. The packages will be
        organized in platform/ subdirectories, e.g.,
        win-32/package-1.0-py27_0.tar.bz2.)r   r   z-vz	--verbosezPrint verbose output.)r   r   r   z	--dry-runz'Only display what would have been done.z-qz--quietzDon't print as much output.)r
   r   add_argument
parse_args)r   parsers     <lib/python3.11/site-packages/conda_build/cli/main_convert.pyr#   r#   (   s      F s1LMMM

 
 
  4-    0 ;	     E	     L	     .	     $     6    
 i3P     6$$T****    intc                    t          |           \  }}|j        }|j        d= |D ]5}t          t	          |                    }t          j        |fi |j         6dS )Nr   r   )r#   r   __dict__r   r   r	   convert)r   _parsedr   fs        r%   executer.   {   sh    4  IAvLE  * *JqMM""A))))))1r&   )r   r   r   r   )N)r   r   r   r'   )
__future__r   loggingargparser   os.pathr   r   typingr    r	   conda_interfacer
   basicConfigINFOr   r#   r.    r&   r%   <module>r9      s    # " " " " "        ' ' ' ' ' ' ' '             , , , , , ,  ', ' ' ' '
2P+ P+ P+ P+f	 	 	 	 	 	 	r&   