Skip to main content

Ensure existence of LFS content in your LFS builds

Project description

sphinx_lfs_content

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",
]

# The relative path from conf.py to the git repository root (defaults to ".")
lfs_content_path_to_git_root = ".."

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.

The configuration value lfs_content_path_to_git_root needs to be given despite the fact that this information could be retrieved with git rev-parse --show-toplevel in order to make the extension more robust against recent build failures on ReadTheDocs.

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

Uploaded Source

File details

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

File metadata

  • Download URL: sphinx_lfs_content-0.1.0.tar.gz
  • Upload date:
  • Size: 3.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.4.1 importlib_metadata/4.6.1 pkginfo/1.7.0 requests/2.25.1 requests-toolbelt/0.9.1 tqdm/4.61.1 CPython/3.9.6

File hashes

Hashes for sphinx_lfs_content-0.1.0.tar.gz
Algorithm Hash digest
SHA256 d644b58c18edec6edf52e6e71c4dc6f8a9346fda5267dfd6d65a18d20cd3423d
MD5 82371bb350e13069efc88af5fd6eb6af
BLAKE2b-256 ca5ee9d1bf46b12693a6b2b76be2a43cd865a9bd78472e0bbcbfb10b113642cd

See more details on using hashes here.

Provenance

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