Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

rename project: mds -> pytype #3147

Merged
merged 10 commits into from
Jan 23, 2024
27 changes: 0 additions & 27 deletions packages/m/mds/xmake.lua

This file was deleted.

27 changes: 27 additions & 0 deletions packages/p/pytype/xmake.lua
Original file line number Diff line number Diff line change
@@ -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