From 3ad1634403d76fd8f94c004930afa3bfa4be7715 Mon Sep 17 00:00:00 2001 From: akrherz Date: Wed, 17 Nov 2021 22:36:34 -0600 Subject: [PATCH] MNT: move setup.py content into setup.cfg --- setup.cfg | 85 +++++++++++++++++++++++++++++++++++++++++++++++-------- setup.py | 50 ++------------------------------ 2 files changed, 75 insertions(+), 60 deletions(-) diff --git a/setup.cfg b/setup.cfg index 2428fbdb4..430c768ef 100644 --- a/setup.cfg +++ b/setup.cfg @@ -1,3 +1,76 @@ +[metadata] +name = siphon +description = A collection of Python utilities for interacting with the Unidata technology stack. +description_file = README.rst +author = Unidata Development Team +author_email = support-python@unidata.ucar.edu +maintainer = Siphon Developers +maintainer_email = support-python@unidata.ucar.edu +license = BSD 3-Clause +license_file = LICENSE +platform = any +keywords = meteorology, weather +classifiers = + Development Status :: 3 - Alpha + Programming Language :: Python :: 3 + Programming Language :: Python :: 3.6 + Programming Language :: Python :: 3.7 + Programming Language :: Python :: 3.8 + Programming Language :: Python :: 3.9 + Topic :: Scientific/Engineering + Intended Audience :: Science/Research + Operating System :: OS Independent + License :: OSI Approved :: BSD Licens +url = https://github.com/Unidata/siphon +project_urls = + Documentation = https://unidata.github.io/siphon/ + Release Notes = https://github.com/Unidata/siphon/releases + Bug Tracker = https://github.com/Unidata/siphon/issues + Source Code = https://github.com/Unidata/siphon + +[options] +package_dir = + = src +packages = find: +setup_requires = setuptools_scm +python_requires = >=3.6 +install_requires = + beautifulsoup4>=4.6 + numpy>=1.8 + pandas + protobuf>=3.0.0a3 + requests>=1.2 + +[options.packages.find] +where = src + +[options.extras_require] +test = + pytest + pytest-flake8 + pytest-runner + netCDF4>=1.1.0 + flake8>3.2.0 + flake8-builtins + flake8-comprehensions + flake8-copyright + flake8-docstrings + flake8-import-order + flake8-mutable + flake8-pep3101 + flake8-print + flake8-quotes + flake8-rst-docstrings + pep8-naming + vcrpy~=1.5,!=1.7.0,!=1.7.1,!=1.7.2,!=1.7.3 + xarray>=0.10.2 +doc = sphinx>=1.3,!=1.6.4; sphinx-gallery; doc8; m2r +# SciPy needed for cartopy; we don't use cartopy[plotting] because +# that will pull in GDAL. +examples = matplotlib>=1.3; cartopy>=0.13.1; scipy; metpy +netcdf = netCDF4>=1.1.0 +dev = ipython[all]>=3.1 + [flake8] max-line-length = 95 application-import-names = siphon @@ -26,18 +99,6 @@ norecursedirs = build docs ignore-path = docs/build,docs/api max-line-length = 95 -[metadata] -description-file = README.rst - -[options] -package_dir = - = src -packages = find: -setup_requires = setuptools_scm - -[options.packages.find] -where = src - [bdist_wheel] # This flag says that the code is written to work on both Python 2 and 3. universal=1 diff --git a/setup.py b/setup.py index ce6049e8b..5a3fcef26 100644 --- a/setup.py +++ b/setup.py @@ -2,12 +2,9 @@ # Distributed under the terms of the BSD 3-Clause License. # SPDX-License-Identifier: BSD-3-Clause """Setup script for installing Siphon.""" - -from __future__ import print_function - import sys -from setuptools import find_packages, setup +from setuptools import setup if sys.version_info[0] < 3: @@ -23,47 +20,4 @@ print(error) # noqa: T001 sys.exit(1) -# Need to conditionally add enum support for older Python -dependencies = ['numpy>=1.8', 'protobuf>=3.0.0a3', 'requests>=1.2', 'beautifulsoup4>=4.6', - 'pandas'] - -setup( - name='siphon', - use_scm_version={'version_scheme': 'post-release', 'local_scheme': 'dirty-tag'}, - packages=find_packages(), - author='Unidata Development Team', - author_email='support-python@unidata.ucar.edu', - license='BSD 3-Clause', - url='https://github.com/Unidata/siphon', - description=('A collection of Python utilities for interacting with the ' - 'Unidata technology stack.'), - keywords='meteorology weather', - classifiers=['Development Status :: 3 - Alpha', - 'Programming Language :: Python :: 3', - 'Programming Language :: Python :: 3.7', - 'Programming Language :: Python :: 3.8', - 'Programming Language :: Python :: 3.9', - 'Topic :: Scientific/Engineering', - 'Intended Audience :: Science/Research', - 'Operating System :: OS Independent', - 'License :: OSI Approved :: BSD License'], - - python_requires='>=3.7', - install_requires=dependencies, - extras_require={ - 'netcdf': 'netCDF4>=1.1.0', - 'dev': 'ipython[all]>=3.1', - 'test': ['pytest', 'pytest-flake8', 'pytest-runner', - 'netCDF4>=1.1.0', - 'flake8>3.2.0', 'flake8-builtins', 'flake8-comprehensions', - 'flake8-copyright', 'flake8-docstrings', 'flake8-import-order', - 'flake8-mutable', 'flake8-pep3101', 'flake8-print', 'flake8-quotes', - 'flake8-rst-docstrings', 'pep8-naming', - 'vcrpy~=1.5,!=1.7.0,!=1.7.1,!=1.7.2,!=1.7.3', 'xarray>=0.10.2'], - 'doc': ['sphinx>=1.3,!=1.6.4', 'sphinx-gallery', 'doc8', 'm2r'], - # SciPy needed for cartopy; we don't use cartopy[plotting] because - # that will pull in GDAL. - 'examples': ['matplotlib>=1.3', 'cartopy>=0.13.1', 'scipy', 'metpy'] - }, - # download_url='https://github.com/Unidata/siphon/archive/v{}.tar.gz'.format(ver), -) +setup(use_scm_version={'version_scheme': 'post-release'})