Skip to main content

Fetch selected part of cpython source repository.

Project description

Fetch selected part of cpython source repository.

This project is part of phy.

Install

pip install fetch-cpy-src

List the files to be fetched

Make a manifest toml file with scheme like the following example:

# git repo tag
tag = "3.12"


# Specify items of source to fetch.

# This is a demo item specification for fetch single file of source repo.
#
# There are two REQUIRED fields:
# `path`: path of the file to be fetched;
# `type`: set to "file" for fetching single file.
[[items]]
path = 'Parser/asdl_c.py'
type = 'file'

# `rename` is OPTIONAL. Specifying this field can rename fetched file or move to 
# another directory.
rename = 'asdl_c.py'

# The `xxx_adapters` are OPTIONAL fields. Adapters will make pre-defined modification
# to fetched source files. 
#
#  + `file_adapters` will apply modification to fetch file (if type = 'file') or 
#    any files within fetched directory (if type = 'dir').
#  + `dir_adapters` will apply modification to the directory of the fetched file 
#    (if type = 'file') or the fetched directory (if type = 'dir').
# 
# In this example, 
#  + `TopLevelScriptImportAdapter` will refactor the fetched python script file to 
#    importable submodules.
#  + `AddDunderInitAdapter` will put an empty `__init__.py` at fetched directory, 
#    and thus make it a package.
file_adapters = ['TopLevelScriptImportAdapter']
dir_adapters = ['AddDunderInitAdapter']


# This is a demo item specification for fetch sub-directory of source repo.
# `path`: path of the directory to be fetched;
# `type`: set to "dir" for fetching entire sub-directory.
[[items]]
path = 'Grammar/'
type = 'dir'

Fetch files

Supposing the manifest file is demo.toml, fetch the files within the manifest by this command:

fetch-cpy-src fetch demo.toml

The full manual of the fetch-cpy-src command:

Usage: fetch-cpy-src [OPTIONS] COMMAND [ARGS]...

  group all sub commands

Options:
  --help  Show this message and exit.

Commands:
  fetch         Fetch files listed in manifest to destinition directory.
  new-manifest  Create a new manifest of cpython source files to be fetched.

API docs

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

fetch_cpy_src-0.1.2.tar.gz (8.4 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

fetch_cpy_src-0.1.2-py3-none-any.whl (11.1 kB view details)

Uploaded Python 3

File details

Details for the file fetch_cpy_src-0.1.2.tar.gz.

File metadata

  • Download URL: fetch_cpy_src-0.1.2.tar.gz
  • Upload date:
  • Size: 8.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for fetch_cpy_src-0.1.2.tar.gz
Algorithm Hash digest
SHA256 d78e82b371d47a978dc535407a05b89ba915ff149cff213363dbe7c518074af6
MD5 10b64e3291dd1b7e2f7a36fe4e325c13
BLAKE2b-256 55395f9d7dc7f23ea5182b2e897d0be8f834c3853f49cebc13da94292784f4d7

See more details on using hashes here.

Provenance

The following attestation bundles were made for fetch_cpy_src-0.1.2.tar.gz:

Publisher: python-publish.yml on phy-precompiler/fetch-cpy-src

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file fetch_cpy_src-0.1.2-py3-none-any.whl.

File metadata

  • Download URL: fetch_cpy_src-0.1.2-py3-none-any.whl
  • Upload date:
  • Size: 11.1 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for fetch_cpy_src-0.1.2-py3-none-any.whl
Algorithm Hash digest
SHA256 329e6d5885e3c5f27e9722cb42c508fa9ab7f08cc3e770cc8e3a2fec41d90d1a
MD5 a20111541972ed1ea8e4e87ca790eab9
BLAKE2b-256 5d25ccb8e016dc3868c23e91536fa863b7bd19ec4303d8f610bf639f520ac834

See more details on using hashes here.

Provenance

The following attestation bundles were made for fetch_cpy_src-0.1.2-py3-none-any.whl:

Publisher: python-publish.yml on phy-precompiler/fetch-cpy-src

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page