diff --git a/exspy/__init__.py b/exspy/__init__.py index 181d85404..3751b05a4 100644 --- a/exspy/__init__.py +++ b/exspy/__init__.py @@ -4,9 +4,11 @@ from . import signals from .misc import material from ._defaults_parser import preferences +from ._version import __version__ __all__ = [ + "__version__", "components", "data", "preferences", diff --git a/exspy/_version.py b/exspy/_version.py new file mode 100644 index 000000000..f102a9cad --- /dev/null +++ b/exspy/_version.py @@ -0,0 +1 @@ +__version__ = "0.0.1" diff --git a/exspy/release_info.py b/exspy/release_info.py deleted file mode 100644 index 98d057d28..000000000 --- a/exspy/release_info.py +++ /dev/null @@ -1,6 +0,0 @@ -name = "exspy" -version = "0.0.1" -author = "exSpy Developers" -copyright = "Copyright 2007-2023, The exSpy developers" -license = "GPLv3+" -status = "development" diff --git a/pyproject.toml b/pyproject.toml index 99ed3d685..07370abbe 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,3 +1,7 @@ +[build-system] +requires = ["setuptools>=40.8.0", "wheel"] +build-backend = "setuptools.build_meta" + [tool.black] force-exclude = ''' exspy/misc/eds/ffast_mac.py diff --git a/setup.py b/setup.py index 2bb7370b3..dace3ea1a 100644 --- a/setup.py +++ b/setup.py @@ -19,11 +19,6 @@ from setuptools import setup, find_packages -exec(open("exspy/release_info.py").read()) # grab version info - -# Projects with optional features for building the documentation and running -# tests. From setuptools: -# https://setuptools.readthedocs.io/en/latest/setuptools.html#declaring-extras-optional-features-with-their-own-dependencies extra_feature_requirements = { "gui-jupyter": [ @@ -52,12 +47,16 @@ } +version = {} +with open("exspy/_version.py") as fp: + exec(fp.read(), version) + + setup( - name=name, - version=version, - description="multi-dimensional diffraction microscopy", - author=author, - license=license, + name="exspy", + version=version["__version__"], + description="EELS and EDS analysis with the HyperSpy framework", + license="LICENSE", url="https://github.com/pyxem/pyxem", long_description=open("README.md").read(), long_description_content_type="text/markdown",