Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions docs/getting-started.rst
Original file line number Diff line number Diff line change
@@ -1,6 +1,10 @@
Getting Started
===============

.. note::

New to fromager? Start with :doc:`quickstart` for a simple first build.

The basic process for using fromager to build a collection of wheels is

1. Make a list of the top-level dependencies (applications, extension libraries,
Expand Down
1 change: 1 addition & 0 deletions docs/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@ those special cases directly into fromager.
:maxdepth: 2

using.md
quickstart.rst
Copy link
Member

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.

getting-started.rst
customization.md
concepts/index.rst
Expand Down
83 changes: 83 additions & 0 deletions docs/quickstart.rst
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
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I like this. Once you remove glossary, we can merge this.

Copy link
Author

Choose a reason for hiding this comment

The 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`
Loading