setup.py 1.6 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253
  1. import setuptools
  2. from version import major, minor, revision
  3. def _get_long_description() -> str:
  4. """
  5. Returns long description from `README.md` if possible, else 'Pulseq in Python'.
  6. Returns
  7. -------
  8. str
  9. Long description of PyPulseq project.
  10. """
  11. try: # Unicode decode error on Windows
  12. with open("README.md", "r") as fh:
  13. long_description = fh.read()
  14. except:
  15. long_description = "Pulseq in Python"
  16. return long_description
  17. setuptools.setup(
  18. author="Keerthi Sravan Ravi",
  19. author_email="ks3621@columbia.edu",
  20. classifiers=[
  21. "Programming Language :: Python :: 3.6",
  22. "Programming Language :: Python :: 3.7",
  23. "License :: OSI Approved :: GNU Affero General Public License v3",
  24. "Operating System :: OS Independent",
  25. ],
  26. description="Pulseq in Python",
  27. include_package_data=True,
  28. install_requires=[
  29. "coverage>=6.2",
  30. "matplotlib>=3.5.2",
  31. "numpy>=1.19.5",
  32. "scipy>=1.8.1",
  33. "sigpy==0.1.23",
  34. ],
  35. license="License :: OSI Approved :: GNU Affero General Public License v3",
  36. long_description=_get_long_description(),
  37. long_description_content_type="text/markdown",
  38. name="pypulseq",
  39. packages=setuptools.find_packages(),
  40. py_modules=["version"],
  41. # package_data for wheel distributions; MANIFEST.in for source distributions
  42. package_data={"pypulseq.SAR": ["QGlobal.mat"]},
  43. project_urls={"Documentation": "https://pypulseq.readthedocs.io/en/latest/"},
  44. python_requires=">=3.6.3",
  45. url="https://github.com/imr-framework/pypulseq",
  46. version=".".join((str(major), str(minor), str(revision))),
  47. )