towhee

Форк
0
/
setup.py 
79 строк · 3.1 Кб
1
# Copyright 2021 Zilliz. All rights reserved.
2
#
3
# Licensed under the Apache License, Version 2.0 (the "License");
4
# you may not use this file except in compliance with the License.
5
# You may obtain a copy of the License at
6
#
7
#     http://www.apache.org/licenses/LICENSE-2.0
8
#
9
# Unless required by applicable law or agreed to in writing, software
10
# distributed under the License is distributed on an "AS IS" BASIS,
11
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12
# See the License for the specific language governing permissions and
13
# limitations under the License.
14

15
import sys
16
import unittest
17
from pathlib import Path
18
from typing import List
19

20
from setuptools import find_packages, setup
21
from setuptools.command.install import install
22

23

24
def test_suite():
25
    test_loader = unittest.TestLoader()
26
    test_suite = test_loader.discover('towhee/tests', pattern='test_*.py')
27
    return test_suite
28

29

30
def parse_requirements(file_name: str) -> List[str]:
31
    with open(file_name) as f:
32
        return [
33
            require.strip() for require in f
34
            if require.strip() and not require.startswith('#')
35
        ]
36

37
if '--models' in sys.argv:
38
    sys.argv.remove('--models')
39
    setup(name='towhee.models',
40
          version='1.1.3',
41
          description='',
42
          author='Towhee Team',
43
          author_email='towhee-team@zilliz.com',
44
          use_scm_version={'local_scheme': 'no-local-version'},
45
          setup_requires=['setuptools_scm'],
46
          url='https://github.com/towhee-io/towhee',
47
          test_suite='setup.test_suite',
48
          install_requires=parse_requirements('requirements.txt'),
49
          extras_require={':python_version<\'3.7\'': 'importlib-resources'},
50
          tests_require=parse_requirements('test_requirements.txt'),
51
          packages=find_packages(include=['towhee.models*']),#['towhee.models'],
52
          package_data={'towhee.tests.test_util': ['*.yaml']},
53
          namespace_package = ['towhee'],
54
          include_package_data=True,
55
          license='http://www.apache.org/licenses/LICENSE-2.0',
56
          entry_points={
57
              'console_scripts': ['towhee=towhee.command.cmdline:main'],
58
          },
59
          long_description_content_type='text/markdown'
60
          )
61
else:
62
    setup(use_scm_version={'local_scheme': 'no-local-version'},
63
          setup_requires=['setuptools_scm'],
64
          test_suite='setup.test_suite',
65
          install_requires=parse_requirements('requirements.txt'),
66
          extras_require={':python_version<\'3.7\'': 'importlib-resources'},
67
          tests_require=parse_requirements('test_requirements.txt'),
68
          packages=find_packages(exclude=['*test*', 'towhee.models*']),
69
          namespace_package=['towhee'],
70
          package_data={'towhee.tests.test_util': ['*.yaml'], 'towhee.serve.triton.dockerfiles': ['*']},
71
          license='http://www.apache.org/licenses/LICENSE-2.0',
72
          entry_points={
73
              'console_scripts': [
74
                  'towhee=towhee.command.cmdline:main',
75
                  'triton_builder=towhee.serve.triton.pipeline_builder:main',
76
              ],
77
          },
78
          long_description_content_type='text/markdown'
79
          )
80

Использование cookies

Мы используем файлы cookie в соответствии с Политикой конфиденциальности и Политикой использования cookies.

Нажимая кнопку «Принимаю», Вы даете АО «СберТех» согласие на обработку Ваших персональных данных в целях совершенствования нашего веб-сайта и Сервиса GitVerse, а также повышения удобства их использования.

Запретить использование cookies Вы можете самостоятельно в настройках Вашего браузера.