Skip to content

Instantly share code, notes, and snippets.

@puetzk
puetzk / conanfile.py
Last active March 10, 2022 19:21
pyvenv
from conans import ConanFile, tools
from conans.model import Generator
import os
import re
from pyvenv import venv
class PyvenvConanFile(ConanFile):
name = "pyvenv"
version = "0.3.1"
@puetzk
puetzk / conanfile.py
Created February 2, 2019 00:47
example files for conan patch adding files interaction with strip=1
from conans import ConanFile, tools
class PatchConan(ConanFile):
name = "patch"
version = "1.0"
settings = "os", "compiler", "build_type", "arch"
exports_sources = ["example.patch"]
def source(self):
self.run("git clone https://github.com/memsharded/hello.git")
@puetzk
puetzk / conanfile.py
Created November 30, 2018 04:37
SystemPackageConan
from conans import ConanFile, tools
from configparser import ConfigParser
import os
def remove_prefix(s, prefix):
return s[len(prefix):] if s.startswith(prefix) else s
class SystemPackageConan(ConanFile):
settings = 'os', 'arch'
options = { "pkg_config" : "ANY" }
@puetzk
puetzk / build
Created November 9, 2018 23:59
Example files for conan requires vs build_requires mismatch
conan create required.py required/1.0@bug/example
conan create required.py required/1.1@bug/example
conan create build_required.py build_required/1.0@bug/example
conan create . consumer/1.0@bug/example