Binaries for the extended + withdeploy edition of the Hugo static site generator, installable via pip
This project provides wheels for Hugo so that it can be used with pip on macOS, Linux, and Windows; for Python 3.10 and later.
Note
Only the latest, stable, and to-be EOL Python versions are tested regularly. If you encounter any issues with the package on a specific Python version, please feel free to open an issue.
Hugo is a static site generator written in Go. It is designed to be fast and flexible, and it is used by many people and organizations for their websites, documentation, and personal blogs.
Note
This distribution of Hugo is currently not affiliated with the official Hugo project. Please refer to the Hugo documentation for more information on Hugo.
This project, hugo is versioned alongside the Hugo releases and is aligned with the versioning of Hugo itself, which uses SemVer – but is likely versioned according to 0ver software standards based on their versioning history.
Binaries for hugo through these wheels are available for Hugo versions 0.121.2 and above, through PyPI or through releases on GitHub. If you need an older version of hugo that is not available through this package, please consider using the official Hugo binaries.
Please refer to the section on Supported platforms for a list of wheels available for supported platforms and architectures. If it does, jump to the Quickstart section to get started.
Warning
Owing to the limitations of overall sizing available on PyPI for hugo, only the most recent versions of Hugo are available for download through pip, and older versions of these wheels will be deleted to make space for newer releases. If you need an older version of Hugo, please consider using the wheels that have been uploaded to the GitHub releases page or the official Hugo binaries. The former can be done via pip by downloading the .whl file, or through pipx using the URL directly (recommended). For example, if you need Hugo 0.122.0, you can run pipx install "https://github.com/agriyakhetarpal/hugo-python-distributions/releases/download/v0.122.0/hugo-0.122.0-cp311-cp311-win_amd64.whl" to download and install the wheel for Hugo 0.122.0 on Windows for Python 3.11.
The documentation for this project is available at https://agriyakhetarpal.github.io/hugo-python-distributions/
Binaries for the Hugo static site generator are available for download from the Hugo releases page. These binaries have to be downloaded and placed in an appropriate location on the system manually and the PATH environment variable has to be updated to include said location.
This project provides wheels for Hugo to be used with pip on macOS, Linux, and Windows. This allows Hugo to be installed and used in a virtual environment, which allows multiple versions of Hugo to be installed and used side-by-side in different virtual environments, where Hugo can be used as a command-line tool (a Python API is not provided at this time given the lack of such a demand for it).
This project is designed to be used in the following scenarios:
- You want to use Hugo as a command-line tool, but you don't want it to be installed globally on your system or do not have the necessary permissions to do so.
- You cannot or do not want to use the official Hugo binaries
- You want to use Hugo in a virtual environment that is isolated from the rest of your system – this also allows you to install and use multiple versions of Hugo side-by-side if needed for any reason
- You want to use Hugo in a Python-based project, such as a static site generator that uses Hugo as a backend?
- You want to test a new version of Hugo without having to install it globally on your system or affecting your existing Hugo installation
- Python wheels allow for incredibly fast installation, in comparison to using other methods of installing Hugo such as system package managers
- Easy updates to the latest version of Hugo through the use of the
pip install --upgrade hugocommand, and automatic updates possible too if you use a package manager such as Poetry or PDM to manage your Python dependencies or a tool such as pipx to manage your command-line tools - ...and more!
- It is difficult to provide wheels for all platforms and architectures (see Supported platforms), so this project only provides wheels for the most common ones—those supported by Python platform tags, packaging standards and tooling—it is not reasonable to do so and provide releases for other platforms owing to the limited resources available on CI systems, in this case, GitHub Actions runners. For extra platforms and architectures, please refer to the Building from source section or consider using the official Hugo binaries for your purpose.
- This project does not provide a Python API for Hugo, it just wraps its own command-line interface. The packaging infrastructure for this Python package is not designed to provide a Python API for Hugo, and it is not the goal of this project to provide one. If you need a Python API for Hugo, please refer to the Hugo documentation for further resources on how to use Hugo programmatically as needed.
This project is licensed under the terms of the Apache 2.0 license. Hugo is available under Apache 2.0 (see the Hugo license) as well.
Please refer to the Security policy for this project for more information.
This repository aims to follow the Hugo project in striving to provide a welcoming and inclusive environment for all contributors, regardless of their background and identity. Please refer to the Code of Conduct for more information that applies to all interactions in this repository and its associated spaces. It is reliant on the Contributor Covenant for its guidelines and conforms to version 2.1.
For requesting help, reporting bugs, or requesting features that are specific to Hugo's functionalities, please refer to the Hugo Discourse forum. For requesting help for hugo-python-distributions, please feel free to open an issue in this repository.
- The official Hugo project, which is the source of the binaries provided by this project.
- The
cmake-python-distributionsproject by the scikit-build team provides a similar infrastructure for building and distributing CMake as a Python package to be used as a PEP 517 build-time dependency for building packages with extension modules. I used their repository's name as an inspiration for the name of this repository.
uhugois a Hugo binary helper that installs and updates Hugo binaries from Hugo official releases. It can be used to update the version of Hugo within Cloud providers. The difference betweenuHugois that this project enables building Hugo from source and embeds the application binary into a wheel, whileuHugois a CLI to update an existing Hugo binary already present onPATH. It provides similar visions for installing Hugo via a command-line interface, even though the idea and the packaging code is fundamentally different.hvm(Hugo version manager) is a project by one of the core developers of Hugo that allows downloading multiple Hugo versions and setting different default versions by adding them toPATH, thereby allowing the usage of multiple versions at once, but without the extra Python scaffolding provided here (and withoutpipx's run-without-install functionality of course).hugo-installeris a small Node.js script which you can use to fetch the correct Hugo binary for your system and install it withnpm's post-installation hook. It is similar to this project in that it provides a way to install Hugo binaries.conda-forge'shugofeedstock provides a way to install Hugo binaries via thecondapackage format and associated package managers.
zig-pypiis a project that provides a way to distribute the Zig compiler as a Python package, which can be installed viapip. It provides a similar infrastructure for building and distributing binaries as this project does for Hugo, but it fetches the Zig compiler binaries from the official Zig releases and embeds them into a Python package in a reproducible manner.nodejs-wheelis a project that provides a way to unofficially distribute Node.js binaries as Python packages, which can be installed viapip, in order to use Node.js andnpmin an isolated Python environment.- The
pip-binary-factoryrepository provides binaries and their CLIs for various Go-based tools as Python packages.
There are several other projects in this area, but are not listed here for brevity.
- This project is currently not affiliated with the official Hugo project. Please refer to the Hugo documentation for more information on Hugo.
- The author of this project: @agriyakhetarpal, would like to express a token of gratitude to the owner of the
Hugopackage on PyPI (@nariman) for their kind gesture of granting access to take over the package name with the underlying provisions of PEP 541. This way, it allows users to install the package using the same name as the official Hugo project, which undoubtedly provides for a better user experience and convenience to users of this package when compared to the previous package name,python-hugo.