forked from bincrafters/conan-xmake_installer
-
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathconanfile.py
41 lines (34 loc) · 1.57 KB
/
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
30
31
32
33
34
35
36
37
38
39
40
41
#!/usr/bin/env python
# -*- coding: utf-8 -*-
from conans import ConanFile, tools
import os
class XmakeInstallerConan(ConanFile):
name = "xmake_installer"
version = "2.2.3"
description = "Installer for the xmake build system"
topics = ("conan", "xmake", "tboox", "installer", "build_system")
url = "https://github.com/bincrafters/conan-xmake_installer"
homepage = "https://github.com/tboox/xmake"
author = "Bincrafters <[email protected]>"
license = "MIT"
exports = ["LICENSE.md"]
settings = "os_build"
_source_subfolder = "source_subfolder"
def source(self):
checksum = "c73d34805ab26d214f22fee74bf033942f91ce43bfc028663ffb910ad22c2c5d"
tools.get(f"{self.homepage}/archive/v{self.version}.tar.gz", sha256=checksum)
extracted_dir = "xmake-" + self.version
os.rename(extracted_dir, self._source_subfolder)
def build(self):
if self.settings.os_build == "Windows":
# need simple instructions on build from source with standard build tools
else:
# need simple instructions on build from source with standard build tools
def package(self):
self.copy(pattern="LICENSE.md", dst="licenses", src=self._source_subfolder)
if self.settings.os_build == "Windows":
self.copy(pattern="xmake.exe", dst="bin", src="core/build", keep_path=False)
else:
self.copy(pattern="*xmake", dst="bin", keep_path=False)
def package_info(self):
self.env_info.PATH.append(os.path.join(self.package_folder, "bin"))