You can not select more than 25 topics Topics must start with a chinese character,a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 

89 lines
3.0 kB

  1. # -*- coding: utf-8 -*-
  2. import io
  3. import os
  4. import re
  5. from setuptools import find_packages
  6. from setuptools import setup
  7. try:
  8. import pkg_resources
  9. installed_packages = pkg_resources.working_set
  10. for i in installed_packages:
  11. if i.key == 'brainpy-simulator':
  12. raise SystemError('Please uninstall the older version of brainpy '
  13. f'package "brainpy-simulator={i.version}" '
  14. f'(located in {i.location}) first. \n'
  15. '>>> pip uninstall brainpy-simulator')
  16. if i.key == 'brain-py':
  17. raise SystemError('Please uninstall the older version of brainpy '
  18. f'package "brain-py={i.version}" '
  19. f'(located in {i.location}) first. \n'
  20. '>>> pip uninstall brain-py')
  21. except ModuleNotFoundError:
  22. pass
  23. # version
  24. here = os.path.abspath(os.path.dirname(__file__))
  25. with open(os.path.join(here, 'brainpy', '__init__.py'), 'r') as f:
  26. init_py = f.read()
  27. version = re.search('__version__ = "(.*)"', init_py).groups()[0]
  28. # obtain long description from README
  29. with io.open(os.path.join(here, 'README.md'), 'r', encoding='utf-8') as f:
  30. README = f.read()
  31. # setup
  32. setup(
  33. name='brainpy',
  34. version=version,
  35. description='BrainPy: Brain Dynamics Programming in Python',
  36. long_description=README,
  37. long_description_content_type="text/markdown",
  38. author='BrainPy Team',
  39. author_email='chao.brain@qq.com',
  40. packages=find_packages(),
  41. python_requires='>=3.7',
  42. install_requires=[
  43. 'numpy>=1.15',
  44. 'jax>=0.3.0',
  45. 'tqdm',
  46. ],
  47. extras_require={
  48. 'cpu': ['jaxlib>=0.3.0', 'brainpylib>=0.0.6'],
  49. 'cuda': ['jaxlib>=0.3.0', 'brainpylib>=0.0.6'],
  50. 'all': ['jaxlib>=0.3.0', 'brainpylib>=0.0.6', 'numba>=0.50', 'scipy>=1.1.0', 'matplotlib']
  51. },
  52. url='https://github.com/PKU-NIP-Lab/BrainPy',
  53. project_urls={
  54. "Bug Tracker": "https://github.com/PKU-NIP-Lab/BrainPy/issues",
  55. "Documentation": "https://brainpy.readthedocs.io/",
  56. "Source Code": "https://github.com/PKU-NIP-Lab/BrainPy",
  57. },
  58. keywords='computational neuroscience, '
  59. 'brain-inspired computation, '
  60. 'dynamical systems, '
  61. 'differential equations, '
  62. 'brain modeling, '
  63. 'brain dynamics programming',
  64. classifiers=[
  65. 'Natural Language :: English',
  66. 'Operating System :: OS Independent',
  67. 'Programming Language :: Python',
  68. 'Programming Language :: Python :: 3',
  69. 'Programming Language :: Python :: 3.7',
  70. 'Programming Language :: Python :: 3.8',
  71. 'Programming Language :: Python :: 3.9',
  72. 'Programming Language :: Python :: 3.10',
  73. 'Intended Audience :: Science/Research',
  74. 'License :: OSI Approved :: GNU General Public License v3 (GPLv3)',
  75. 'Topic :: Scientific/Engineering :: Bio-Informatics',
  76. 'Topic :: Scientific/Engineering :: Mathematics',
  77. 'Topic :: Scientific/Engineering :: Artificial Intelligence',
  78. 'Topic :: Software Development :: Libraries',
  79. ],
  80. license='GPL-3.0 License',
  81. )