setup.py 2.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100
  1. DESCRIPTION = "SparkMagic: Spark execution via Livy"
  2. NAME = "sparkmagic"
  3. PACKAGES = [
  4. "sparkmagic",
  5. "sparkmagic/controllerwidget",
  6. "sparkmagic/kernels",
  7. "sparkmagic/livyclientlib",
  8. "sparkmagic/auth",
  9. "sparkmagic/magics",
  10. "sparkmagic/kernels/pysparkkernel",
  11. "sparkmagic/kernels/sparkkernel",
  12. "sparkmagic/kernels/sparkrkernel",
  13. "sparkmagic/kernels/wrapperkernel",
  14. "sparkmagic/utils",
  15. "sparkmagic/serverextension",
  16. ]
  17. AUTHOR = "Jupyter Development Team"
  18. AUTHOR_EMAIL = "jupyter@googlegroups.org"
  19. URL = "https://github.com/jupyter-incubator/sparkmagic"
  20. DOWNLOAD_URL = "https://github.com/jupyter-incubator/sparkmagic"
  21. LICENSE = "BSD 3-clause"
  22. import io
  23. import os
  24. import re
  25. from distutils.core import setup
  26. def read(path, encoding="utf-8"):
  27. path = os.path.join(os.path.dirname(__file__), path)
  28. with io.open(path, encoding=encoding) as fp:
  29. return fp.read()
  30. def version(path):
  31. """Obtain the package version from a python file e.g. pkg/__init__.py.
  32. See <https://packaging.python.org/en/latest/single_source_version.html>.
  33. """
  34. version_file = read(path)
  35. version_match = re.search(
  36. r"""^__version__ = ['"]([^'"]*)['"]""", version_file, re.M
  37. )
  38. if version_match:
  39. return version_match.group(1)
  40. raise RuntimeError("Unable to find version string.")
  41. VERSION = version("sparkmagic/__init__.py")
  42. setup(
  43. name=NAME,
  44. version=VERSION,
  45. description=DESCRIPTION,
  46. author=AUTHOR,
  47. author_email=AUTHOR_EMAIL,
  48. url=URL,
  49. download_url=DOWNLOAD_URL,
  50. license=LICENSE,
  51. packages=PACKAGES,
  52. include_package_data=True,
  53. package_data={
  54. "sparkmagic": [
  55. "kernels/pysparkkernel/kernel.js",
  56. "kernels/pysparkkernel/logo-32x32.png",
  57. "kernels/pysparkkernel/logo-64x64.png",
  58. "kernels/sparkkernel/kernel.js",
  59. "kernels/sparkrkernel/kernel.js",
  60. "kernels/pysparkkernel/kernel.json",
  61. "kernels/sparkkernel/kernel.json",
  62. "kernels/sparkrkernel/kernel.json",
  63. ]
  64. },
  65. classifiers=[
  66. "Development Status :: 4 - Beta",
  67. "Environment :: Console",
  68. "Intended Audience :: Science/Research",
  69. "License :: OSI Approved :: BSD License",
  70. "Natural Language :: English",
  71. "Programming Language :: Python :: 3.7",
  72. ],
  73. install_requires=[
  74. "hdijupyterutils>=0.6",
  75. "autovizwidget>=0.6",
  76. "ipython>=5",
  77. "nose",
  78. "mock",
  79. "pandas>=0.17.1",
  80. "numpy",
  81. "requests",
  82. "ipykernel>=4.2.2",
  83. "ipywidgets>5.0.0",
  84. "notebook>=4.2",
  85. "tornado>=4",
  86. "requests_kerberos>=0.8.0",
  87. "nest_asyncio==1.5.5",
  88. ],
  89. )