setup.py 7.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166
  1. #
  2. # Copyright 2018-2022 Elyra Authors
  3. #
  4. # Licensed under the Apache License, Version 2.0 (the "License");
  5. # you may not use this file except in compliance with the License.
  6. # You may obtain a copy of the License at
  7. #
  8. # http://www.apache.org/licenses/LICENSE-2.0
  9. #
  10. # Unless required by applicable law or agreed to in writing, software
  11. # distributed under the License is distributed on an "AS IS" BASIS,
  12. # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  13. # See the License for the specific language governing permissions and
  14. # limitations under the License.
  15. #
  16. import os
  17. from jupyter_packaging import get_data_files
  18. from setuptools import setup, find_packages
  19. long_desc = """
  20. Elyra is a set of AI centric extensions to JupyterLab. It aims to help data scientists,
  21. machine learning engineers and AI developer’s through the model development life cycle complexities.
  22. """
  23. here = os.path.abspath(os.path.dirname(__file__))
  24. version_ns = {}
  25. with open(os.path.join(here, "elyra", "_version.py")) as f:
  26. exec(f.read(), {}, version_ns)
  27. data_files_spec = [
  28. ("etc/jupyter/jupyter_notebook_config.d", "etc/config/jupyter_notebook_config.d", "*.json"),
  29. ("etc/jupyter/jupyter_server_config.d", "etc/config/jupyter_server_config.d", "*.json"),
  30. ("etc/jupyter/labconfig", "etc/config/settings", "*.json"),
  31. ("share/jupyter/metadata/runtime-images", "etc/config/metadata/runtime-images", "*.json"),
  32. ("share/jupyter/metadata/component-catalogs", "etc/config/metadata/component-catalogs", "*.json"), # deprecated
  33. ("share/jupyter/components", "etc/config/components", "*.json"), # deprecated
  34. ("share/jupyter/components/kfp/", "etc/config/components/kfp", "*.yaml"), # deprecated
  35. ("share/jupyter/components/airflow/", "etc/config/components/airflow", "*.py"), # deprecated
  36. ("share/jupyter/labextensions", "dist/labextensions", "**"),
  37. ]
  38. runtime_extras = {
  39. "kfp-tekton": [
  40. "kfp-tekton~=1.2.0",
  41. ], # See elyra-ai/elyra/pull/2034 for fix pack pinning
  42. # Kubeflow Pipelines example components
  43. # (https://github.com/elyra-ai/examples/tree/master/component-catalog-connectors/kfp-example-components-connector)
  44. "kfp-examples": ["elyra-examples-kfp-catalog"],
  45. # Use gitlab as Airflow DAG repository
  46. "gitlab": ["python-gitlab"],
  47. }
  48. runtime_extras["all"] = list(set(sum(runtime_extras.values(), [])))
  49. setup_args = dict(
  50. name="elyra",
  51. version=version_ns["__version__"],
  52. url="https://github.com/elyra-ai/elyra",
  53. description="Elyra provides AI Centric extensions to JupyterLab",
  54. long_description=long_desc,
  55. author="Elyra Maintainers",
  56. license="Apache License Version 2.0",
  57. data_files=get_data_files(data_files_spec),
  58. packages=find_packages(),
  59. install_requires=[
  60. "autopep8>=1.5.0",
  61. "click>=8", # elyra-ai/elyra#2579
  62. "colorama",
  63. "deprecation",
  64. "entrypoints>=0.3",
  65. "jinja2>=3",
  66. "jsonschema>=3.2.0,<4.0", # Cap from kfp
  67. "jupyter_core>=4.6.0",
  68. "jupyter_client>=6.1.7",
  69. "jupyter-packaging>=0.10",
  70. "jupyter_server>=1.7.0",
  71. "jupyterlab>=3.4.0", # comment out to use local jupyterlab
  72. # "jupyterlab-lsp>=3.8.0", # comment out to use local jupyterlab
  73. # "jupyterlab-git~=0.32", # Avoid breaking 1.x changes
  74. # "jupyter-resource-usage>=0.5.1",
  75. "MarkupSafe>=2.1",
  76. "minio>=7.0.0",
  77. "nbclient>=0.5.1",
  78. "nbconvert>=6.4.5",
  79. "nbdime~=3.1", # Cap from jupyterlab-git
  80. "nbformat>=5.1.2",
  81. "networkx>=2.5.1",
  82. "papermill>=2.3.4",
  83. # "python-lsp-server[all]>=1.1.0",
  84. "pyyaml>=5.3.1,<6.0", # Cap from kfp
  85. "requests>=2.25.1",
  86. "rfc3986-validator>=0.1.1",
  87. "tornado>=6.1.0",
  88. "typing-extensions>=3.10,<4", # Cap from kfp
  89. "traitlets>=4.3.2",
  90. "urllib3>=1.26.5",
  91. "watchdog>=2.1.3",
  92. "websocket-client",
  93. "yaspin",
  94. # KFP runtime dependencies
  95. # "kfp>=1.7.0,<2.0,!=1.7.2", # We cap the SDK to <2.0 due to possible breaking changes
  96. # Airflow runtime dependencies
  97. "pygithub",
  98. "black<=21.12b0", # Cap due to psf/black#2846
  99. ],
  100. extras_require={
  101. "test": ["elyra-examples-kfp-catalog", "pytest", "pytest-tornasync"],
  102. **runtime_extras,
  103. },
  104. include_package_data=True,
  105. classifiers=[
  106. "License :: OSI Approved :: Apache Software License",
  107. "Operating System :: OS Independent",
  108. "Topic :: Scientific/Engineering",
  109. "Topic :: Scientific/Engineering :: Artificial Intelligence",
  110. "Topic :: Software Development",
  111. "Topic :: Software Development :: Libraries",
  112. "Topic :: Software Development :: Libraries :: Python Modules",
  113. "Programming Language :: Python :: 3.7",
  114. "Programming Language :: Python :: 3.8",
  115. "Programming Language :: Python :: 3.9",
  116. "Programming Language :: Python :: 3.10",
  117. ],
  118. entry_points={
  119. "console_scripts": [
  120. "elyra-metadata = elyra.metadata.metadata_app:MetadataApp.main",
  121. "elyra-pipeline = elyra.cli.pipeline_app:pipeline",
  122. "jupyter-elyra = elyra.elyra_app:launch_instance",
  123. ],
  124. "metadata.schemaspaces": [
  125. "runtimes = elyra.metadata.schemaspaces:Runtimes",
  126. "runtimes-images = elyra.metadata.schemaspaces:RuntimeImages",
  127. "code-snippets = elyra.metadata.schemaspaces:CodeSnippets",
  128. "component-catalogs = elyra.metadata.schemaspaces:ComponentCatalogs",
  129. "metadata-tests = elyra.tests.metadata.test_utils:MetadataTestSchemaspace",
  130. ],
  131. "metadata.schemas_providers": [
  132. "runtimes = elyra.metadata.schemasproviders:RuntimesSchemas",
  133. "runtimes-images = elyra.metadata.schemasproviders:RuntimeImagesSchemas",
  134. "code-snippets = elyra.metadata.schemasproviders:CodeSnippetsSchemas",
  135. "component-catalogs = elyra.metadata.schemasproviders:ComponentCatalogsSchemas",
  136. "airflow-provider-package-catalog-schema = elyra.pipeline.airflow.provider_package_catalog_connector.airflow_provider_package_schema_provider:AirflowProviderPackageSchemasProvider", # noqa: E501
  137. "airflow-package-catalog-schema = elyra.pipeline.airflow.package_catalog_connector.airflow_package_schema_provider:AirflowPackageSchemasProvider", # noqa: E501
  138. "metadata-tests = elyra.tests.metadata.test_utils:MetadataTestSchemasProvider",
  139. ],
  140. "elyra.pipeline.processors": [
  141. "local = elyra.pipeline.local.processor_local:LocalPipelineProcessor",
  142. "airflow = elyra.pipeline.airflow.processor_airflow:AirflowPipelineProcessor",
  143. "kfp = elyra.pipeline.kfp.processor_kfp:KfpPipelineProcessor",
  144. ],
  145. "elyra.component.catalog_types": [
  146. "url-catalog = elyra.pipeline.catalog_connector:UrlComponentCatalogConnector",
  147. "local-file-catalog = elyra.pipeline.catalog_connector:FilesystemComponentCatalogConnector",
  148. "local-directory-catalog = elyra.pipeline.catalog_connector:DirectoryComponentCatalogConnector",
  149. "airflow-provider-package-catalog = elyra.pipeline.airflow.provider_package_catalog_connector.airflow_provider_package_catalog_connector:AirflowProviderPackageCatalogConnector", # noqa: E501
  150. "airflow-package-catalog = elyra.pipeline.airflow.package_catalog_connector.airflow_package_catalog_connector:AirflowPackageCatalogConnector", # noqa: E501
  151. ],
  152. "papermill.engine": [
  153. "ElyraEngine = elyra.pipeline.elyra_engine:ElyraEngine",
  154. ],
  155. },
  156. )
  157. if __name__ == "__main__":
  158. setup(**setup_args)