-
Notifications
You must be signed in to change notification settings - Fork 334
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Prepare for python package release (#42)
* Use pyproject.toml for project packaging * Adjust MANIFEST to reduce sdist size * Add python release action
- Loading branch information
Showing
6 changed files
with
103 additions
and
30 deletions.
There are no files selected for viewing
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
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,40 @@ | ||
# This workflow will upload a Python Package using Twine when a release is created | ||
# For more information see: https://docs.github.com/en/actions/automating-builds-and-tests/building-and-testing-python#publishing-to-package-registries | ||
|
||
# This workflow uses actions that are not certified by GitHub. | ||
# They are provided by a third-party and are governed by | ||
# separate terms of service, privacy policy, and support | ||
# documentation. | ||
|
||
name: Upload Python Package | ||
|
||
on: | ||
release: | ||
types: [published] | ||
|
||
permissions: | ||
contents: read | ||
|
||
jobs: | ||
deploy: | ||
|
||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- uses: actions/checkout@v3 | ||
with: | ||
submodules: true | ||
- name: Set up Python | ||
uses: actions/setup-python@v4 | ||
with: | ||
python-version: '3.10' | ||
- name: Install dependencies | ||
run: | | ||
python -m pip install --upgrade pip | ||
pip install build | ||
- name: Build package | ||
run: python -m build --sdist | ||
- name: Publish package | ||
uses: pypa/gh-action-pypi-publish@release/v1 | ||
with: | ||
password: ${{ secrets.PYPI_API_TOKEN }} |
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,15 @@ | ||
global-include CMakeLists.txt *.cmake README.md LICENSE | ||
include *.cpp *.h | ||
|
||
# ggml | ||
graft third_party/ggml/include | ||
graft third_party/ggml/src | ||
|
||
# pybind11 | ||
graft third_party/pybind11/include | ||
graft third_party/pybind11/tools | ||
|
||
# sentencepiece | ||
graft third_party/sentencepiece/src | ||
graft third_party/sentencepiece/third_party | ||
include third_party/sentencepiece/* |
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
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,32 @@ | ||
[build-system] | ||
requires = [ | ||
"setuptools>=42", | ||
"cmake>=3.12", | ||
] | ||
build-backend = "setuptools.build_meta" | ||
|
||
[project] | ||
name = "chatglm-cpp" | ||
authors = [ | ||
{name = "Jiahao Li", email = "liplus17@163.com"}, | ||
] | ||
maintainers = [ | ||
{name = "Jiahao Li", email = "liplus17@163.com"}, | ||
] | ||
description = "C++ implementation of ChatGLM-6B & ChatGLM2-6B" | ||
readme = "README.md" | ||
requires-python = ">=3.7" | ||
keywords = ["ChatGLM", "ChatGLM2", "Large Language Model"] | ||
license = {text = "MIT License"} | ||
classifiers = [ | ||
"Development Status :: 3 - Alpha", | ||
"Intended Audience :: Science/Research", | ||
"Topic :: Scientific/Engineering :: Artificial Intelligence", | ||
"License :: OSI Approved :: MIT License", | ||
"Programming Language :: Python :: 3", | ||
] | ||
dynamic = ["version"] | ||
|
||
[project.urls] | ||
Homepage = "https://github.com/li-plus/chatglm.cpp" | ||
Repository = "https://github.com/li-plus/chatglm.cpp.git" |
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