-
-
Notifications
You must be signed in to change notification settings - Fork 122
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
1 changed file
with
36 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
#!/usr/bin/env python | ||
# -*- coding: utf-8 -*- | ||
|
||
from conans import ConanFile, tools | ||
import os | ||
|
||
class SparseppConan(ConanFile): | ||
name = "sparsepp" | ||
version = "1.22" | ||
description = "A fast, memory efficient hash map for C++" | ||
|
||
# Indicates License type of the packaged library | ||
license = "https://github.com/greg7mdp/sparsepp/blob/master/LICENSE" | ||
|
||
# Packages the license for the conanfile.py | ||
exports = ["LICENSE.md"] | ||
|
||
# Custom attributes for Bincrafters recipe conventions | ||
source_subfolder = "source_subfolder" | ||
|
||
def source(self): | ||
source_url = "https://github.com/greg7mdp/sparsepp" | ||
tools.get("{0}/archive/{1}.tar.gz".format(source_url, self.version)) | ||
extracted_dir = self.name + "-" + self.version | ||
|
||
#Rename to "source_folder" is a convention to simplify later steps | ||
os.rename(extracted_dir, self.source_subfolder) | ||
|
||
|
||
def package(self): | ||
include_folder = os.path.join(self.source_subfolder, "sparsepp") | ||
self.copy(pattern="LICENSE") | ||
self.copy(pattern="*", dst="include/sparsepp", src=include_folder) | ||
|
||
def package_id(self): | ||
self.info.header_only() |