uv-pack 0.0.1__py3-none-any.whl → 0.1.1__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,210 @@
1
+ Metadata-Version: 2.3
2
+ Name: uv-pack
3
+ Version: 0.1.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 :: Utilities
11
+ Classifier: Intended Audience :: Developers
12
+ Classifier: Intended Audience :: Science/Research
13
+ Classifier: Intended Audience :: Education
14
+ Classifier: Programming Language :: Python :: 3.10
15
+ Classifier: Programming Language :: Python :: 3.11
16
+ Classifier: Programming Language :: Python :: 3.12
17
+ Classifier: Programming Language :: Python :: 3.13
18
+ Classifier: Programming Language :: Python :: 3 :: Only
19
+ Classifier: Operating System :: Microsoft :: Windows
20
+ Classifier: Operating System :: POSIX
21
+ Classifier: Operating System :: Unix
22
+ Classifier: Operating System :: MacOS
23
+ Classifier: Typing :: Typed
24
+ Requires-Dist: packaging>=24.0
25
+ Requires-Dist: requests>=2
26
+ Requires-Dist: typer>=0.19
27
+ Requires-Python: >=3.10
28
+ Project-URL: source, https://github.com/davnn/uv-pack
29
+ Project-URL: tracker, https://github.com/davnn/uv-pack/issues
30
+ Project-URL: release notes, https://github.com/davnn/uv-pack/releases
31
+ Description-Content-Type: text/markdown
32
+
33
+ uv-pack
34
+ =======
35
+
36
+ [![Check Status](https://github.com/davnn/uv-pack/actions/workflows/check.yml/badge.svg)](https://github.com/davnn/uv-pack/actions?query=workflow%3Acheck)
37
+ [![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)
38
+
39
+ Bundle a locked `uv` environment into a self-contained, offline-installable directory.
40
+ The output includes pinned requirements, third-party wheels, locally built wheels,
41
+ and a portable Python interpreter.
42
+
43
+ What it does
44
+ ------------
45
+ - Exports locked requirements from your `uv` lock file.
46
+ - Downloads third-party wheels into `pack/wheels/`.
47
+ - Builds local workspace packages into `pack/vendor/`.
48
+ - Downloads a python-build-standalone archive into `pack/python/` (unless you skip the `python` step).
49
+ - Writes `unpack.sh`, `unpack.ps1`, and `unpack.cmd` to unpack the resulting venv offline.
50
+
51
+ Install
52
+ -------
53
+
54
+ Install `uv-pack` as a dev-dependency.
55
+
56
+ ```bash
57
+ uv add --dev uv-pack
58
+ ```
59
+
60
+ Once installed, run using:
61
+
62
+ ```bash
63
+ uv run uv-pack --help
64
+ ```
65
+
66
+ You can also use ``uv-pack`` as a tool.
67
+
68
+ ```bash
69
+ # specify the python version!
70
+ uv tool run --python 3.12 uv-pack --help
71
+ # or using uvx (equivalent)
72
+ uvx --python 3.12 uv-pack --help
73
+ ```
74
+
75
+ CLI
76
+ ---
77
+
78
+ ```bash
79
+ uv-pack [STEPS...]
80
+ ```
81
+
82
+ Options:
83
+ - `STEPS`: subset of pipeline steps (default: `clean export download build python`)
84
+ - `-s, --skip`: skip a pipeline step (can be supplied multiple times)
85
+ - `-o, --output-directory`: path to output directory (default: `./pack`)
86
+ - `-v, --verbose`: show more detailed pack progress logging
87
+ - `--uv-build`: extra args passed to `uv build`
88
+ - `--uv-export`: extra args passed to `uv export`
89
+ - `--pip-download`: extra args passed to `pip download`
90
+
91
+ Pipeline steps:
92
+ - `clean`: remove the output directory
93
+ - `export`: write `requirements.txt` files for third-party and local packages
94
+ - `download`: download third-party wheels and sources
95
+ - `build`: build local wheels and compile the combined requirements file
96
+ - `python`: download a python-build-standalone archive for the current Python version and platform
97
+
98
+ Example
99
+ -------
100
+ ```bash
101
+ # run the entire pipeline (default) with verbose outputs
102
+ uv-pack --verbose
103
+ # only clean and export the requirements
104
+ uv-pack clean export
105
+ ```
106
+
107
+ Output layout
108
+ -------------
109
+ ```
110
+ pack/
111
+ requirements.txt
112
+ wheels/
113
+ requirements.txt
114
+ vendor/
115
+ requirements.txt
116
+ python/ # (omitted when the python step is skipped)
117
+ unpack.sh
118
+ unpack.ps1
119
+ unpack.cmd
120
+ .gitignore
121
+ README.md
122
+ ```
123
+
124
+ Unpack and install offline
125
+ --------------------------
126
+
127
+ POSIX (sh/bash/zsh):
128
+
129
+ ```bash
130
+ ./pack/unpack.sh
131
+ ```
132
+
133
+ PowerShell:
134
+
135
+ ```powershell
136
+ .\pack\unpack.ps1
137
+ ```
138
+
139
+ Windows cmd:
140
+
141
+ ```cmd
142
+ .\pack\unpack.cmd
143
+ ```
144
+
145
+ All scripts also accept `VENV_DIR`, `PY_DEST` and `BASE_PY` environment variables.
146
+ Use `BASE_PY` when you skipped the `python` step during packing to provide a system
147
+ python interpreter. `VENV_DIR` (default = `.venv`) and `PY_DEST` (default = `.python`)
148
+ can be used to customize the target python and venv directory.
149
+
150
+ Configuration
151
+ -------------
152
+
153
+ `UV_PYTHON_INSTALL_MIRROR` can override the GitHub API endpoint to retrieve the
154
+ Python releases, default is:
155
+ <https://api.github.com/repos/astral-sh/python-build-standalone/releases/latest>.
156
+
157
+ `GITHUB_TOKEN` can be used to authenticate requests to the GitHub API to
158
+ prevent possible rate-limiting.
159
+
160
+ Limitations
161
+ -----------
162
+
163
+ - The pack process must happen in the ``pyproject.toml`` or ``uv.toml`` directory, typically the repository root,
164
+ because ``uv`` exports relative paths to the project root.
165
+ - The build platform is expected to equal the usage platform; it is currently not possible to pack an environment
166
+ for a different platform.
167
+ - The project Python version is ignored when running `uv-pack` as a tool (`uv tool run` or `uvx`) and should be
168
+ specified using `uv tool run --python 3.11 uv-pack` or `uvx --python 3.11 uv-pack`, see
169
+ [uv#uv5951](https://github.com/astral-sh/uv/issues/5951) and [uv#8206](https://github.com/astral-sh/uv/issues/8206).
170
+ - The download process can be slow because ``pip download`` is used as there is no native (parallel) uv download
171
+ option available for wheels, see [uv#3163](https://github.com/astral-sh/uv/issues/3163).
172
+
173
+ FAQ
174
+ -----------
175
+
176
+ #### How do I pass extra options to `uv export` or another command?
177
+
178
+ Use `--uv-export` to forward arguments, for example:
179
+
180
+ - ``uv-pack --uv-export "--package $MY_PACKAGE"`` to export only a specific workspace package
181
+ - ``uv-pack --uv-export "--locked --dev"`` to include dev-deps and ensure an up-to-date lock file
182
+ - ``uv-pack --uv-export "--all-extras"`` to include all extra dependencies
183
+
184
+ The same is true for ``--uv-build`` and ``--pip-download`` arguments.
185
+
186
+ #### How do I specify index-urls and extra-index-urls?
187
+
188
+ The index urls set in ``pyproject.toml`` and ``uv.toml`` are not configured by default for the wheel
189
+ download (``pip download``), you can specify them as:
190
+
191
+ - ``uv-pack --pip-download "--index-url $MY_INDEX --extra-index-url $MY_EXTRA_INDEX"``
192
+
193
+ #### How do I skip bundling Python?
194
+
195
+ Skip the `python` step: ``uv-pack --skip python``. When unpacking, set `BASE_PY` to a system Python path.
196
+
197
+ #### How do I rerun without deleting the existing pack directory?
198
+
199
+ Skip the `clean` step: ``uv-pack --skip clean``. Note that this automatically re-uses downloaded wheels
200
+ and the downloaded Python interpreter.
201
+
202
+ #### How do I only re-build my package if my pack is already complete?
203
+
204
+ Run only ``uv-pack build``.
205
+
206
+ #### How can I use my pack?
207
+
208
+ Move the pack to the final location and, depending on the shell used, call
209
+ `unpack.sh`, `unpack.ps1`, or `unpack.cmd`. Don't move the virtual
210
+ environment or pack folder after unpacking (hardcoded paths).
@@ -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=ju_9XRNw3vx3ShdLV2Cy-e2gVunkD5ZiOL0HuKqRB-g,1521
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.1.dist-info/WHEEL,sha256=iHtWm8nRfs0VRdCYVXocAWFW8ppjHL-uTJkAdZJKOBM,80
17
+ uv_pack-0.1.1.dist-info/entry_points.txt,sha256=vNW2L3ycXru1h_bHFxCKTtzswejxRk6UjhAd26vRLoM,42
18
+ uv_pack-0.1.1.dist-info/METADATA,sha256=5GYO30zrPk_z2tT5wzqNFCLl3FpSfjMQHx8CBnyK34k,6988
19
+ uv_pack-0.1.1.dist-info/RECORD,,
@@ -1,4 +1,4 @@
1
1
  Wheel-Version: 1.0
2
- Generator: uv 0.9.26
2
+ Generator: uv 0.9.30
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,,