메뉴
HN
Hacker News 1일 전

독립적이고 이식성 높은 파이썬 배포판

IMP
7/10
핵심 요약

이 프로젝트는 별도의 외부 종속성 설치 없이 단독으로 실행할 수 있는 고도로 이식성 높은 파이썬 배포판을 제공합니다. 표준 라이브러리의 대부분의 확장 모듈을 포함하며, 시스템의 공유 라이브러리 의존도를 최소화하여 다양한 환경에서 안정적으로 구동되도록 설계되었습니다. 또한 빌드 결과물을 조합해 파이썬을 다른 애플리케이션에 내장하거나 PyOxy와 같은 프로젝트를 통해 단일 실행 파일 형태로 유연하게 활용할 수 있어 개발자에게 매우 유용합니다.

번역된 본문

Python Standalone Builds ¶ 이 프로젝트는 자체 완비형(Self-contained)이며, 매우 높은 이식성(Portable)을 가진 파이썬 배포판(Distribution)을 생성합니다. 이 배포판들은 완전히 사용 가능하고 모든 기능을 갖춘 파이썬 설치본을 포함합니다. 파이썬 표준 라이브러리의 대부분의 확장 모듈이 포함되어 있으며, 해당 모듈들이 필요로 하는 라이브러리 종속성은 배포판과 함께 제공되거나 정적으로 링크(Static linked)됩니다.

이러한 파이썬 배포판은 런타임 종속성을 최소화하는 방식으로 빌드됩니다. 여기에는 사용 가능한 CPU 명령어 제한 및 런타임에 필요한 공유 라이브러리 세트 제한이 포함됩니다. 이 프로젝트의 목표는 생성된 배포판이 대상 아키텍처를 타겟으로 하는 모든 시스템에서 원활하게 작동하는 것입니다.

일부 배포판에는 배포판의 조립 방식과 세부 정보를 설명하는 풍부한 메타데이터와 함께 빌드 결과물(오브젝트 파일, 라이브러리 등)이 포함되어 제공됩니다. 이 빌드 결과물은 하위 재패키징 담당자(Repackager)가 재조합하여 SQLite나 OpenSSL과 같은 특정 기능이 생략된 맞춤형 파이썬 배포판을 파생시킬 수 있습니다. 이는 파이썬을 더 큰 규모의 바이너리 파일에 내장(Embedding)할 때 매우 유용합니다. 이러한 하위 재패키징 도구의 예시로는 PyOxidizer 프로젝트가 있습니다.

이 배포판의 많은 사용자는 PyOxy 프로젝트를 통해 더 나은 환경을 경험할 수 있습니다. PyOxy는 이 파이썬 배포판을 기반으로 파이썬 인터프리터의 기능을 향상시키기 위한 일부 러스트(Rust) 코드를 추가합니다. 공식 PyOxy 릴리스 바이너리는 모든 기능을 갖춘 파이썬 인터프리터를 제공하는 단일 파일 실행 파일입니다.

목차: 배포판 실행 배포판 획득 배포판 추출 런타임 요구 사항 추가 파이썬 소프트웨어 라이선스 빌드 결과물 재사용 빌드 (Linux, macOS, Windows) 동작 특이사항 파이썬 REPL에서 특정 키가 작동하지 않는 경우 UNIX의 tix 미지원 Windows에 pip.exe가 없는 현상 macOS에서 정적 라이브러리 링크 Linux에서 libedit 사용 빌드 시점 경로에 대한 참조 과거의 특이사항 기술 정보 작동 방식 Setup.local 해킹(수정) 종속성 참고 사항 CPython 업그레이드 배포판 아카이브 전체 아카이브 설치 전용 아카이브 프로젝트 상태 대상 참고 사항 테스트 실패 테스트 건너뜀 색인 및 테이블 ¶ 색인 검색 페이지 python-build-standalone 내비게이션 목차: 배포판 실행, 빌드, 동작 특이사항, 기술 정보, 배포판 아카이브, 프로젝트 상태 관련 주제 문서 개요 다음: 배포판 실행 빠른 검색 ©2020, Gregory Szorc. | Powered by Sphinx 5.0.2 & Alabaster 0.7.12 | 페이지 소스

원문 보기
원문 보기 (영어)
Python Standalone Builds ¶ This project produces self-contained, highly-portable Python distributions. These Python distributions contain a fully-usable, full-featured Python installation: most extension modules from the Python standard library are present and their library dependencies are either distributed with the distribution or are statically linked. The Python distributions are built in a manner to minimize run-time dependencies. This includes limiting the CPU instructions that can be used and limiting the set of shared libraries required at run-time. The goal is for the produced distribution to work on any system for the targeted architecture. Some distributions ship with their build artifacts (object files, libraries, etc) along with rich metadata describing the distribution and how it was assembled. The build artifacts can be recombined by downstream repackagers to derive a custom Python distribution, possibly without certain features like SQLite and OpenSSL. This is useful for embedding Python in a larger binary. See the PyOxidizer sister project for such a downstream repackager. Many users of these distributions might be better served by the PyOxy sister project. PyOxy takes these Python distributions and adds some Rust code for enhancing the functionality of the Python interpreter. The official PyOxy release binaries are single file executables providing a full-featured Python interpreter. Contents: Running Distributions Obtaining Distributions Extracting Distributions Runtime Requirements Extra Python Software Licensing Reconsuming Build Artifacts Building Linux macOS Windows Behavior Quirks If special keys do not work in the Python REPL No tix on UNIX No pip.exe on Windows Linking Static Library on macOS Use of libedit on Linux References to Build-Time Paths Former quirks Technical Notes How It Works Setup.local Hackery Dependency Notes Upgrading CPython Distribution Archives Full Archive Install Only Archive Project Status Target Notes Test Failures Test Skips Indices and tables ¶ Index Search Page python-build-standalone Navigation Contents: Running Distributions Building Behavior Quirks Technical Notes Distribution Archives Project Status Related Topics Documentation overview Next: Running Distributions Quick search ©2020, Gregory Szorc. | Powered by Sphinx 5.0.2 & Alabaster 0.7.12 | Page source