uv-pack 0.1.0__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.
uv_pack/_scripts.py CHANGED
@@ -16,16 +16,29 @@ def copy_unpack_scripts(
16
16
  ) -> None:
17
17
  """Write unpack scripts into the pack directory."""
18
18
  scripts_dir = files("uv_pack") / "scripts"
19
- copy_file = lambda src: shutil.copyfile(str(src), str(output_directory / src.name)) # type: ignore
19
+ copy_file = lambda src, force_lf=False: _copy_file(src, output_directory, force_lf=force_lf) # type: ignore
20
20
 
21
21
  output_directory.mkdir(parents=True, exist_ok=True)
22
- copy_file(scripts_dir / "unpack.sh")
22
+ copy_file(scripts_dir / "unpack.sh", force_lf=True)
23
23
  copy_file(scripts_dir / "unpack.ps1")
24
24
  copy_file(scripts_dir / "unpack.cmd")
25
25
  copy_file(scripts_dir / "README.md")
26
26
  _make_executable(output_directory / "unpack.sh")
27
27
 
28
28
 
29
+ def _copy_file(src: Path, dst_dir: Path, *, force_lf: bool = False) -> None:
30
+ """Copy a file from src to dst_dir, optionally normalizing line endings to LF."""
31
+ dst = dst_dir / src.name
32
+
33
+ if force_lf:
34
+ # Normalize line endings to LF regardless of how Git stored it
35
+ data = src.read_bytes()
36
+ data = data.replace(b"\r\n", b"\n")
37
+ dst.write_bytes(data)
38
+ else:
39
+ shutil.copyfile(str(src), str(dst))
40
+
41
+
29
42
  def _make_executable(path: Path) -> None:
30
43
  """Best-effort make a script executable (POSIX)."""
31
44
  try:
@@ -1,13 +1,12 @@
1
1
  Metadata-Version: 2.3
2
2
  Name: uv-pack
3
- Version: 0.1.0
3
+ Version: 0.1.1
4
4
  Summary: Pack you uv environment for offline usage.
5
5
  Author: David Muhr
6
6
  Author-email: David Muhr <muhrdavid+github@gmail.com>
7
7
  Classifier: Development Status :: 3 - Alpha
8
8
  Classifier: License :: OSI Approved :: MIT License
9
9
  Classifier: Topic :: Software Development :: Libraries
10
- Classifier: Topic :: Scientific/Engineering
11
10
  Classifier: Topic :: Utilities
12
11
  Classifier: Intended Audience :: Developers
13
12
  Classifier: Intended Audience :: Science/Research
@@ -26,6 +25,9 @@ Requires-Dist: packaging>=24.0
26
25
  Requires-Dist: requests>=2
27
26
  Requires-Dist: typer>=0.19
28
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
29
31
  Description-Content-Type: text/markdown
30
32
 
31
33
  uv-pack
@@ -86,14 +88,10 @@ Options:
86
88
  - `--uv-export`: extra args passed to `uv export`
87
89
  - `--pip-download`: extra args passed to `pip download`
88
90
 
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
91
  Pipeline steps:
94
92
  - `clean`: remove the output directory
95
93
  - `export`: write `requirements.txt` files for third-party and local packages
96
- - `download`: download third-party wheels
94
+ - `download`: download third-party wheels and sources
97
95
  - `build`: build local wheels and compile the combined requirements file
98
96
  - `python`: download a python-build-standalone archive for the current Python version and platform
99
97
 
@@ -204,3 +202,9 @@ and the downloaded Python interpreter.
204
202
  #### How do I only re-build my package if my pack is already complete?
205
203
 
206
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).
@@ -6,14 +6,14 @@ uv_pack/_files.py,sha256=uhvNW2RLUVVwE7J6LywwlkOHD4TQ3h_vpqvoN59mA2E,1616
6
6
  uv_pack/_logging.py,sha256=doIGYthDfOGwqTzCX1ckJnscGR3ZaL8QLy0hgdx8EO0,1066
7
7
  uv_pack/_process.py,sha256=qPNQki1Pgu2vLaRsRzXpYmriwghep7HlfI0T5ykX6nY,1928
8
8
  uv_pack/_python.py,sha256=KcRQMKwXufNcwS5pY7odcbtK_UihD_CymG5djilBJaE,5577
9
- uv_pack/_scripts.py,sha256=ObuGoWZwYofgIigXAXF8E4jaqcsuX9nDeGFczRFiOr8,1054
9
+ uv_pack/_scripts.py,sha256=ju_9XRNw3vx3ShdLV2Cy-e2gVunkD5ZiOL0HuKqRB-g,1521
10
10
  uv_pack/py.typed,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
11
11
  uv_pack/scripts/README.md,sha256=fFmzFOExIEt0NERw1rBvsi_ur1qT3I-cVCxOBTO_rrQ,1550
12
12
  uv_pack/scripts/SPEC.md,sha256=_U31gEyPEZLfrO0u4POqdJLwgAFVzsh80bFd0hXESLU,1724
13
13
  uv_pack/scripts/unpack.cmd,sha256=bzxdyYPSN6hEQfVyg0BHJFvMiEvQe7HtGH9GPQOQSVQ,1865
14
14
  uv_pack/scripts/unpack.ps1,sha256=ygQkxsIhUfum8uX3LrjAIclfi91IN98jzU-LYEyVgOA,2150
15
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,,
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.28
2
+ Generator: uv 0.9.30
3
3
  Root-Is-Purelib: true
4
4
  Tag: py3-none-any