mirror of
				https://github.com/astral-sh/uv.git
				synced 2025-10-30 19:48:11 +00:00 
			
		
		
		
	 bf4c7afe8b
			
		
	
	
		bf4c7afe8b
		
			
		
	
	
	
	
		
			
			uv itself is a large package with many dependencies and lots of features. To build a package using the uv build backend, you shouldn't have to download and install the entirety of uv. For platform where we don't provide wheels, it should be possible and fast to compile the uv build backend. To that end, we're introducing a python package that contains a trimmed down version of uv that only contains the build backend, with a minimal dependency tree in rust. The `uv_build` package is publish from CI just like uv itself. It is part of the workspace, but has much less dependencies for its own binary. We're using cargo deny to enforce that the network stack is not part of the dependencies. A new build profile ensure we're getting the minimum possible binary size for a rust binary. --------- Co-authored-by: Zanie Blue <contact@zanie.dev>
		
			
				
	
	
		
			17 lines
		
	
	
	
		
			429 B
		
	
	
	
		
			Python
		
	
	
	
	
	
			
		
		
	
	
			17 lines
		
	
	
	
		
			429 B
		
	
	
	
		
			Python
		
	
	
	
	
	
| def main():
 | |
|     import sys
 | |
| 
 | |
|     # This works both as redirect to use the proper uv package and as smoke test.
 | |
|     print(
 | |
|         "uv_build contains only the PEP 517 build backend for uv and can't be used on the CLI. "
 | |
|         "Use `uv build` or another build frontend instead.",
 | |
|         file=sys.stderr,
 | |
|     )
 | |
|     if "--help" in sys.argv:
 | |
|         sys.exit(0)
 | |
|     else:
 | |
|         sys.exit(1)
 | |
| 
 | |
| 
 | |
| if __name__ == "__main__":
 | |
|     main()
 |