Defining progfigsite
dependencies¶
Progfiguration core has no runtime dependencies, and packages of it are always self-contained.
Progfigsite packages reference progfiguration core modules.
When building progfigsite packages with progfiguration build
(see progfiguration core command),
progfigsite packages include progfiguration core in a subpackage of progfigsite.builddata Module so they are self-contained.
You can also build progfigsite packages without a vendored progfiguration core
by using standard Python build tools and a pyproject.toml
.
Progfigsite packages may use third party dependencies in one of two ways:
For core functionality like in the progfigsite.sitelib Module.
The simplest thing to do is to list the dependencies in
pyproject.toml
underproject.dependencies
. This will cause the dependencies to be installed when building the package or installing it with a package manager. However, it will mean thatprogfiguration build pyz
,progfiguration run
, andprogfiguration deploy
will not work, as those commands assume a self-contained package.If your environment ensures that the dependencies are available at runtime, don’t list them as
project.dependencies
inpyproject.toml
(though you may wish to list them somewhere underproject.optional-dependencies
so you can easily install them during development).If not, you may wish to vendor them yourself. Don’t use progfigsite.builddata Module for this, but instead place them somewhere under progfigsite.sitelib Module.
For dependencies that can be installed by a
progfigsite
role.For this use, you can list the dependencies in
pyproject.toml
underproject.optional-dependencies
, and install them during development. Make sure your role installs them before using them, and then they will be available.
Note
Progfiguration and progfigsite both have build-time dependencies when building pip packages. Building zipapp packages can be done entirely without dependencies.
The design is intended to give maximum flexibility to progfigisite users.