@@ -57,3 +57,74 @@ Important Considerations
5757The graph and build-sequence files can already handle multiple conflicting
5858versions, so this change simply allows bypassing the final constraints
5959validation step that ensures pip-compatibility.
60+
61+ Complete Example
62+ ----------------
63+
64+ This example demonstrates a complete walkthrough of using the ``--skip-constraints ``
65+ option to build wheel collections containing conflicting package versions.
66+
67+ Use Case
68+ ~~~~~~~~
69+
70+ Suppose you need to build a package index that contains multiple versions of the
71+ same package for different downstream consumers. For example, you might want to
72+ include both Django 3.2 and Django 4.0 in your collection.
73+
74+ Requirements Files
75+ ~~~~~~~~~~~~~~~~~~
76+
77+ Create a requirements file with conflicting versions:
78+
79+ **requirements-conflicting.txt **
80+
81+ .. code-block :: text
82+
83+ django==3.2.0
84+ django==4.0.0
85+ requests==2.28.0
86+
87+ Normally, this would fail with a conflict error because both Django versions
88+ cannot be installed together.
89+
90+ Running with --skip-constraints
91+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
92+
93+ .. code-block :: bash
94+
95+ fromager bootstrap --skip-constraints \
96+ --sdists-repo ./sdists-repo \
97+ --wheels-repo ./wheels-repo \
98+ --work-dir ./work-dir \
99+ -r requirements-conflicting.txt
100+
101+ Expected Behavior
102+ ~~~~~~~~~~~~~~~~~
103+
104+ 1. **Success **: Both Django versions will be built successfully
105+ 2. **Output Files **:
106+
107+ - ``build-order.json `` - Contains build order for all packages
108+ - ``graph.json `` - Contains dependency resolution graph
109+ - No ``constraints.txt `` file is generated
110+
111+ 3. **Wheel Repository **: Contains wheels for both Django versions and their respective dependencies
112+
113+ Verification
114+ ~~~~~~~~~~~~
115+
116+ Check that both versions were built:
117+
118+ .. code-block :: bash
119+
120+ find wheels-repo/downloads/ -name " Django-*.whl"
121+ # Expected output:
122+ # wheels-repo/downloads/Django-3.2.0-py3-none-any.whl
123+ # wheels-repo/downloads/Django-4.0.0-py3-none-any.whl
124+
125+ Verify no constraints file was created:
126+
127+ .. code-block :: bash
128+
129+ ls work-dir/constraints.txt
130+ # Expected: file does not exist
0 commit comments