@@ -37,38 +37,41 @@ The two key tools we need are:
3737The ` build ` tool reads your ` pyproject.toml ` file and generates the package distribution files.
3838
3939``` bash
40- pip install build
40+ pixi add --pypi build
4141```
4242
4343``` output
44- Collecting build
45- Downloading build-1.3.0-py3-none-any.whl.metadata (5.6 kB)
46- Requirement already satisfied: packaging>=19.1 in /home/codespace/.local/lib/python3.12/site-packages (from build) (25.0)
47- Collecting pyproject_hooks (from build)
48- Downloading pyproject_hooks-1.2.0-py3-none-any.whl.metadata (1.3 kB)
49- Downloading build-1.3.0-py3-none-any.whl (23 kB)
50- Downloading pyproject_hooks-1.2.0-py3-none-any.whl (10 kB)
51- Installing collected packages: pyproject_hooks, build
52- Successfully installed build-1.3.0 pyproject_hooks-1.2.0
44+ ✔ Added build >=1.3.0, <2
45+ Added these as pypi-dependencies.
5346```
54-
47+ Empty the depenencies under ` [project] ` and move/edit them to ` [tool.pixi.pypi-dependencies] ` section, like shown below :
48+
49+ ``` toml
50+ [project ]
51+ dependencies = []
52+
53+ [tool .pixi .pypi-dependencies ]
54+ requests = " >=2.32.5,<3"
55+ build = " >=1.3.0,<2"
56+ ```
57+
5558``` bash
56- python -m build
59+ pixi run python -m build
5760```
5861
5962``` output
6063 * Creating isolated environment: venv+pip...
61- * Installing packages in isolated environment:
62- - hatchling
63- * Getting build dependencies for sdist...
64- * Building sdist...
65- * Building wheel from sdist
66- * Creating isolated environment: venv+pip...
67- * Installing packages in isolated environment:
68- - hatchling
69- * Getting build dependencies for wheel...
70- * Building wheel...
71- Successfully built greet_me-0.1.0.tar.gz and greet_me-0.1.0-py3-none-any.whl
64+ * Installing packages in isolated environment:
65+ - hatchling
66+ * Getting build dependencies for sdist...
67+ * Building sdist...
68+ * Building wheel from sdist
69+ * Creating isolated environment: venv+pip...
70+ * Installing packages in isolated environment:
71+ - hatchling
72+ * Getting build dependencies for wheel...
73+ * Building wheel...
74+ Successfully built greet_me-0.1.0.tar.gz and greet_me-0.1.0-py3-none-any.whl
7275 ```
7376
7477This command creates a ` dist ` directory containing two files:
0 commit comments