setup.py 2.3 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071
  1. # -*- coding: utf-8 -*-
  2. from setuptools import setup
  3. import os
  4. import sys
  5. try:
  6. from urllib.request import urlretrieve
  7. except ImportError:
  8. from urllib import urlretrieve
  9. long_description = open("README.rst").read()
  10. with open('requirements.txt', 'r') as fp:
  11. install_requires = fp.read()
  12. extras_require = {}
  13. for extra in ['extras', 'docs', 'tests']:
  14. with open('requirements-{0}.txt'.format(extra), 'r') as fp:
  15. extras_require[extra] = fp.read()
  16. # spade specific
  17. is_64bit = sys.maxsize > 2 ** 32
  18. is_python3 = float(sys.version[0:3]) > 2.7
  19. if is_python3:
  20. if is_64bit:
  21. urlretrieve('http://www.borgelt.net/bin64/py3/fim.so',
  22. 'elephant/spade_src/fim.so')
  23. else:
  24. urlretrieve('http://www.borgelt.net/bin32/py3/fim.so',
  25. 'elephant/spade_src/fim.so')
  26. else:
  27. if is_64bit:
  28. urlretrieve('http://www.borgelt.net/bin64/py2/fim.so',
  29. 'elephant/spade_src/fim.so')
  30. else:
  31. urlretrieve('http://www.borgelt.net/bin32/py2/fim.so',
  32. 'elephant/spade_src/fim.so')
  33. setup(
  34. name="elephant",
  35. version='0.6.0',
  36. packages=['elephant', 'elephant.test'],
  37. package_data={'elephant': [
  38. os.path.join('current_source_density_src', 'test_data.mat'),
  39. os.path.join('current_source_density_src', 'LICENSE'),
  40. os.path.join('current_source_density_src', 'README.md'),
  41. os.path.join('current_source_density_src', '*.py'),
  42. os.path.join('spade_src', '*.py'),
  43. os.path.join('spade_src', 'LICENSE'),
  44. os.path.join('spade_src', '*.so')
  45. ]},
  46. install_requires=install_requires,
  47. extras_require=extras_require,
  48. author="Elephant authors and contributors",
  49. author_email="andrew.davison@unic.cnrs-gif.fr",
  50. description="Elephant is a package for analysis of electrophysiology"
  51. " data in Python",
  52. long_description=long_description,
  53. license="BSD",
  54. url='http://neuralensemble.org/elephant',
  55. classifiers=[
  56. 'Development Status :: 5 - Production/Stable',
  57. 'Intended Audience :: Science/Research',
  58. 'License :: OSI Approved :: BSD License',
  59. 'Natural Language :: English',
  60. 'Operating System :: OS Independent',
  61. 'Programming Language :: Python :: 2',
  62. 'Programming Language :: Python :: 3',
  63. 'Topic :: Scientific/Engineering']
  64. )