-
Notifications
You must be signed in to change notification settings - Fork 51
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Move metadata from setup.py to pyproject.toml * Extract package version dynamically from nrrd.__version__ * Upgrade pre-commit hooks * Replace flake8 hook by https://github.com/PyCQA/flake8, which is "standard" (running the old hook was asking me for a gitlab password) * Add typos hook (only found one typo, but doesn't cost much to run it) --------- Co-authored-by: Bryn Lloyd <[email protected]> Co-authored-by: Addison Elliott <[email protected]>
- Loading branch information
1 parent
d7f1d0c
commit 52e9e37
Showing
7 changed files
with
57 additions
and
56 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -11,3 +11,6 @@ docs/build/ | |
|
||
# coverage.py files | ||
.coverage | ||
|
||
# Virtual environments | ||
.venv |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,39 @@ | ||
[build-system] | ||
requires = ["setuptools>=42", "wheel"] | ||
build-backend = "setuptools.build_meta" | ||
|
||
[project] | ||
name = "pynrrd" | ||
dynamic = ["version"] | ||
description = "Pure python module for reading and writing NRRD files." | ||
readme = { file = "README.txt", content-type = "text/x-rst" } | ||
requires-python = ">=3.7" | ||
license = { text = "MIT License" } | ||
authors = [{ name = "Maarten Everts", email = "[email protected]" }] | ||
keywords = ["nrrd", "teem", "image", "processing", "file", "format"] | ||
classifiers = [ | ||
"License :: OSI Approved :: MIT License", | ||
"Topic :: Scientific/Engineering", | ||
"Programming Language :: Python", | ||
"Programming Language :: Python :: 3.7", | ||
"Programming Language :: Python :: 3.8", | ||
"Programming Language :: Python :: 3.9", | ||
"Programming Language :: Python :: 3.10", | ||
"Programming Language :: Python :: 3.11", | ||
] | ||
|
||
dependencies = ["numpy >=1.11.1", "nptyping", "typing_extensions"] | ||
|
||
[project.optional-dependencies] | ||
dev = ["build", "pre-commit", "pytest"] | ||
|
||
[project.urls] | ||
Homepage = "https://github.com/mhe/pynrrd" | ||
Documentation = "https://pynrrd.readthedocs.io/en/stable" | ||
Tracker = "https://github.com/mhe/pynrrd/issues" | ||
|
||
[tool.setuptools.dynamic] | ||
version = { attr = "nrrd._version.__version__" } | ||
|
||
[tool.setuptools.packages] | ||
find = { exclude = ["*.tests", "*.tests.*", "tests.*", "tests"] } |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,44 +1,4 @@ | ||
import os | ||
from setuptools import setup | ||
|
||
from setuptools import find_packages, setup | ||
|
||
currentPath = os.path.abspath(os.path.dirname(__file__)) | ||
|
||
# Get __version__ from _version.py | ||
__version__ = None | ||
with open(os.path.join(currentPath, 'nrrd/_version.py')) as fh: | ||
exec(fh.read()) | ||
|
||
# Get the long description from the README file | ||
with open(os.path.join(currentPath, 'README.rst')) as fh: | ||
longDescription = fh.read() | ||
|
||
longDescription = '\n' + longDescription | ||
|
||
setup(name='pynrrd', | ||
python_requires='>=3.7', | ||
version=__version__, | ||
description='Pure python module for reading and writing NRRD files.', | ||
long_description=longDescription, | ||
long_description_content_type='text/x-rst', | ||
author='Maarten Everts', | ||
author_email='[email protected]', | ||
url='https://github.com/mhe/pynrrd', | ||
license='MIT License', | ||
install_requires=['numpy>=1.11.1', 'nptyping', 'typing_extensions'], | ||
packages=find_packages(exclude=['*.tests', '*.tests.*', 'tests.*', 'tests']), | ||
keywords='nrrd teem image processing file format', | ||
classifiers=[ | ||
'License :: OSI Approved :: MIT License', | ||
'Topic :: Scientific/Engineering', | ||
'Programming Language :: Python', | ||
'Programming Language :: Python :: 3.7', | ||
'Programming Language :: Python :: 3.8', | ||
'Programming Language :: Python :: 3.9', | ||
'Programming Language :: Python :: 3.10', | ||
'Programming Language :: Python :: 3.11', | ||
], | ||
project_urls={ | ||
'Tracker': 'https://github.com/mhe/pynrrd/issues', | ||
} | ||
) | ||
if __name__ == "__main__": | ||
setup() |