setuptools plugin to download external files
Project description
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 fromsha256
(required): checksum of the downloaded filegroup
+marker
(optional or required together)group
: a name for a mutually exclusive groupmarker
: a PEP 508 marker expression (can be specified multiple times)- only supports:
os_name
,sys_platform
,platform_machine
- only supports:
extract
+extract_path
(optional or required together)extract
: how to extract the downloaded file (zip
ortar
)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
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Close
Hashes for setuptools_download-1.0.0.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | d1998da845ad9952c74cd39b10f061cd21139759498133c42e28badc68d02590 |
|
MD5 | 16220703e45f9832d0a6eff186f52769 |
|
BLAKE2b-256 | 075a9a927d73e2272a69526330d22128c5e5b7459731bdf9548876e2f9d92054 |
Close
Hashes for setuptools_download-1.0.0-py2.py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 16c643fe33477dd6e83d17a27e2b885e8eb9e0aeadf27ca025db770c2b31ddb5 |
|
MD5 | 5e3a68b0cc47d0a604ccaf32a0f02055 |
|
BLAKE2b-256 | 70a1f50d4720ada835a4c2d8d796797f77b01543528192ca1ca88d9e49099880 |