diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 3576aba536..5c97203019 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -21,10 +21,10 @@ jobs: - name: Install build tools run: | python -m pip install --upgrade pip - python -m pip install --upgrade setuptools setuptools_scm wheel + python -m pip install --upgrade build setuptools setuptools_scm wheel - name: Build packages - run: python setup.py sdist bdist_wheel + run: python -m build - name: Save built packages as artifact uses: actions/upload-artifact@v4 diff --git a/docs/devel/infrastructureguide.rst b/docs/devel/infrastructureguide.rst index add26dd622..4012cfc7fe 100644 --- a/docs/devel/infrastructureguide.rst +++ b/docs/devel/infrastructureguide.rst @@ -118,10 +118,10 @@ To build and upload manually (if for some reason it is necessary): 2. (optional) Perform a ``git clean -f -x -d`` from the root of the repository. This will **delete** everything not tracked by git, but will also ensure clean source distribution. ``MANIFEST.in`` is set to include/exclude mostly correctly, but could miss some things. -3. Run ``python setup.py sdist bdist_wheel`` (this requires that ``wheel`` is installed). +3. Run ``python -m build`` (this requires that ``build`` is installed). 4. Upload using ``twine``: ``twine upload dist/*``, assuming the ``dist/`` directory contains only files for this release. This upload process will include any changes to the ``README`` - as well as any updated flags from ``setup.py``. + as well as any updated flags from ``pyproject.toml``. ~~~~~ Conda diff --git a/setup.py b/setup.py deleted file mode 100644 index 261553a8a5..0000000000 --- a/setup.py +++ /dev/null @@ -1,22 +0,0 @@ -# Copyright (c) 2008,2010,2015,2016,2019 MetPy Developers. -# Distributed under the terms of the BSD 3-Clause License. -# SPDX-License-Identifier: BSD-3-Clause -"""Setup script for installing MetPy.""" - -import sys - -from setuptools import setup - -if sys.version_info[0] < 3: - error = """ - If you're using Python 2.7, please install MetPy v0.11.1, - which is the last release of MetPy that supports Python 2.7, - but it is no longer maintained. - - Python {py} detected. - """.format(py='.'.join(str(v) for v in sys.version_info[:3])) - - print(error) # noqa: T201 - sys.exit(1) - -setup(use_scm_version={'version_scheme': 'post-release'})