Skip to content

Commit 0569354

Browse files
authored
refactor: refactor the setup.py file (#6038)
1 parent 034a7b1 commit 0569354

File tree

1 file changed

+16
-8
lines changed

1 file changed

+16
-8
lines changed

setup.py

Lines changed: 16 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,14 @@
99
from setuptools.command.egg_info import egg_info
1010
from setuptools.command.install import install
1111

12+
AUTHOR_NAME = 'Jina AI'
13+
AUTHOR_EMAIL = '[email protected]'
14+
LICENSE = 'Apache 2.0'
15+
GITHUB_REPO = 'https://github.com/jina-ai/jina/'
16+
DOWNLOAD_URL = 'https://github.com/jina-ai/jina/tags'
17+
DOCUMENTATION = 'https://docs.jina.ai'
18+
TRACKER = 'https://github.com/jina-ai/jina/issues'
19+
1220
if sys.version_info < (3, 7, 0):
1321
raise OSError(f'Jina requires Python >=3.7, but yours is {sys.version}')
1422

@@ -194,11 +202,11 @@ def get_extra_requires(path, add_all=True):
194202
version=__version__,
195203
include_package_data=True,
196204
description='Multimodal AI services & pipelines with cloud-native stack: gRPC, Kubernetes, Docker, OpenTelemetry, Prometheus, Jaeger, etc.',
197-
author='Jina AI',
198-
author_email='[email protected]',
199-
license='Apache 2.0',
200-
url='https://github.com/jina-ai/jina/',
201-
download_url='https://github.com/jina-ai/jina/tags',
205+
author= AUTHOR_NAME,
206+
author_email= AUTHOR_EMAIL,
207+
license= LICENSE,
208+
url= GITHUB_REPO,
209+
download_url= DOWNLOAD_URL,
202210
long_description=_long_description,
203211
long_description_content_type='text/markdown',
204212
zip_safe=False,
@@ -240,9 +248,9 @@ def get_extra_requires(path, add_all=True):
240248
'Topic :: Software Development :: Libraries :: Python Modules',
241249
],
242250
project_urls={
243-
'Documentation': 'https://docs.jina.ai',
244-
'Source': 'https://github.com/jina-ai/jina/',
245-
'Tracker': 'https://github.com/jina-ai/jina/issues',
251+
'Documentation': DOCUMENTATION,
252+
'Source': GITHUB_REPO,
253+
'Tracker': TRACKER,
246254
},
247255
keywords='jina cloud-native cross-modal multimodal neural-search query search index elastic neural-network encoding '
248256
'embedding serving docker container image video audio deep-learning mlops',

0 commit comments

Comments
 (0)