From b0d2b827abba6e5fc7fe27787551bcfaa6256de4 Mon Sep 17 00:00:00 2001 From: Leo Singer Date: Fri, 8 May 2026 13:54:35 -0400 Subject: [PATCH] Convert from setup.py to pyproject.toml Fixes #25. --- MANIFEST.in | 8 -------- pyproject.toml | 48 ++++++++++++++++++++++++++++++++++++++++++++++++ setup.cfg | 9 --------- setup.py | 47 ----------------------------------------------- 4 files changed, 48 insertions(+), 64 deletions(-) delete mode 100644 MANIFEST.in create mode 100644 pyproject.toml delete mode 100644 setup.py diff --git a/MANIFEST.in b/MANIFEST.in deleted file mode 100644 index 897217e..0000000 --- a/MANIFEST.in +++ /dev/null @@ -1,8 +0,0 @@ -include *.md -include LICENSE -include lunarsky/* -include setup.py -include setup.cfg -include docs/figure.png -global-exclude *.py[cod] -global-exclude __pycache__ diff --git a/pyproject.toml b/pyproject.toml new file mode 100644 index 0000000..6be577e --- /dev/null +++ b/pyproject.toml @@ -0,0 +1,48 @@ +[build-system] +requires = ["setuptools>=77", "setuptools_scm>=8"] +build-backend = "setuptools.build_meta" + +[project] +name = "lunarsky" +description = "Astropy support for selenocentric (Moon) reference frames and lunar surface observatories." +license = "BSD-3-Clause" +license-files = [ "LICENSE" ] +readme = "README.md" +authors = [ + { name = "Adam E. Lanman" }, +] +classifiers = [ + "Development Status :: 3 - Alpha", + "Intended Audience :: Science/Research", + "Topic :: Scientific/Engineering :: Astronomy", +] +keywords = [ + "astronomy", + "moon", + "spice", +] +dependencies = [ + "numpy>=1.15", + "astropy>=6.0.0", + "spiceypy", + "jplephem", +] +requires-python = ">=3.8" +dynamic = [ "version" ] + +[project.optional-dependencies] +test = ["pytest"] + +[project.urls] +source = "https://github.com/aelanman/lunarsky" + +[tool.setuptools] +include-package-data = true + +[tool.setuptools_scm] +version_scheme = "no-guess-dev" +local_scheme = "no-local-version" +version_file = "lunarsky/version.py" + +[tool.pytest] +addopts = [ "--ignore=scripts" ] diff --git a/setup.cfg b/setup.cfg index abd7ea1..ba34736 100644 --- a/setup.cfg +++ b/setup.cfg @@ -1,12 +1,3 @@ -[aliases] -test = pytest - -[metadata] -description_file = README.md - -[tool:pytest] -addopts = --ignore=scripts - [flake8] ignore = W503, E203, N806, E731 max-line-length = 100 diff --git a/setup.py b/setup.py deleted file mode 100644 index 60461b5..0000000 --- a/setup.py +++ /dev/null @@ -1,47 +0,0 @@ -# -*- mode: python; coding: utf-8 -* -# Copyright (c) 2018 Radio Astronomy Software Group -# Licensed under the 3-clause BSD License - -from setuptools import setup, find_packages -import io - - -with io.open("README.md", "r", encoding="utf-8") as readme_file: - readme = readme_file.read() - -setup_args = { - "name": "lunarsky", - "author": "Adam E. Lanman", - "url": "https://github.com/aelanman/lunarsky", - "download_url": "https://github.com/aelanman/lunarsky/archive/refs/tags/v0.1.1.tar.gz", - "license": "BSD", - "description": "Astropy support for selenocentric (Moon)" - "reference frames and lunar surface observatories.", - "long_description": readme, - "long_description_content_type": "text/markdown", - "package_dir": {"lunarsky": "lunarsky"}, - "packages": find_packages(), - "use_scm_version": { - "root": ".", - "relative_to": __file__, - "version_scheme": "post-release", - "local_scheme": "no-local-version", - "write_to": "lunarsky/version.py", - }, - "include_package_data": True, - "test_suite": "pytest", - "tests_require": ["pytest"], - "setup_requires": ["pytest-runner", "setuptools_scm"], - "install_requires": ["numpy>=1.15", "astropy>=6.0.0", "spiceypy", "jplephem"], - "classifiers": [ - "Development Status :: 3 - Alpha", - "Intended Audience :: Science/Research", - "License :: OSI Approved :: BSD License", - "Programming Language :: Python :: 3.6", - "Topic :: Scientific/Engineering :: Astronomy", - ], - "keywords": "astronomy moon spice", -} - -if __name__ == "__main__": - setup(**setup_args)