-
Notifications
You must be signed in to change notification settings - Fork 1.6k
/
conanfile.py
29 lines (23 loc) · 883 Bytes
/
conanfile.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
import os
import glob
from conans import ConanFile, tools
class Utf8HConan(ConanFile):
name = "utf8.h"
url = "https://github.com/conan-io/conan-center-index"
homepage = "https://github.com/sheredom/utf8.h"
description = "Single header utf8 string functions for C and C++"
topics = ("utf8", "unicode", "text")
license = "Unlicense"
no_copy_source = True
@property
def _source_subfolder(self):
return "source_subfolder"
def source(self):
tools.get(**self.conan_data["sources"][self.version])
extracted_dir = glob.glob("utf8.h-*")[0]
os.rename(extracted_dir, self._source_subfolder)
def package(self):
self.copy("utf8.h", dst="include", src=self._source_subfolder)
self.copy("LICENSE", dst="licenses", src=self._source_subfolder)
def package_id(self):
self.info.header_only()