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.7.tar.gz (3.2 kB view details)

Uploaded Source

File details

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

File metadata

  • Download URL: sphinx_lfs_content-1.1.7.tar.gz
  • Upload date:
  • Size: 3.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/5.0.0 CPython/3.12.2

File hashes

Hashes for sphinx_lfs_content-1.1.7.tar.gz
Algorithm Hash digest
SHA256 2336f2c12f4d26fa97d36b64b4b78405ccb0a767a63761f5c169b6e3dedcd46f
MD5 1b294b8a633aa0ce82168e3eaf1c101f
BLAKE2b-256 307db17bcdf413c77b06bcb328779d9748cab4c1d6f08b75b68b6af830da596d

See more details on using hashes here.

Supported by

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