Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Switch build backend to hatchling #12173

Closed
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ jobs:
which python
which pip
pip install --upgrade pip setuptools wheel
pip install --upgrade --only-binary "numpy,scipy,dipy,statsmodels" -ve . -r requirements.txt -r requirements_testing.txt -r requirements_testing_extra.txt PyQt6
pip install --upgrade --only-binary "numpy,scipy,dipy,statsmodels" -ve .[full] -r requirements_testing.txt -r requirements_testing_extra.txt PyQt6
# 3D too slow on Apple's software renderer, and numba causes us problems
pip uninstall -y vtk pyvista pyvistaqt numba
mkdir -p test-results
Expand Down
4 changes: 4 additions & 0 deletions .git_archival.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
node: $Format:%H$
node-date: $Format:%cI$
describe-name: $Format:%(describe:tags=true,match=*[0-9]*)$
ref-names: $Format:%D$
1 change: 1 addition & 0 deletions .gitattributes
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
.git_archival.txt export-subst
92 changes: 0 additions & 92 deletions MANIFEST.in

This file was deleted.

4 changes: 2 additions & 2 deletions azure-pipelines.yml
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ stages:
- bash: |
set -eo pipefail
python -m pip install --progress-bar off --upgrade pip setuptools wheel
python -m pip install --progress-bar off -r requirements_base.txt -r requirements_hdf5.txt -r requirements_testing.txt
python -m pip install --progress-bar off -ve .[hdf5] -r requirements_testing.txt
python -m pip uninstall -yq pytest-qt # don't want to set up display, etc. for this
pre-commit install --install-hooks
displayName: Install dependencies
Expand Down Expand Up @@ -169,7 +169,7 @@ stages:
python -m pip install --progress-bar off --upgrade pip setuptools wheel
python -m pip install --progress-bar off --upgrade --pre --only-binary=\"numpy,scipy,matplotlib,vtk\" numpy scipy matplotlib vtk
python -c "import vtk"
python -m pip install --progress-bar off --upgrade -r requirements.txt -r requirements_testing.txt -r requirements_testing_extra.txt
python -m pip install --progress-bar off --upgrade -ve .[full] -r requirements_testing.txt -r requirements_testing_extra.txt
python -m pip install -e .
displayName: 'Install dependencies with pip'
- bash: |
Expand Down
2 changes: 1 addition & 1 deletion doc/development/contributing.rst
Original file line number Diff line number Diff line change
Expand Up @@ -304,7 +304,7 @@ be reflected the next time you open a Python interpreter and ``import mne``
Finally, we'll add a few dependencies that are not needed for running
MNE-Python, but are needed for locally running our test suite::

$ pip install -r requirements_testing.txt
$ pip install -r requirements_testing.txt -r requirements_testing_extra.txt

And for building our documentation::

Expand Down
1 change: 0 additions & 1 deletion doc/links.inc
Original file line number Diff line number Diff line change
Expand Up @@ -111,7 +111,6 @@

.. installation links

.. _requirements file: https://raw.githubusercontent.com/mne-tools/mne-python/main/requirements.txt
.. _NVIDIA CUDA GPU processing: https://developer.nvidia.com/cuda-zone
.. _NVIDIA proprietary drivers: https://www.geforce.com/drivers

