{"id":13468649,"url":"https://github.com/linkedin/shiv","last_synced_at":"2025-05-13T17:09:02.402Z","repository":{"id":31967514,"uuid":"125098989","full_name":"linkedin/shiv","owner":"linkedin","description":"shiv is a command line utility for building fully self contained Python zipapps as outlined in PEP 441, but with all their dependencies included.","archived":false,"fork":false,"pushed_at":"2024-11-04T23:35:07.000Z","size":287,"stargazers_count":1826,"open_issues_count":64,"forks_count":104,"subscribers_count":27,"default_branch":"main","last_synced_at":"2025-04-24T01:53:17.091Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"bsd-2-clause","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/linkedin.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2018-03-13T18:46:23.000Z","updated_at":"2025-04-22T11:47:19.000Z","dependencies_parsed_at":"2023-01-14T20:13:29.631Z","dependency_job_id":"3c8ec637-4607-4220-ac5f-92386a616b86","html_url":"https://github.com/linkedin/shiv","commit_stats":{"total_commits":192,"total_committers":41,"mean_commits":4.682926829268292,"dds":0.5,"last_synced_commit":"eeec71f31a08203cffd184602eb6d10e30634126"},"previous_names":[],"tags_count":23,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/linkedin%2Fshiv","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/linkedin%2Fshiv/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/linkedin%2Fshiv/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/linkedin%2Fshiv/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/linkedin","download_url":"https://codeload.github.com/linkedin/shiv/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":253990468,"owners_count":21995774,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-07-31T15:01:15.706Z","updated_at":"2025-05-13T17:08:57.392Z","avatar_url":"https://github.com/linkedin.png","language":"Python","readme":"[![pypi](https://img.shields.io/pypi/v/shiv.svg)](https://pypi.python.org/pypi/shiv)\n[![ci](https://github.com/linkedin/shiv/workflows/ci/badge.svg)](https://github.com/linkedin/shiv/actions?query=workflow%3Aci)\n[![codecov](https://codecov.io/gh/linkedin/shiv/branch/master/graph/badge.svg)](https://codecov.io/gh/linkedin/shiv)\n[![docs](https://readthedocs.org/projects/shiv/badge/?version=latest)](http://shiv.readthedocs.io/en/latest/?badge=latest)\n[![license](https://img.shields.io/badge/License-BSD%202--Clause-orange.svg)](https://opensource.org/licenses/BSD-2-Clause)\n[![supported](https://img.shields.io/pypi/pyversions/shiv.svg)](https://pypi.python.org/pypi/shiv)\n\n![snake](https://github.com/linkedin/shiv/raw/main/logo.png)\n\n# shiv\nshiv is a command line utility for building fully self-contained Python zipapps as outlined in [PEP 441](https://www.python.org/dev/peps/pep-0441/), but with all their dependencies included!\n\nshiv's primary goal is making distributing Python applications fast \u0026 easy.\n\n📗 Full documentation can be found [here](http://shiv.readthedocs.io/en/latest/).\n\n### System Requirements\n\n- Python \u003e= 3.8\n- linux/osx/windows\n\n### quickstart\n\nshiv has a few command line options of its own and accepts almost all options passable to `pip install`.\n\n##### simple cli example\n\nCreating an executable of flake8 with shiv:\n\n```sh\n$ shiv -c flake8 -o ~/bin/flake8 flake8\n$ ~/bin/flake8 --version\n3.7.8 (mccabe: 0.6.1, pycodestyle: 2.5.0, pyflakes: 2.1.1) CPython 3.7.4 on Darwin\n```\n\n`-c flake8` specifies the console script that should be invoked when the executable runs, `-o ~/bin/flake8` specifies the location of the generated executable file and `flake8` is the dependency that should be installed from PyPI.\n\nCreating an interactive executable with the boto library:\n\n```sh\n$ shiv -o boto.pyz boto\nCollecting boto\nInstalling collected packages: boto\nSuccessfully installed boto-2.49.0\n$ ./boto.pyz\nPython 3.7.4 (v3.7.4:e09359112e, Jul  8 2019, 14:54:52)\n[Clang 6.0 (clang-600.0.57)] on darwin\nType \"help\", \"copyright\", \"credits\" or \"license\" for more information.\n(InteractiveConsole)\n\u003e\u003e\u003e import boto\n\u003e\u003e\u003e boto.__version__\n'2.49.0'\n```\n\n### installing\n\nYou can install shiv by simply downloading a release from https://github.com/linkedin/shiv/releases or via `pip` / `pypi`:\n\n```sh\npip install shiv\n```\n\nYou can even create a pyz _of_ shiv _using_ shiv!\n\n```sh\npython3 -m venv .\nsource bin/activate\npip install shiv\nshiv -c shiv -o shiv shiv\n```\n\n### developing\n\nWe'd love contributions! Getting bootstrapped to develop is easy:\n\n```sh\ngit clone git@github.com:linkedin/shiv.git\ncd shiv\npython3 -m venv venv\nsource ./venv/bin/activate\npython3 -m pip install --upgrade build\npython3 -m build\npython3 -m pip install -e .\n```\n\nDon't forget to run and write tests:\n\n```sh\npython3 -m pip install tox\ntox\n```\n\nTo build documentation when you changed something in `docs`:\n\n```sh\npython3 -m pip install -r docs/requirements.txt\nsphinx-build docs build/html\n```\n\n### gotchas\n\nZipapps created with shiv are not guaranteed to be cross-compatible with other architectures. For example, a `pyz`\n file built on a Mac may only work on other Macs, likewise for RHEL, etc. This usually only applies to zipapps that have C extensions in their dependencies. If all your dependencies are pure python, then chances are the `pyz` _will_ work on other platforms. Just something to be aware of.\n\nZipapps created with shiv *will* extract themselves into `~/.shiv`, unless overridden via\n`SHIV_ROOT`. If you create many utilities with shiv, you may want to occasionally clean this\ndirectory.\n\n---\n\n### acknowledgements\n\nSimilar projects:\n\n* [PEX](https://github.com/pantsbuild/pex)\n* [pyzzer](https://pypi.org/project/pyzzer/#description)\n* [superzippy](https://github.com/brownhead/superzippy)\n\nLogo by Juliette Carvalho\n","funding_links":[],"categories":["Development Tools","Python","资源列表","Code Packaging","分发","Distribution","分布","Distribution [🔝](#readme)","Miscellaneous"],"sub_categories":["分发"],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flinkedin%2Fshiv","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Flinkedin%2Fshiv","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flinkedin%2Fshiv/lists"}