Skip to content
Official Conan client hooks
Branch: master
Clone or download
danimtb Merge pull request #66 from danimtb/feature/fix_appveyor
Update Appveyor badge in readme
Latest commit dac3cc4 May 28, 2019
Type Name Latest commit message Commit time
Failed to load latest commit information.
.travis enhancements to test suite Jan 31, 2019
hooks Fix conandev: redirect output for testing (#63) May 25, 2019
tests fix pluggy May 28, 2019
.gitignore enhancements to test suite Jan 31, 2019
.travis.yml update testing versions (#64) May 25, 2019
LICENSE update license Sep 25, 2018 updated badge May 28, 2019
appveyor.yml update testing versions (#64) May 25, 2019
tox.ini revert May 28, 2019

Build Status Build status

Conan Hooks

Repository to develop experimental Conan hooks for Conan >= 1.8.

WARNING: Hooks were originally named "Plugins"

Hook setup

Place your hook Python files under ~/.conan/hooks. The name of the hook would be the same one as the file name.


Only copying hook files will not activate them.

Conan config as installer

To install all hooks from Conan repository in Github:

$ conan config install

Conan config install does not activate any hook.

Hook activation

You can activate any hook with:

$ conan config set hooks.conan-center

If you handle multiple dependencies in your project is better to add a conan.conf:



These are the hooks currently available in this repository

Conan Center reviewer

This hook does checks for the inclusion guidelines of third-party libraries in Conan Center.

It is mostly intended for users who want to contribute packages to Conan Center. With this hook they will test some of the requirements in the guidelines, as this hook will check for recipe metadata, binary matching... during the conan create step and will output the result of each check as OK, WARNING or ERROR:

[HOOK -] pre_export(): [RECIPE METADATA] OK
[HOOK -] pre_export(): [HEADER ONLY] OK
[HOOK -] pre_export(): [NO COPY SOURCE] OK
[HOOK -] pre_export(): [FPIC OPTION] OK
[HOOK -] pre_export(): [FPIC MANAGEMENT] 'fPIC' option not found
[HOOK -] pre_export(): [VERSION RANGES] OK
[HOOK -] post_package(): ERROR: [PACKAGE LICENSE] No package licenses found in: ~/
.conan/data/name/version/jgsogo/test/package/3475bd55b91ae904ac96fde0f106a136ab951a5e. Please
 package the library license to a 'licenses' folder
[HOOK -] post_package(): [DEFAULT PACKAGE LAYOUT] OK
[HOOK -] post_package(): [SHARED ARTIFACTS] OK

Attribute checker

This hook checks that some important attributes are present in the ConanFile: url, license and description, and will output a warning for the missing ones.

Bintray Updater

This Conan hook reads your recipe and updates its Bintray package info using the attributes.

It's necessary pass Bintray login by environment variables:

  • BINTRAY_LOGIN_USERNAME: Bintray login username

The hook is automatically called when upload command is executed.

Binary Linter

This Conan hook validates produced binary artifacts of the given package.

Binaries stored in the package folder are checked for compatibility with package settings and options.

Currently, the following checks are performed:

  • Binary format (Mach-O, ELF or PE)
  • Architecture
  • No shared libraries are produced for shared=False
  • Visual Studio runtime library in use

The hook uses LIEF library in order to perform its checks.

The hook is automatically called when package command is executed.

GitHub Updater

This Conan hook reads your recipe and updates its GitHub repository properties using the attributes.

The following attributes are updated:

  • homepage

  • description

  • topics

It's necessary to pass GitHub token by environment variable: GITHUB_TOKEN.

SPDX checker

This Conan hook validates that conanfile's license attribute specifies valid license identifier(s) from the SPDX license list.

The hook uses spdx_lookup python module in order to perform its checks.

Use pip install spdx_lookup in order to install required dependency.

The hook is automatically called when export command is executed.


MIT License

You can’t perform that action at this time.