| #!/usr/bin/env python |
| # coding=utf-8 |
| |
| # Copyright [2020] [Apache Software Foundation] |
| # |
| # Licensed under the Apache License, Version 2.0 (the "License"); |
| # you may not use this file except in compliance with the License. |
| # You may obtain a copy of the License at |
| # |
| # http://www.apache.org/licenses/LICENSE-2.0 |
| # |
| # Unless required by applicable law or agreed to in writing, software |
| # distributed under the License is distributed on an "AS IS" BASIS, |
| # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
| # See the License for the specific language governing permissions and |
| # limitations under the License. |
| |
| from __future__ import print_function |
| import os.path |
| import os |
| import sys |
| |
| from setuptools import setup, find_packages |
| from setuptools.command.test import test as TestCommand |
| |
| # Package basic info |
| PACKAGE_NAME = 'marvin_python_toolbox' |
| PACKAGE_DESCRIPTION = 'Apache Marvin-AI Python Toolbox' |
| |
| URL = '' |
| |
| AUTHOR_NAME = 'Apache Marvin-AI Community' |
| AUTHOR_EMAIL = 'dev@marvin.apache.org' |
| |
| PYTHON_2 = False |
| PYTHON_3 = True |
| |
| # Project status |
| # (should be 'planning', 'pre-alpha', 'alpha', 'beta', 'stable', 'mature' or 'inactive'). |
| STATUS = 'planning' |
| |
| # Project topic |
| # See https://pypi.python.org/pypi?%3Aaction=list_classifiers for a list |
| TOPIC = 'Topic :: Software Development :: Libraries :: Python Modules', |
| |
| # External dependencies |
| # More info https://pythonhosted.org/setuptools/setuptools.html#declaring-dependencies |
| REQUIREMENTS_EXTERNAL = [ |
| 'docker', |
| 'configparser', |
| 'bump2version', |
| 'wget', |
| 'grpcio', |
| 'grpcio-tools', |
| 'click', |
| 'cookiecutter', |
| 'docker-compose', |
| 'matplotlib', |
| 'cryptography', |
| 'kubernetes', |
| 'requests' |
| ] |
| |
| # This is normally an empty list |
| DEPENDENCY_LINKS_EXTERNAL = [] |
| # script to be used |
| SCRIPTS = ['bin/marvin', |
| 'bin/marvin_complete', |
| 'bin/marvin-api'] |
| |
| |
| def _get_version(): |
| """Return the project version from VERSION file.""" |
| with open(os.path.join(os.path.dirname(__file__), PACKAGE_NAME, 'VERSION'), 'rb') as f: |
| version = f.read().decode('ascii').strip() |
| return version |
| |
| |
| DEVELOPMENT_STATUS = { |
| 'planning': '1 - Planning', |
| 'pre-alpha': '2 - Pre-Alpha', |
| 'alpha': 'Alpha', |
| 'beta': '4 - Beta', |
| 'stable': '5 - Production/Stable', |
| 'mature': '6 - Mature', |
| 'inactive': '7 - Inactive', |
| } |
| |
| CLASSIFIERS = ['Development Status :: {}'.format(DEVELOPMENT_STATUS[STATUS])] |
| if PYTHON_2: |
| CLASSIFIERS += [ |
| 'Programming Language :: Python :: 2', |
| 'Programming Language :: Python :: 2.7', |
| ] |
| if PYTHON_3: |
| CLASSIFIERS += [ |
| 'Programming Language :: Python :: 3', |
| 'Programming Language :: Python :: 3.6', |
| ] |
| |
| setup( |
| name=PACKAGE_NAME, |
| version=_get_version(), |
| url=URL, |
| description=PACKAGE_DESCRIPTION, |
| long_description=open(os.path.join( |
| os.path.dirname(__file__), 'README.md')).read(), |
| author=AUTHOR_NAME, |
| maintainer=AUTHOR_NAME, |
| maintainer_email=AUTHOR_EMAIL, |
| packages=find_packages(exclude=('tests', 'tests.*')), |
| include_package_data=True, |
| zip_safe=False, |
| classifiers=CLASSIFIERS, |
| install_requires=REQUIREMENTS_EXTERNAL, |
| dependency_links=DEPENDENCY_LINKS_EXTERNAL, |
| scripts=SCRIPTS, |
| ) |