You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Fixes#652
Modified the pyproject.toml removing the matrix from the default environment as the
matrix belongs on specific environments (like test) where multi-version behavior is
actually needed, not on the default environment which should be simple and
predictable.
Signed-off-by: Lalatendu Mohanty <lmohanty@redhat.com>
Copy file name to clipboardExpand all lines: docs/develop.md
+59Lines changed: 59 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -30,4 +30,63 @@ writing to INFO level to show what is starting and stopping, respectively.
30
30
Detailed messages should be logged to DEBUG level so they will not appear on the
31
31
console by default.
32
32
33
+
## Building the project
34
+
35
+
The project uses [Hatch](https://hatch.pypa.io/) as its build system with [hatchling](https://hatch.pypa.io/latest/plugins/builder/wheel/) as the build backend. The build configuration is defined in `pyproject.toml`.
36
+
37
+
### Development installation
38
+
39
+
For development, you can install the project in editable mode:
40
+
41
+
```bash
42
+
# You can spawn a shell within an environment by using the hatch shell command.
43
+
# It installs the project in editable/development mode.
44
+
hatch shell
45
+
46
+
# Check if fromager is installed and available in the path
47
+
which fromager
48
+
```
49
+
Note: When a package is installed in editable/development mode, you can make changes to its source code directly. These changes are immediately reflected in your Python environment without needing to reinstall the package.
50
+
51
+
### Quick build
52
+
53
+
To build the project (both source distribution and wheel), use:
54
+
55
+
```bash
56
+
hatch build
57
+
```
58
+
59
+
This will create both `.tar.gz` (source distribution) and `.whl` (wheel) files in the `dist/` directory.
60
+
61
+
You can build specific formats by using `hatch build -t wheel` or `hatch build -t sdist`.
62
+
63
+
Alternatively, you can use the standard `build` module (which is included in the `[project.optional-dependencies.build]` section):
64
+
65
+
```bash
66
+
# Install build dependencies first
67
+
pip install build twine
68
+
69
+
# Build the project
70
+
python -m build
71
+
```
72
+
73
+
### Package validation
74
+
75
+
To validate the built packages, you can use the package linting script:
76
+
77
+
```bash
78
+
hatch run lint:pkglint
79
+
```
80
+
81
+
This command will:
82
+
1. Build the project using `python -m build`
83
+
2. Check the built packages with `twine check dist/*.tar.gz dist/*.whl`
84
+
3. Validate Python version consistency between `pyproject.toml` and GitHub Actions workflows
85
+
86
+
The validation will fail if:
87
+
- The package metadata is malformed
88
+
- Required files are missing from the distribution
89
+
- Python version requirements are inconsistent across configuration files
0 commit comments