setup.py 3.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128
  1. # Licensed to the Apache Software Foundation (ASF) under one
  2. # or more contributor license agreements. See the NOTICE file
  3. # distributed with this work for additional information
  4. # regarding copyright ownership. The ASF licenses this file
  5. # to you under the Apache License, Version 2.0 (the
  6. # "License"); you may not use this file except in compliance
  7. # with the License. You may obtain a copy of the License at
  8. #
  9. # http://www.apache.org/licenses/LICENSE-2.0
  10. #
  11. # Unless required by applicable law or agreed to in writing,
  12. # software distributed under the License is distributed on an
  13. # "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
  14. # KIND, either express or implied. See the License for the
  15. # specific language governing permissions and limitations
  16. # under the License.
  17. """The script for setting up pydolphinscheduler."""
  18. import sys
  19. from os.path import dirname, join
  20. from setuptools import find_packages, setup
  21. if sys.version_info[0] < 3:
  22. raise Exception(
  23. "pydolphinscheduler does not support Python 2. Please upgrade to Python 3."
  24. )
  25. version = "0.1.0"
  26. # Start package required
  27. prod = [
  28. "py4j~=0.10",
  29. ]
  30. doc = [
  31. "sphinx>=4.3",
  32. "sphinx_rtd_theme>=1.0",
  33. ]
  34. test = [
  35. "pytest>=6.2",
  36. "freezegun>=1.1",
  37. "coverage>=6.1",
  38. ]
  39. style = [
  40. "flake8>=4.0",
  41. "flake8-docstrings>=1.6",
  42. "flake8-black>=0.2",
  43. "isort>=5.10",
  44. ]
  45. dev = style + test + doc
  46. all_dep = prod + dev
  47. # End package required
  48. def read(*names, **kwargs):
  49. """Read file content from given file path."""
  50. return open(
  51. join(dirname(__file__), *names), encoding=kwargs.get("encoding", "utf8")
  52. ).read()
  53. setup(
  54. name="apache-dolphinscheduler",
  55. version=version,
  56. license="Apache License 2.0",
  57. description="Apache DolphinScheduler Python API",
  58. long_description=read("README.md"),
  59. # Make sure pypi is expecting markdown
  60. long_description_content_type="text/markdown",
  61. author="Apache Software Foundation",
  62. author_email="dev@dolphinscheduler.apache.org",
  63. url="https://dolphinscheduler.apache.org/",
  64. python_requires=">=3.6",
  65. keywords=[
  66. "dolphinscheduler",
  67. "workflow",
  68. "scheduler",
  69. "taskflow",
  70. ],
  71. project_urls={
  72. "Homepage": "https://dolphinscheduler.apache.org",
  73. "Documentation": "https://dolphinscheduler.apache.org/python/index.html",
  74. "Source": "https://github.com/apache/dolphinscheduler/dolphinscheduler-python/pydolphinscheduler",
  75. "Issue Tracker": "https://github.com/apache/dolphinscheduler/issues",
  76. "Discussion": "https://github.com/apache/dolphinscheduler/discussions",
  77. "Twitter": "https://twitter.com/dolphinschedule",
  78. },
  79. packages=find_packages(where="src"),
  80. package_dir={"": "src"},
  81. include_package_data=True,
  82. package_data={
  83. "examples": ["examples.tutorial.py"],
  84. },
  85. platforms=["any"],
  86. classifiers=[
  87. # complete classifier list: http://pypi.python.org/pypi?%3Aaction=list_classifiers
  88. "Development Status :: 3 - Alpha",
  89. "Environment :: Console",
  90. "Intended Audience :: Developers",
  91. "License :: OSI Approved :: Apache Software License",
  92. "Operating System :: Unix",
  93. "Operating System :: POSIX",
  94. "Operating System :: Microsoft :: Windows",
  95. "Programming Language :: Python",
  96. "Programming Language :: Python :: 3",
  97. "Programming Language :: Python :: 3.6",
  98. "Programming Language :: Python :: 3.7",
  99. "Programming Language :: Python :: 3.8",
  100. "Programming Language :: Python :: 3.9",
  101. "Programming Language :: Python :: Implementation :: CPython",
  102. "Programming Language :: Python :: Implementation :: PyPy",
  103. "Topic :: Software Development :: User Interfaces",
  104. ],
  105. install_requires=prod,
  106. extras_require={
  107. "all": all_dep,
  108. "dev": dev,
  109. "style": style,
  110. "test": test,
  111. "doc": doc,
  112. },
  113. )