Skip to main content

Ensure existence of LFS content in your LFS builds

Project description

sphinx_lfs_content

PyPI version Documentation Status

Git LFS is a popular method to store large files like e.g. documentation assets in git repositories. Building such documentation on a system without Git LFS will typically result in broken documentation. sphinx_lfs_content is a minimalistic Sphinx extension that ensures that git-lfs is installed and otherwise installs it and fetches LFS content. It is motivated by the lack of LFS support on readthedocs.org.

Installation

The extension can be installed from PyPI using pip:

python -m pip install sphinx_lfs_content

If you use a requirements file to describe the dependencies of your documentation build, simply add sphinx_lfs_content to it.

How to use it

Add the following lines to your conf.py:

# The list of enabled extensions
extensions = [
    "sphinx_lfs_content",
]

That's all. The extension will check whether the system has git-lfs and download a version from the git-lfs GitHub page, verify its checksum and checkout any LFS content.

Additionally, a configuration value lfs_content_post_commands is available. It accepts a list of strings with commands that will be executed after the git-lfs checkout was performed. This can be used to resolve chicken-egg situations with other setup code.

Restrictions

The extension is very likely to only work on Linux right now, as it does not properly select the git-lfs archive to download.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

sphinx_lfs_content-1.1.10.tar.gz (3.8 kB view details)

Uploaded Source

File details

Details for the file sphinx_lfs_content-1.1.10.tar.gz.

File metadata

  • Download URL: sphinx_lfs_content-1.1.10.tar.gz
  • Upload date:
  • Size: 3.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.12.8

File hashes

Hashes for sphinx_lfs_content-1.1.10.tar.gz
Algorithm Hash digest
SHA256 fe4422f2631f3fbef826a8d58b09a059bfe3904a16346e67d5e5801c7f0242c0
MD5 d1f1243f4eeed84d3e0f074d616761ef
BLAKE2b-256 44b28b808b5c7422f57e1cdbbb09615be9148df2dafe0af7a14e39727c1c2579

See more details on using hashes here.

Provenance

The following attestation bundles were made for sphinx_lfs_content-1.1.10.tar.gz:

Publisher: pypi.yml on ssciwr/sphinx_lfs_content

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page