Skip to main content

setuptools plugin to download external files

Project description

build status pre-commit.ci status

setuptools-download

setuptools plugin to download external files

usage

this plugin is intended to be used through setuptools declarative metadata:

the value of download_* is an ini-like string with the section being the filename.

file settings

  • url (required): url to download the file from
  • sha256 (required): checksum of the downloaded file
  • group + marker (optional or required together)
    • group: a name for a mutually exclusive group
    • marker: a PEP 508 marker expression (can be specified multiple times)
      • only supports: os_name, sys_platform, platform_machine
  • extract + extract_path (optional or required together)
    • extract: how to extract the downloaded file (zip or tar)
    • extract_path: path to extract from archive

example

[options]
setup_requires = setuptools-download

[setuptools_download]
download_data_files =
    [share/example/data.txt]
    url = https://example.com/data.txt
    sha256 = aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
    [share/example/embedded]
    url = https://example.com/release-1.0.tar.gz
    sha256 = bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb
    extract = tar
    extract_path = release-v1.0/share/example/embedded
download_scripts =
    [example-tool]
    group = example-tool-binary
    marker = sys_platform = "linux" and platform_machine = "x86_64"
    url = https://example.com/example-tool-linux-x86-64
    sha256 = ccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc
    [example-tool]
    group = example-tool-binary
    marker = sys_platform = "darwin" and platform_machine = "x86_64"
    marker = sys_platform = "darwin" and platform_machine = "arm64"
    url = https://example.com/example-tool-darwin-x86-64
    sha256 = ddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddd
    [example-tool.exe]
    group = example-tool-binary
    marker = sys_platform = "win32" and platform_machine = "AMD64"
    url = https://example.com/example-tool-win32.exe
    sha256 = eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee

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

setuptools_download-1.0.1.tar.gz (5.8 kB view details)

Uploaded Source

Built Distribution

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

setuptools_download-1.0.1-py2.py3-none-any.whl (6.3 kB view details)

Uploaded Python 2Python 3

File details

Details for the file setuptools_download-1.0.1.tar.gz.

File metadata

  • Download URL: setuptools_download-1.0.1.tar.gz
  • Upload date:
  • Size: 5.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.10.12

File hashes

Hashes for setuptools_download-1.0.1.tar.gz
Algorithm Hash digest
SHA256 2052b9fdd5f27fa0495e87b862afd67dcd29879dcafc491eba398c017f906073
MD5 e450408d00ff87aea6e485789b7f8f7b
BLAKE2b-256 fa96b36633aa5bda615a6e3987d677a77e09c39f4302d819122282a3987534b1

See more details on using hashes here.

File details

Details for the file setuptools_download-1.0.1-py2.py3-none-any.whl.

File metadata

File hashes

Hashes for setuptools_download-1.0.1-py2.py3-none-any.whl
Algorithm Hash digest
SHA256 2ac4d9789765070f9be838ac7accae111a597356f5b88196ab6cd6cfbc543c42
MD5 61794af170f85bd8ad357138ff297dcd
BLAKE2b-256 e8171a8c243f5fed42610ebaa11e1f8540eb3171e7e37bf4fd6232cefe2ea723

See more details on using hashes here.

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