conanfile.py (858B)
1 #!/usr/bin/env python3 2 # -*- coding: utf-8 -*- 3 4 from conans import ConanFile, tools 5 6 def get_version(): 7 git = tools.Git() 8 try: 9 return git.run("describe --tags --abbrev=0") 10 except: 11 return None 12 13 class Function2Conan(ConanFile): 14 name = "function2" 15 version = get_version() 16 license = "boost" 17 url = "https://github.com/Naios/function2" 18 author = "Denis Blank (denis.blank@outlook.com)" 19 description = "Improved and configurable drop-in replacement to std::function" 20 homepage = "http://naios.github.io/function2" 21 no_copy_source = True 22 scm = { 23 "type": "git", 24 "url": "auto", 25 "revision": "auto" 26 } 27 28 def package(self): 29 self.copy("LICENSE.txt", "licenses") 30 self.copy("include/function2/function2.hpp") 31 32 def package_id(self): 33 self.info.header_only()