Expand Down
114 changes: 71 additions & 43 deletions pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,9 +1,10 @@
[project]
name = "mne"
description = "MNE-Python project for MEG and EEG data analysis."
maintainers = [
authors = [
{ name = "Alexandre Gramfort", email = "[email protected]" },
]
maintainers = [{ name = "Dan McCloy", email = "[email protected]" }]
dynamic = ["version"]
license = { text = "BSD-3-Clause" }
readme = { file = "README.rst", content-type = "text/x-rst" }
Expand All @@ -30,9 +31,69 @@ classifiers = [
"Operating System :: MacOS",
"Programming Language :: Python :: 3",
]
scripts = { mne = "mne.commands.utils:main" }
dependencies = [
"numpy>=1.21.2",
"scipy>=1.7.1",
"matplotlib>=3.5.0",
"tqdm",
"pooch>=1.5",
"decorator",
"packaging",
"jinja2",
"importlib_resources>=5.10.2; python_version<'3.9'",
"lazy_loader>=0.3",
"defusedxml",
]

[project.optional-dependencies]
# here for backward-compat
data = []

[project.scripts]
mne = "mne.commands.utils:main"
# requirements for MNE-Python functions that use HDF5 I/O
hdf5 = ["h5io", "pymatreader"]

# requirements for full MNE-Python functionality (other than raw/epochs export)
full = [
"mne[data]",
"mne[hdf5]",
"qtpy",
"PyQt6",
"pyobjc-framework-Cocoa>=5.2.0; platform_system=='Darwin'",
"sip",
"scikit-learn",
"nibabel",
"openmeeg>=2.5.5",
"numba",
"h5py",
"pandas",
"numexpr",
"jupyter",
"python-picard",
"statsmodels",
"joblib",
"psutil",
"dipy",
"vtk",
"nilearn",
"xlrd",
"imageio>=2.6.1",
"imageio-ffmpeg>=0.4.1",
"traitlets",
"pyvista>=0.32,!=0.35.2,!=0.38.0,!=0.38.1,!=0.38.2,!=0.38.3,!=0.38.4,!=0.38.5,!=0.38.6,!=0.42.0",
"pyvistaqt>=0.4",
"mffpy>=0.5.7",
"ipywidgets",
"ipympl",
"ipyevents",
"trame",
"trame-vtk",
"trame-vuetify",
"mne-qt-browser",
"darkdetect",
"qdarkstyle",
"threadpoolctl",
]

[project.urls]
Homepage = "https://mne.tools/"
Expand All @@ -43,47 +104,14 @@ Forum = "https://mne.discourse.group/"
"Source Code" = "https://github.com/mne-tools/mne-python/"

[build-system]
requires = ["setuptools>=45", "setuptools_scm[toml]>=6.2", "wheel"]
build-backend = "setuptools.build_meta"
requires = ["hatchling", "hatch-vcs"]
build-backend = "hatchling.build"

[tool.setuptools_scm]
write_to = "mne/_version.py"
version_scheme = "release-branch-semver"

[options]
zip_safe = false # the package can run out of an .egg file
include_package_data = true

[tool.setuptools.package-data]
"mne" = [
"data/eegbci_checksums.txt",
"data/*.sel",
"data/icos.fif.gz",
"data/coil_def*.dat",
"data/helmets/*.fif.gz",
"data/FreeSurferColorLUT.txt",
"data/image/*gif",
"data/image/*lout",
"data/fsaverage/*.fif",
"channels/data/layouts/*.lout",
"channels/data/layouts/*.lay",
"channels/data/montages/*.sfp",
"channels/data/montages/*.txt",
"channels/data/montages/*.elc",
"channels/data/neighbors/*.mat",
"datasets/sleep_physionet/SHA1SUMS",
"datasets/_fsaverage/*.txt",
"datasets/_infant/*.txt",
"datasets/_phantom/*.txt",
"html/*.js",
"html/*.css",
"html_templates/repr/*.jinja",
"html_templates/report/*.jinja",
"icons/*.svg",
"icons/*.png",
"io/artemis123/resources/*.csv",
"io/edf/gdf_encodes.txt",
]
[tool.hatch]
version.source = "vcs"
version.raw-options = { version_scheme = "release-branch-semver" }
build.hooks.vcs.version-file = "mne/_version.py"
build.exclude = ["/.*", "/*.yml", "/*.yaml", "/*.toml", "/*.txt"]

[tool.codespell]
ignore-words = "ignore_words.txt"
Expand Down
47 changes: 0 additions & 47 deletions requirements.txt

This file was deleted.

12 changes: 0 additions & 12 deletions requirements_base.txt

This file was deleted.

3 changes: 0 additions & 3 deletions requirements_hdf5.txt

This file was deleted.

Loading
Loading