-
-
Notifications
You must be signed in to change notification settings - Fork 398
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
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 <[email protected]>
- Loading branch information
1 parent
ca551c2
commit 3f37633
Showing
2 changed files
with
27 additions
and
27 deletions.
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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) |