package An official xmake package repository
https://xrepo.xmake.io/
You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
27 lines
1.2 KiB
27 lines
1.2 KiB
10 months ago
|
package("pyincpp")
|
||
|
set_homepage("https://github.com/chen-qingyu/pyincpp")
|
||
10 months ago
|
set_description("A C++ type library that is as easy to use as Python built-in types.")
|
||
10 months ago
|
set_kind("library", {headeronly = true})
|
||
10 months ago
|
|
||
10 months ago
|
add_urls("https://github.com/chen-qingyu/pyincpp/archive/refs/tags/$(version).tar.gz",
|
||
|
"https://github.com/chen-qingyu/pyincpp.git")
|
||
10 months ago
|
|
||
10 months ago
|
add_versions("v1.3.2", "687148704f278c292962cffe1f440e5a4cc33f2a82f5e5a17b23aab88a282951")
|
||
10 months ago
|
|
||
|
on_install(function (package)
|
||
10 months ago
|
os.cp("sources/*.hpp", package:installdir("include/pyincpp"))
|
||
10 months ago
|
end)
|
||
|
|
||
|
on_test(function (package)
|
||
|
assert(package:check_cxxsnippets({test = [[
|
||
|
#include <cassert>
|
||
10 months ago
|
using namespace pyincpp;
|
||
10 months ago
|
void test() {
|
||
|
Map<String, List<Integer>> map = {{"first", {123, 456}}, {"second", {789}}, {"second", {0}}, {"third", {"12345678987654321", 5}}};
|
||
|
assert(map.size() == 3);
|
||
|
assert(map.keys() == Set<String>({"first", "second", "third"}));
|
||
|
assert(map["third"][-1].factorial() == 120);
|
||
|
}
|
||
10 months ago
|
]]}, {configs = {languages = "c++17"}, includes = "pyincpp/pyincpp.hpp"}))
|
||
10 months ago
|
end)
|