mirror of
https://github.com/modelscope/modelscope.git
synced 2025-12-16 16:27:45 +01:00
update setup file
This commit is contained in:
3
.github/workflows/publish.yaml
vendored
3
.github/workflows/publish.yaml
vendored
@@ -24,8 +24,7 @@ jobs:
|
||||
- name: Build ModelScope
|
||||
# Build AST template before packaging
|
||||
run: |
|
||||
python -c "from modelscope.utils.ast_utils import generate_ast_template; generate_ast_template()"
|
||||
python setup.py sdist bdist_wheel
|
||||
make whl
|
||||
- name: Publish package to PyPI
|
||||
run: |
|
||||
pip install twine
|
||||
|
||||
1
Makefile
1
Makefile
@@ -18,6 +18,7 @@ test:
|
||||
|
||||
.PHONY: whl
|
||||
whl:
|
||||
python -c "from modelscope.utils.ast_utils import generate_ast_template; generate_ast_template()"
|
||||
python setup.py sdist --dist-dir $(WHL_BUILD_DIR)/dist bdist_wheel --dist-dir $(WHL_BUILD_DIR)/dist
|
||||
|
||||
.PHONY: clean
|
||||
|
||||
@@ -120,11 +120,12 @@ def handle_http_response(response: requests.Response,
|
||||
http_error_msg = 'The request model: %s does not exist!' % (model_id)
|
||||
elif 403 == response.status_code:
|
||||
if cookies is None:
|
||||
http_error_msg = 'Authentication token does not exist, '
|
||||
'failed to access model {model_id} which may not exist or may be '
|
||||
'private. Please login first.'
|
||||
http_error_msg = f'Authentication token does not exist, \
|
||||
failed to access model {model_id} which may not exist \
|
||||
or may be private. Please login first.'
|
||||
|
||||
else:
|
||||
http_error_msg = 'The authentication token is invalid, failed to access model {model_id}.'
|
||||
http_error_msg = f'The authentication token is invalid, failed to access model {model_id}.'
|
||||
elif 400 <= response.status_code < 500:
|
||||
http_error_msg = u'%s Client Error: %s, Request id: %s for url: %s' % (
|
||||
response.status_code, reason, request_id, response.url)
|
||||
|
||||
@@ -46,6 +46,8 @@ hub = {file = ["requirements/hub.txt"]}
|
||||
datasets = {file = ["requirements/datasets.txt"]}
|
||||
framework = {file = ["requirements/framework.txt"]}
|
||||
server = {file = ["requirements/server.txt"]}
|
||||
docs = {file = ["requirements/docs.txt"]}
|
||||
tests = {file = ["requirements/tests.txt"]}
|
||||
|
||||
# domain specific with framework base
|
||||
cv = {file = ["requirements/framework.txt", "requirements/cv.txt"]}
|
||||
@@ -59,9 +61,12 @@ audio_codec = {file = ["requirements/framework.txt", "requirements/audio/audio
|
||||
audio_tts = {file = ["requirements/framework.txt", "requirements/audio/audio_tts.txt"]}
|
||||
audio_kws = {file = ["requirements/framework.txt", "requirements/audio/audio_kws.txt"]}
|
||||
audio_signal = {file = ["requirements/framework.txt", "requirements/audio/audio_signal.txt"]}
|
||||
|
||||
docs = {file = ["requirements/docs.txt"]}
|
||||
tests = {file = ["requirements/tests.txt"]}
|
||||
audio = {file = ["requirements/framework.txt",
|
||||
"requirements/audio/audio_asr.txt",
|
||||
"requirements/audio/audio_codec.txt",
|
||||
"requirements/audio/audio_tts.txt",
|
||||
"requirements/audio/audio_kws.txt",
|
||||
"requirements/audio/audio_signal.txt"]}
|
||||
|
||||
# skip audio requirements due to its hard dependency which may cause installation failure
|
||||
all = {file = [
|
||||
|
||||
Reference in New Issue
Block a user