mirror of
https://github.com/infiniflow/ragflow.git
synced 2025-12-08 20:42:30 +08:00
Manage ragflow-sdk with poetry (#3115)
### What problem does this PR solve? Manage ragflow-sdk with poetry ### Type of change - [x] Refactoring
This commit is contained in:
@ -1,41 +1,9 @@
|
||||
# python-ragflow
|
||||
# ragflow-sdk
|
||||
|
||||
# update python client
|
||||
|
||||
- Update "version" field of [project] chapter
|
||||
- Build new python SDK
|
||||
- Upload to pypi.org
|
||||
- Install new python SDK
|
||||
|
||||
# build python SDK
|
||||
# build and publish python SDK to pypi.org
|
||||
|
||||
```shell
|
||||
rm -f dist/* && python setup.py sdist bdist_wheel
|
||||
```
|
||||
|
||||
# install python SDK
|
||||
```shell
|
||||
pip uninstall -y ragflow && pip install dist/*.whl
|
||||
```
|
||||
|
||||
This will install ragflow-sdk and its dependencies.
|
||||
|
||||
# upload to pypi.org
|
||||
```shell
|
||||
twine upload dist/*.whl
|
||||
```
|
||||
|
||||
Enter your pypi API token according to the prompt.
|
||||
|
||||
Note that pypi allows a version of a package [be uploaded only once](https://pypi.org/help/#file-name-reuse). You need to change the `version` inside the `pyproject.toml` before building and uploading.
|
||||
|
||||
# using
|
||||
|
||||
```python
|
||||
|
||||
```
|
||||
|
||||
# For developer
|
||||
```shell
|
||||
pip install -e .
|
||||
poetry build
|
||||
poetry config pypi-token.pypi $YOUR_PYPI_API_TOKEN
|
||||
poetry publish
|
||||
```
|
||||
|
||||
Reference in New Issue
Block a user