From 7d6a590e39afca29fb5220aa3d2c70083bd84f1b Mon Sep 17 00:00:00 2001 From: blueloveTH Date: Tue, 17 Sep 2024 18:47:38 +0800 Subject: [PATCH] ... --- .github/workflows/website.yml | 2 +- README.md | 6 +++--- docs/2_0.md | 9 --------- docs/C-API/introduction.md | 2 +- docs/index.md | 7 +++++++ docs/quick-start.md | 4 ++-- docs/retype.yml | 2 +- 7 files changed, 15 insertions(+), 17 deletions(-) delete mode 100644 docs/2_0.md diff --git a/.github/workflows/website.yml b/.github/workflows/website.yml index 5727f962..a2add796 100644 --- a/.github/workflows/website.yml +++ b/.github/workflows/website.yml @@ -20,7 +20,7 @@ jobs: run: | python scripts/gen_docs.py cd docs - npm install retypeapp --global + npm install retypeapp -g retype build ################################################### - name: Setup emsdk diff --git a/README.md b/README.md index d779c6b9..aa339b74 100644 --- a/README.md +++ b/README.md @@ -25,7 +25,7 @@

--- -## This branch is in alpha stage. Old implementation was moved to v1.x branch. +## This branch is in beta stage. Old implementation was moved to v1.x branch. --- pkpy is a lightweight(~15K LOC) Python 3.x interpreter for game scripting, written in C11. @@ -56,8 +56,8 @@ You have two options to integrate pkpy into your project. #### Use the single header file -Download the `pocketpy.h` on our [GitHub Release](https://github.com/pocketpy/pocketpy/releases) page. -And `#include` it in your project. The header can only be included once. +Download the `pocketpy.h` and `pocketpy.c` on our [GitHub Release](https://github.com/pocketpy/pocketpy/releases) page. +And `#include` it in your project. #### Use CMake diff --git a/docs/2_0.md b/docs/2_0.md deleted file mode 100644 index e3cb5259..00000000 --- a/docs/2_0.md +++ /dev/null @@ -1,9 +0,0 @@ ---- -icon: log -title: 'Upgrade to v2.0' -order: 25 ---- - -pkpy v2.0 is a C11 project instead of C++17. All your existing code for v1.x won't work anymore. - -We provide two API sets for v2.0, C-API and pybind11 API (C\+\+17). If you are a C user, use the C-API. If you are a C\+\+ user, use the pybind11 API. diff --git a/docs/C-API/introduction.md b/docs/C-API/introduction.md index c4f43ca5..8d4def4f 100644 --- a/docs/C-API/introduction.md +++ b/docs/C-API/introduction.md @@ -4,7 +4,7 @@ icon: dot order: 10 --- -TBA +All public functions in the C API are prefixed with `py_` in [pocketpy.h](https://github.com/pocketpy/pocketpy/blob/main/include/pocketpy/pocketpy.h). ### `PY_RAISE` macro diff --git a/docs/index.md b/docs/index.md index 449c6ce7..142daddd 100644 --- a/docs/index.md +++ b/docs/index.md @@ -52,3 +52,10 @@ You can sponsor this project via these ways. + [Buy me a coffee](https://www.buymeacoffee.com/blueloveth) Your sponsorship will help us develop pkpy continuously. + +## Upgrade to v2.0 + +pkpy v2.0 is a C11 project instead of C++17. All your existing code for v1.x won't work anymore. + +We provide two API sets for v2.0, C-API and pybind11 API (C\+\+17). If you are a C user, use the C-API. If you are a C\+\+ user, use the pybind11 API. + diff --git a/docs/quick-start.md b/docs/quick-start.md index c6bb0daf..a585e3ab 100644 --- a/docs/quick-start.md +++ b/docs/quick-start.md @@ -8,8 +8,8 @@ You have two options to integrate pkpy into your project. #### Use the single header file -Download the `pocketpy.h` on our [GitHub Release](https://github.com/pocketpy/pocketpy/releases) page. -And `#include` it in your project. The header can only be included once. +Download the `pocketpy.h` and `pocketpy.c` on our [GitHub Release](https://github.com/pocketpy/pocketpy/releases) page. +And `#include` it in your project. #### Use CMake diff --git a/docs/retype.yml b/docs/retype.yml index 0d92cd02..30ca530a 100644 --- a/docs/retype.yml +++ b/docs/retype.yml @@ -7,7 +7,7 @@ branding: logo: "./static/logo.png" favicon: "./static/logo.png" meta: - title: " | Open Source Python interpreter in 1 file" + title: " | Portable Python 3.x Interpreter in Modern C" links: - text: "Home" icon: home