uv-pack 0.0.1__py3-none-any.whl → 0.1.0__py3-none-any.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1,206 @@
1
+ Metadata-Version: 2.3
2
+ Name: uv-pack
3
+ Version: 0.1.0
4
+ Summary: Pack you uv environment for offline usage.
5
+ Author: David Muhr
6
+ Author-email: David Muhr <muhrdavid+github@gmail.com>
7
+ Classifier: Development Status :: 3 - Alpha
8
+ Classifier: License :: OSI Approved :: MIT License
9
+ Classifier: Topic :: Software Development :: Libraries
10
+ Classifier: Topic :: Scientific/Engineering
11
+ Classifier: Topic :: Utilities
12
+ Classifier: Intended Audience :: Developers
13
+ Classifier: Intended Audience :: Science/Research
14
+ Classifier: Intended Audience :: Education
15
+ Classifier: Programming Language :: Python :: 3.10
16
+ Classifier: Programming Language :: Python :: 3.11
17
+ Classifier: Programming Language :: Python :: 3.12
18
+ Classifier: Programming Language :: Python :: 3.13
19
+ Classifier: Programming Language :: Python :: 3 :: Only
20
+ Classifier: Operating System :: Microsoft :: Windows
21
+ Classifier: Operating System :: POSIX
22
+ Classifier: Operating System :: Unix
23
+ Classifier: Operating System :: MacOS
24
+ Classifier: Typing :: Typed
25
+ Requires-Dist: packaging>=24.0
26
+ Requires-Dist: requests>=2
27
+ Requires-Dist: typer>=0.19
28
+ Requires-Python: >=3.10
29
+ Description-Content-Type: text/markdown
30
+
31
+ uv-pack
32
+ =======
33
+
34
+ [![Check Status](https://github.com/davnn/uv-pack/actions/workflows/check.yml/badge.svg)](https://github.com/davnn/uv-pack/actions?query=workflow%3Acheck)
35
+ [![Semantic Versions](https://img.shields.io/badge/%20%20%F0%9F%93%A6%F0%9F%9A%80-semantic--versions-e10079.svg)](https://github.com/davnn/uv-pack/releases)
36
+
37
+ Bundle a locked `uv` environment into a self-contained, offline-installable directory.
38
+ The output includes pinned requirements, third-party wheels, locally built wheels,
39
+ and a portable Python interpreter.
40
+
41
+ What it does
42
+ ------------
43
+ - Exports locked requirements from your `uv` lock file.
44
+ - Downloads third-party wheels into `pack/wheels/`.
45
+ - Builds local workspace packages into `pack/vendor/`.
46
+ - Downloads a python-build-standalone archive into `pack/python/` (unless you skip the `python` step).
47
+ - Writes `unpack.sh`, `unpack.ps1`, and `unpack.cmd` to unpack the resulting venv offline.
48
+
49
+ Install
50
+ -------
51
+
52
+ Install `uv-pack` as a dev-dependency.
53
+
54
+ ```bash
55
+ uv add --dev uv-pack
56
+ ```
57
+
58
+ Once installed, run using:
59
+
60
+ ```bash
61
+ uv run uv-pack --help
62
+ ```
63
+
64
+ You can also use ``uv-pack`` as a tool.
65
+
66
+ ```bash
67
+ # specify the python version!
68
+ uv tool run --python 3.12 uv-pack --help
69
+ # or using uvx (equivalent)
70
+ uvx --python 3.12 uv-pack --help
71
+ ```
72
+
73
+ CLI
74
+ ---
75
+
76
+ ```bash
77
+ uv-pack [STEPS...]
78
+ ```
79
+
80
+ Options:
81
+ - `STEPS`: subset of pipeline steps (default: `clean export download build python`)
82
+ - `-s, --skip`: skip a pipeline step (can be supplied multiple times)
83
+ - `-o, --output-directory`: path to output directory (default: `./pack`)
84
+ - `-v, --verbose`: show more detailed pack progress logging
85
+ - `--uv-build`: extra args passed to `uv build`
86
+ - `--uv-export`: extra args passed to `uv export`
87
+ - `--pip-download`: extra args passed to `pip download`
88
+
89
+ Notes:
90
+ - The CLI is structured into five pipeline steps, see description below.
91
+ - Extra args are split on whitespace (for example: `--uv-export "--dev --all-extras"`).
92
+
93
+ Pipeline steps:
94
+ - `clean`: remove the output directory
95
+ - `export`: write `requirements.txt` files for third-party and local packages
96
+ - `download`: download third-party wheels
97
+ - `build`: build local wheels and compile the combined requirements file
98
+ - `python`: download a python-build-standalone archive for the current Python version and platform
99
+
100
+ Example
101
+ -------
102
+ ```bash
103
+ # run the entire pipeline (default) with verbose outputs
104
+ uv-pack --verbose
105
+ # only clean and export the requirements
106
+ uv-pack clean export
107
+ ```
108
+
109
+ Output layout
110
+ -------------
111
+ ```
112
+ pack/
113
+ requirements.txt
114
+ wheels/
115
+ requirements.txt
116
+ vendor/
117
+ requirements.txt
118
+ python/ # (omitted when the python step is skipped)
119
+ unpack.sh
120
+ unpack.ps1
121
+ unpack.cmd
122
+ .gitignore
123
+ README.md
124
+ ```
125
+
126
+ Unpack and install offline
127
+ --------------------------
128
+
129
+ POSIX (sh/bash/zsh):
130
+
131
+ ```bash
132
+ ./pack/unpack.sh
133
+ ```
134
+
135
+ PowerShell:
136
+
137
+ ```powershell
138
+ .\pack\unpack.ps1
139
+ ```
140
+
141
+ Windows cmd:
142
+
143
+ ```cmd
144
+ .\pack\unpack.cmd
145
+ ```
146
+
147
+ All scripts also accept `VENV_DIR`, `PY_DEST` and `BASE_PY` environment variables.
148
+ Use `BASE_PY` when you skipped the `python` step during packing to provide a system
149
+ python interpreter. `VENV_DIR` (default = `.venv`) and `PY_DEST` (default = `.python`)
150
+ can be used to customize the target python and venv directory.
151
+
152
+ Configuration
153
+ -------------
154
+
155
+ `UV_PYTHON_INSTALL_MIRROR` can override the GitHub API endpoint to retrieve the
156
+ Python releases, default is:
157
+ <https://api.github.com/repos/astral-sh/python-build-standalone/releases/latest>.
158
+
159
+ `GITHUB_TOKEN` can be used to authenticate requests to the GitHub API to
160
+ prevent possible rate-limiting.
161
+
162
+ Limitations
163
+ -----------
164
+
165
+ - The pack process must happen in the ``pyproject.toml`` or ``uv.toml`` directory, typically the repository root,
166
+ because ``uv`` exports relative paths to the project root.
167
+ - The build platform is expected to equal the usage platform; it is currently not possible to pack an environment
168
+ for a different platform.
169
+ - The project Python version is ignored when running `uv-pack` as a tool (`uv tool run` or `uvx`) and should be
170
+ specified using `uv tool run --python 3.11 uv-pack` or `uvx --python 3.11 uv-pack`, see
171
+ [uv#uv5951](https://github.com/astral-sh/uv/issues/5951) and [uv#8206](https://github.com/astral-sh/uv/issues/8206).
172
+ - The download process can be slow because ``pip download`` is used as there is no native (parallel) uv download
173
+ option available for wheels, see [uv#3163](https://github.com/astral-sh/uv/issues/3163).
174
+
175
+ FAQ
176
+ -----------
177
+
178
+ #### How do I pass extra options to `uv export` or another command?
179
+
180
+ Use `--uv-export` to forward arguments, for example:
181
+
182
+ - ``uv-pack --uv-export "--package $MY_PACKAGE"`` to export only a specific workspace package
183
+ - ``uv-pack --uv-export "--locked --dev"`` to include dev-deps and ensure an up-to-date lock file
184
+ - ``uv-pack --uv-export "--all-extras"`` to include all extra dependencies
185
+
186
+ The same is true for ``--uv-build`` and ``--pip-download`` arguments.
187
+
188
+ #### How do I specify index-urls and extra-index-urls?
189
+
190
+ The index urls set in ``pyproject.toml`` and ``uv.toml`` are not configured by default for the wheel
191
+ download (``pip download``), you can specify them as:
192
+
193
+ - ``uv-pack --pip-download "--index-url $MY_INDEX --extra-index-url $MY_EXTRA_INDEX"``
194
+
195
+ #### How do I skip bundling Python?
196
+
197
+ Skip the `python` step: ``uv-pack --skip python``. When unpacking, set `BASE_PY` to a system Python path.
198
+
199
+ #### How do I rerun without deleting the existing pack directory?
200
+
201
+ Skip the `clean` step: ``uv-pack --skip clean``. Note that this automatically re-uses downloaded wheels
202
+ and the downloaded Python interpreter.
203
+
204
+ #### How do I only re-build my package if my pack is already complete?
205
+
206
+ Run only ``uv-pack build``.
@@ -0,0 +1,19 @@
1
+ uv_pack/__init__.py,sha256=UlBfhHcK1dwn-0NAlJNTef5fFyU7VpFyRIedVA7SF_4,8576
2
+ uv_pack/_build.py,sha256=m6_9JwGWNHA-6zO41Y3CKH5hlUtNBd4WPWOcHSVH2s8,1141
3
+ uv_pack/_download.py,sha256=MDo_O6bhYqAyZNCZI28AcO6T-OZkpaD9wDVkJLQD7dU,1158
4
+ uv_pack/_export.py,sha256=eFLKqUlGOCiG7Z9LUXar1VadXdBGDkxA0to7MMrMpIs,1089
5
+ uv_pack/_files.py,sha256=uhvNW2RLUVVwE7J6LywwlkOHD4TQ3h_vpqvoN59mA2E,1616
6
+ uv_pack/_logging.py,sha256=doIGYthDfOGwqTzCX1ckJnscGR3ZaL8QLy0hgdx8EO0,1066
7
+ uv_pack/_process.py,sha256=qPNQki1Pgu2vLaRsRzXpYmriwghep7HlfI0T5ykX6nY,1928
8
+ uv_pack/_python.py,sha256=KcRQMKwXufNcwS5pY7odcbtK_UihD_CymG5djilBJaE,5577
9
+ uv_pack/_scripts.py,sha256=ObuGoWZwYofgIigXAXF8E4jaqcsuX9nDeGFczRFiOr8,1054
10
+ uv_pack/py.typed,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
11
+ uv_pack/scripts/README.md,sha256=fFmzFOExIEt0NERw1rBvsi_ur1qT3I-cVCxOBTO_rrQ,1550
12
+ uv_pack/scripts/SPEC.md,sha256=_U31gEyPEZLfrO0u4POqdJLwgAFVzsh80bFd0hXESLU,1724
13
+ uv_pack/scripts/unpack.cmd,sha256=bzxdyYPSN6hEQfVyg0BHJFvMiEvQe7HtGH9GPQOQSVQ,1865
14
+ uv_pack/scripts/unpack.ps1,sha256=ygQkxsIhUfum8uX3LrjAIclfi91IN98jzU-LYEyVgOA,2150
15
+ uv_pack/scripts/unpack.sh,sha256=1cDrzcSJeEnbFM_ZLkNnrWsfBNLRtVYIAC8yiXxFLEg,1751
16
+ uv_pack-0.1.0.dist-info/WHEEL,sha256=fAguSjoiATBe7TNBkJwOjyL1Tt4wwiaQGtNtjRPNMQA,80
17
+ uv_pack-0.1.0.dist-info/entry_points.txt,sha256=vNW2L3ycXru1h_bHFxCKTtzswejxRk6UjhAd26vRLoM,42
18
+ uv_pack-0.1.0.dist-info/METADATA,sha256=lZduc3QN68n23VyfnVkMWwQgCsVC1tMXnn1DngbdwB0,6769
19
+ uv_pack-0.1.0.dist-info/RECORD,,
@@ -1,4 +1,4 @@
1
1
  Wheel-Version: 1.0
2
- Generator: uv 0.9.26
2
+ Generator: uv 0.9.28
3
3
  Root-Is-Purelib: true
4
4
  Tag: py3-none-any
@@ -1,140 +0,0 @@
1
- Metadata-Version: 2.3
2
- Name: uv-pack
3
- Version: 0.0.1
4
- Summary: Pack you uv environment for offline usage.
5
- Author: David Muhr
6
- Author-email: David Muhr <muhrdavid+github@gmail.com>
7
- Classifier: Development Status :: 3 - Alpha
8
- Classifier: License :: OSI Approved :: MIT License
9
- Classifier: Topic :: Software Development :: Libraries
10
- Classifier: Topic :: Scientific/Engineering
11
- Classifier: Topic :: Utilities
12
- Classifier: Intended Audience :: Developers
13
- Classifier: Intended Audience :: Science/Research
14
- Classifier: Intended Audience :: Education
15
- Classifier: Programming Language :: Python :: 3.10
16
- Classifier: Programming Language :: Python :: 3.11
17
- Classifier: Programming Language :: Python :: 3.12
18
- Classifier: Programming Language :: Python :: 3.13
19
- Classifier: Programming Language :: Python :: 3 :: Only
20
- Classifier: Operating System :: Microsoft :: Windows
21
- Classifier: Operating System :: POSIX
22
- Classifier: Operating System :: Unix
23
- Classifier: Operating System :: MacOS
24
- Classifier: Typing :: Typed
25
- Requires-Dist: packaging>=26.0
26
- Requires-Dist: requests>=2.32.5
27
- Requires-Dist: typer>=0.21.1
28
- Requires-Python: >=3.10
29
- Description-Content-Type: text/markdown
30
-
31
- uv-pack
32
- =======
33
-
34
- [![Check Status](https://github.com/davnn/uv-pack/actions/workflows/check.yml/badge.svg)](https://github.com/davnn/uv-pack/actions?query=workflow%3Acheck)
35
- [![Semantic Versions](https://img.shields.io/badge/%20%20%F0%9F%93%A6%F0%9F%9A%80-semantic--versions-e10079.svg)](https://github.com/davnn/uv-pack/releases)
36
-
37
- Bundle a locked `uv` environment into a self-contained, offline-installable directory.
38
- The output includes pinned requirements, third-party wheels, locally built wheels,
39
- and a portable Python interpreter.
40
-
41
- What it does
42
- ------------
43
- - Exports a `requirements.txt` from your `uv` lock file.
44
- - Downloads third-party wheels into `pack/wheels/`.
45
- - Builds local workspace packages into `pack/vendor/`.
46
- - Downloads a python-build-standalone archive into `pack/python/` (unless `--system`).
47
- - Writes `unpack.sh`, `unpack.ps1`, and `unpack.cmd` to unpack the resulting venv offline.
48
-
49
- Install
50
- -------
51
-
52
- Install `uv-pack` as a dev-dependency or as a uv tool.
53
-
54
- ```bash
55
- uv add --dev uv-pack
56
- # or install as a tool
57
- uv tool install uv-pack
58
- ```
59
-
60
- Once installed, run using:
61
-
62
- ```bash
63
- uv run uv-pack --help
64
- # or as a tool
65
- uv tool run uv-pack --help
66
- # or using uvx (equivalent)
67
- uvx uv-pack --help
68
- ```
69
-
70
- CLI
71
- ---
72
-
73
- ```bash
74
- uv-pack [OUTPUT_DIRECTORY (default = ./pack)]
75
- ```
76
-
77
- Options:
78
- - `--uv-export`: extra args passed to `uv export`
79
- - `--pip-download`: extra args passed to `pip download`
80
- - `--uv-build-sdist`: extra args passed to `uv build` for downloaded sdists
81
- - `--uv-build-pkg`: extra args passed to `uv build` for local packages
82
- - `--no-clean`: keep the output directory instead of wiping
83
- - `--include-dev`: include dev dependencies
84
- - `--system`: skip bundling Python; require `BASE_PY` at unpack time
85
-
86
- Example
87
- -------
88
- ```bash
89
- uv-pack --include-dev
90
- ```
91
-
92
- Output layout
93
- -------------
94
- ```
95
- pack/
96
- requirements.txt
97
- wheels/
98
- vendor/
99
- python/ # (omitted with --system)
100
- unpack.sh
101
- unpack.ps1
102
- unpack.cmd
103
- README.md
104
- ```
105
-
106
- Unpack and install offline
107
- --------------------------
108
-
109
- POSIX (sh/bash/zsh):
110
-
111
- ```bash
112
- ./pack/unpack.sh
113
- ```
114
-
115
- PowerShell:
116
-
117
- ```powershell
118
- .\pack\unpack.ps1
119
- ```
120
-
121
- Windows cmd:
122
-
123
- ```cmd
124
- .\pack\unpack.cmd
125
- ```
126
-
127
- All scripts also accept `VENV_DIR`, `PY_DEST` and `BASE_PY` environment variables.
128
- Use `BASE_PY` when `--system` was used during packing to provide a system
129
- python interpreter. `VENV_DIR` (default = `.venv`) and `PY_DEST` (default = `.python`)
130
- can be used to customize the target python and venv diretory.
131
-
132
- Configuration
133
- -------------
134
-
135
- `UV_PYTHON_INSTALL_MIRROR` can override the GitHub API endpoint to retrieve the
136
- Python releases, default is:
137
- <https://api.github.com/repos/astral-sh/python-build-standalone/releases/latest>.
138
-
139
- `GITHUB_TOKEN` can be used to authenticate the request to the GitHub API to
140
- prevent possible rate-limiting.
@@ -1,14 +0,0 @@
1
- uv_pack/__init__.py,sha256=OUGwExvybYq3ZdHgo50pu5QujQXB_ShOES6zsWn-Gr4,9264
2
- uv_pack/_download.py,sha256=_1W0Dp-7iH6vBUW6drwlUH7cGVMIAz2W6OFDj5dBoZY,4497
3
- uv_pack/_process.py,sha256=AJPbEPjBXpMOiP7VvNB7xxjhiPJDt1GREIeC_gjKQx4,1536
4
- uv_pack/_unpack.py,sha256=2n7gZnMwCqHKadrPR2EWQWNUjAROuIrl-FU9EoHWBf8,1024
5
- uv_pack/py.typed,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
6
- uv_pack/scripts/README.md,sha256=fFmzFOExIEt0NERw1rBvsi_ur1qT3I-cVCxOBTO_rrQ,1550
7
- uv_pack/scripts/SPEC.md,sha256=_U31gEyPEZLfrO0u4POqdJLwgAFVzsh80bFd0hXESLU,1724
8
- uv_pack/scripts/unpack.cmd,sha256=bzxdyYPSN6hEQfVyg0BHJFvMiEvQe7HtGH9GPQOQSVQ,1865
9
- uv_pack/scripts/unpack.ps1,sha256=ygQkxsIhUfum8uX3LrjAIclfi91IN98jzU-LYEyVgOA,2150
10
- uv_pack/scripts/unpack.sh,sha256=1cDrzcSJeEnbFM_ZLkNnrWsfBNLRtVYIAC8yiXxFLEg,1751
11
- uv_pack-0.0.1.dist-info/WHEEL,sha256=XV0cjMrO7zXhVAIyyc8aFf1VjZ33Fen4IiJk5zFlC3g,80
12
- uv_pack-0.0.1.dist-info/entry_points.txt,sha256=vNW2L3ycXru1h_bHFxCKTtzswejxRk6UjhAd26vRLoM,42
13
- uv_pack-0.0.1.dist-info/METADATA,sha256=WbYGo7B0p3n7cLLyDCYpVBN5sn4S84Id63D2tENL1fc,3922
14
- uv_pack-0.0.1.dist-info/RECORD,,