-
Notifications
You must be signed in to change notification settings - Fork 39
docs: add quick start guide and glossary from learning-fromager repo #898
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Open
shifa-khan
wants to merge
1
commit into
python-wheel-build:main
Choose a base branch
from
shifa-khan:799
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
+88
−0
Open
Changes from all commits
Commits
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,83 @@ | ||
| Quick Start | ||
| =========== | ||
|
|
||
| This guide gets you from zero to your first wheel build in under 5 minutes. | ||
|
|
||
| Prerequisites | ||
| ------------- | ||
|
|
||
| You'll need Python 3.11 or later and network access to download packages from PyPI. | ||
|
|
||
| Installation | ||
| ------------ | ||
|
|
||
| Install fromager using pip: | ||
|
|
||
| .. code-block:: console | ||
|
|
||
| $ pip install fromager | ||
| $ fromager --version | ||
| fromager, version X.Y.Z | ||
|
|
||
| Your First Build | ||
| ---------------- | ||
|
|
||
| Let's build a simple package and its dependencies from source. We'll use | ||
| ``stevedore``, a lightweight package with minimal dependencies. | ||
|
|
||
| Create a ``requirements.txt`` file with the package name: | ||
|
|
||
| .. code-block:: console | ||
|
|
||
| $ echo "stevedore" > requirements.txt | ||
|
|
||
| Run the bootstrap command: | ||
|
|
||
| .. code-block:: console | ||
|
|
||
| $ fromager bootstrap -r requirements.txt | ||
|
|
||
| primary settings file: overrides/settings.yaml | ||
| per-package settings dir: overrides/settings | ||
| variant: cpu | ||
| ... | ||
| 100%|████████████████████████████████████████| 3/3 [00:08<00:00, 2.67s/pkg] | ||
| writing installation dependencies to ./work-dir/constraints.txt | ||
|
|
||
| Check your results: | ||
|
|
||
| .. code-block:: console | ||
|
|
||
| $ ls wheels-repo/downloads/ | ||
| pbr-6.1.0-0-py2.py3-none-any.whl | ||
| setuptools-75.1.0-0-py3-none-any.whl | ||
| stevedore-5.3.0-0-py3-none-any.whl | ||
|
|
||
| You've built ``stevedore`` and its dependencies (``pbr``, ``setuptools``) | ||
| entirely from source. Fromager downloaded the source distributions from PyPI, | ||
| figured out the build and runtime dependencies, built each package in the | ||
| correct order, and created wheels in ``wheels-repo/downloads/``. | ||
|
|
||
| For a detailed explanation of the output files and directories, see | ||
| :doc:`files`. | ||
|
|
||
| Pinning Versions with Constraints | ||
| --------------------------------- | ||
|
|
||
| For reproducible builds, use a constraints file to pin specific versions: | ||
|
|
||
| .. code-block:: console | ||
|
|
||
| $ echo "stevedore==5.3.0" > constraints.txt | ||
| $ fromager -c constraints.txt bootstrap -r requirements.txt | ||
|
|
||
| The ``-c`` option ensures fromager uses exactly the versions you specify. | ||
|
|
||
| Next Steps | ||
|
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I like this. Once you remove glossary, we can merge this.
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Made changes as requested. |
||
| ---------- | ||
|
|
||
| Now that you've seen fromager work with a simple package, you might want to: | ||
|
|
||
| * Learn to debug build failures with a more complex example in :doc:`getting-started` | ||
| * Customize builds with settings, patches, and variants in :doc:`customization` | ||
| * Check specific guides in :doc:`how-tos/index` | ||
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please keep quickstart.rst before using.md for users scanning the documentation. A "Quick Start" is typically the first thing new users look for.