rename project: mds -> pytype (#3147)
* add mds * add test for mds * fixed the issue of multiple compilers for templates * update mds from 1.1.0 to 1.1.1 * rename project: mds -> pytype * update pytype --------- Co-authored-by: Jérôme Leclercq <lynix680@gmail.com>pull/3154/head
parent
ca551c2b6a
commit
3f37633d15
2 changed files with 27 additions and 27 deletions
@ -1,27 +0,0 @@ |
||||
package("mds") |
||||
set_kind("library", {headeronly = true}) |
||||
set_homepage("https://github.com/chen-qingyu/MyDataStructure") |
||||
set_description("A C++ containers library that is as easy to use as Python's containers library.") |
||||
set_license("GPL-3.0") |
||||
|
||||
add_urls("https://github.com/chen-qingyu/MyDataStructure/archive/refs/tags/v$(version).zip", |
||||
"https://github.com/chen-qingyu/MyDataStructure.git") |
||||
add_versions("1.1.1", "5d724a373d6906ef98c30cc0ea39ed2220d5bae09f48dd24a42e5dbfc3a04573") |
||||
add_versions("1.1.0", "537a1260ebdeeb1db9f94a3c44e628c04a70e4d26d5eb72f4206765717d6d680") |
||||
|
||||
on_install(function (package) |
||||
os.cp("sources/*.hpp", package:installdir("include/mds")) |
||||
end) |
||||
|
||||
on_test(function (package) |
||||
assert(package:check_cxxsnippets({test = [[ |
||||
#include <cassert> |
||||
using namespace mds; |
||||
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); |
||||
} |
||||
]]}, {configs = {languages = "c++17"}, includes = "mds/mds.hpp"})) |
||||
end) |
@ -0,0 +1,27 @@ |
||||
package("pytype") |
||||
set_kind("library", {headeronly = true}) |
||||
set_homepage("https://github.com/chen-qingyu/Pytype") |
||||
set_description("A C++ type library that is as easy to use as Python built-in types.") |
||||
|
||||
add_urls("https://github.com/chen-qingyu/Pytype/archive/refs/tags/$(version).tar.gz", |
||||
"https://github.com/chen-qingyu/Pytype.git") |
||||
|
||||
add_versions("v1.0.0", "406f808edf4da1901c0a7a3c188c17b206c17211e03eda30fe9af38b644fbb52") |
||||
add_versions("v1.1.0", "7c287114d98542bcca022b84fa8497c67311a99219134fce3b645881851b4c03") |
||||
|
||||
on_install(function (package) |
||||
os.cp("sources/*.hpp", package:installdir("include/pytype")) |
||||
end) |
||||
|
||||
on_test(function (package) |
||||
assert(package:check_cxxsnippets({test = [[ |
||||
#include <cassert> |
||||
using namespace pytype; |
||||
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); |
||||
} |
||||
]]}, {configs = {languages = "c++17"}, includes = "pytype/pytype.hpp"})) |
||||
end) |
Loading…
Reference in new issue