u1735067 / python-yubicommon

Common utility modules shared between various Python based Yubico projects.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

YubiCommon

Common utility modules shared between various Python based Yubico projects.

Versioning

YubiCommon follows Semantic Versioning 2.0.0.

Vendoring YubiCommon

A common usecase is to vendor YubiCommon under another project to ensure the exact version, and not require an additional explicit depencency. This allows a project to depend on any revision of the project instead of only released versions. To do so simply copy the yubicommon module to a module in the parent project, making it a sub-module. When working with Git a submodule can be used to more easily update the version. When used as a submodule, the recommended approach is to keep it in a common "vendor" subdirectory of the repository, and create a symlink in the parent module. For example:

├── NEWS
├── README
├── setup.py
├── vendor
│   └── yubicommon  # Git submodule
└── mypackage
    ├── __init__.py
    └── yubicommon -> ../vendor/yubicommon/yubicommon

When vendoring YubiCommon as a submodule you should use the HTTPS URL to ensure that anyone can initialize the repository:

git submodule add https://github.com/Yubico/python-yubicommon.git vendor/yubicommon
git submodule init
git submodule update

Using YubiCommon as a dependency

You can depend on YubiCommon like any other Python dependency, by specifying it in your setup.py file. You should take care to depend on a specific version of YubiCommon to ensure that new versions to not break your project.

About

Common utility modules shared between various Python based Yubico projects.

License:BSD 2-Clause "Simplified" License


Languages

Language:Python 100.0%