1- # Usage
1+ # cmake-example
2+
3+ Online document: ** [ readthedocs] ( http://cmake-example.readthedocs.io/ ) **
4+
5+ <!-- intro-start-->
6+
7+ ## Usage
8+
9+ Install:
210
311``` bash
412python3 -m pip install cubao_cmake_example # install from pypi
513python3 -c ' import cubao_cmake_example; print(cubao_cmake_example.add(1, 2))'
614```
715
16+ CLI interface: (created with [ python-fire] ( https://github.com/google/python-fire ) )
17+
818``` bash
919python3 -m cubao_cmake_example add 1 2
1020python3 -m cubao_cmake_example subtract 9 4
1121```
1222
23+ Help:
24+
25+ ``` bash
26+ $ python3 -m cubao_cmake_example --help
27+ INFO: Showing help with the command ' __main__.py -- --help' .
28+
29+ NAME
30+ __main__.py
31+
32+ SYNOPSIS
33+ __main__.py GROUP | COMMAND
34+
35+ GROUPS
36+ GROUP is one of the following:
37+
38+ fire
39+ The Python Fire module.
40+
41+ COMMANDS
42+ COMMAND is one of the following:
43+
44+ add
45+ add(arg0: int, arg1: int) -> int
46+
47+ subtract
48+ subtract(arg0: int, arg1: int) -> int
49+
50+ pure_python_func
51+ ```
52+
1353``` bash
1454$ python3 -m cubao_cmake_example pure_python_func --help
1555INFO: Showing help with the command ' __main__.py pure_python_func -- --help' .
@@ -30,21 +70,19 @@ FLAGS
3070 --arg3=ARG3
3171 Type: str
3272 Default: ' you shall not pass'
33- ```
3473
35- ``` bash
3674$ python3 -m cubao_cmake_example pure_python_func --arg1=43234
3775int: 43234, float: 3.14, str: you shall not pass
3876```
3977
40- See more examples at [ cubao ] ( https://github.com/cubao ) , e.g.:
78+ <!-- intro-end -->
4179
42- - [ pybind11-rdp] ( https://github.com/cubao/pybind11-rdp ) : C++ implementation
43- of the Ramer-Douglas-Peucker algorithm (binding to python via pybind11)
44- - [ concave_hull] ( https://github.com/cubao/concave_hull ) : A very fast 2D concave hull algorithm, for python
80+ ---
4581
4682# Make a release
4783
84+ (We now use Github Workflow to release to pypi. Skip the rest if you don't want to manually compile wheels.)
85+
4886## On linux
4987
5088Install docker then
0 commit comments