setup.py 2.8 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879
  1. # freesurfer-surface - Read and Write Surface Files in Freesurfer’s TriangularSurface Format
  2. #
  3. # Copyright (C) 2020 Fabian Peter Hammerle <fabian@hammerle.me>
  4. #
  5. # This program is free software: you can redistribute it and/or modify
  6. # it under the terms of the GNU General Public License as published by
  7. # the Free Software Foundation, either version 3 of the License, or
  8. # any later version.
  9. #
  10. # This program is distributed in the hope that it will be useful,
  11. # but WITHOUT ANY WARRANTY; without even the implied warranty of
  12. # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  13. # GNU General Public License for more details.
  14. #
  15. # You should have received a copy of the GNU General Public License
  16. # along with this program. If not, see <https://www.gnu.org/licenses/>.
  17. import os
  18. import setuptools
  19. _REPO_URL = "https://github.com/fphammerle/freesurfer-surface"
  20. with open("README.rst", "r") as readme:
  21. LONG_DESCRIPTION = readme.read()
  22. setuptools.setup(
  23. name="freesurfer-surface",
  24. use_scm_version={
  25. "write_to": os.path.join("freesurfer_surface", "version.py"),
  26. # `version` triggers pylint C0103
  27. # newline after import to fix pylint C0321/multiple-statements
  28. "write_to_template": "import typing\n"
  29. + "__version__: typing.Optional[str] = '{version}'\n",
  30. },
  31. description="Python Library to Read and Write Surface Files"
  32. " in Freesurfer's TriangularSurface Format",
  33. long_description=LONG_DESCRIPTION,
  34. author="Fabian Peter Hammerle",
  35. author_email="fabian@hammerle.me",
  36. url=_REPO_URL,
  37. project_urls={"Changelog": _REPO_URL + "/blob/master/CHANGELOG.md"},
  38. license="GPLv3+",
  39. keywords=[
  40. "brain",
  41. "freesurfer",
  42. "mesh",
  43. "neuroimaging",
  44. "reader",
  45. "surface",
  46. "triangle",
  47. "vertex",
  48. ],
  49. classifiers=[
  50. "Development Status :: 3 - Alpha",
  51. "Intended Audience :: Healthcare Industry",
  52. "Intended Audience :: Science/Research",
  53. # .github/workflows/python.yml
  54. "Programming Language :: Python :: 3.7",
  55. "Programming Language :: Python :: 3.8",
  56. "Programming Language :: Python :: 3.9",
  57. "Programming Language :: Python :: 3.10",
  58. "Topic :: Scientific/Engineering :: Information Analysis",
  59. "Topic :: Scientific/Engineering :: Medical Science Apps.",
  60. "Topic :: Utilities",
  61. ],
  62. packages=setuptools.find_packages(),
  63. entry_points={
  64. "console_scripts": [
  65. "freesurfer-annotation-labels = freesurfer_surface.__main__:annotation_labels",
  66. "unite-freesurfer-surfaces = freesurfer_surface.__main__:unite_surfaces",
  67. ]
  68. },
  69. # >=3.7 for postponed evaluation of type annotations (PEP563) & dataclass
  70. python_requires=">=3.7",
  71. install_requires=["numpy<2"],
  72. setup_requires=["setuptools_scm"],
  73. tests_require=["pytest<5"],
  74. )