From 9abaf9e66d9e0663b298983e57e57ef93113760a Mon Sep 17 00:00:00 2001 From: Brandon Rhodes Date: Fri, 21 Feb 2025 07:46:54 -0500 Subject: [PATCH] setup.py: add `provides`; simplify; re-indent --- setup.py | 36 +++++++++++++++++------------------- 1 file changed, 17 insertions(+), 19 deletions(-) diff --git a/setup.py b/setup.py index 0bae225..450800f 100644 --- a/setup.py +++ b/setup.py @@ -2,13 +2,9 @@ import sys from distutils.core import setup, Extension -name = 'sgp4' ext_modules = [] -if os.environ.get('SGP4_PURE_PYTHON'): - name += '_pure_python' - -elif sys.version_info[0] == 3: +if sys.version_info[0] == 3: # It is hard to write C extensions that support both Python 2 and 3, # so we opt here to support the acceleration only for Python 3. @@ -51,16 +47,17 @@ description = description.strip() long_description = long_description.strip() + '\n' -setup(name = name, - version = version, - description = description, - long_description = long_description, - long_description_content_type = 'text/x-rst', - license = 'MIT', - author = 'Brandon Rhodes', - author_email = 'brandon@rhodesmill.org', - url = 'https://github.com/brandon-rhodes/python-sgp4', - classifiers = [ +setup( + name = 'sgp4', + version = version, + description = description, + long_description = long_description, + long_description_content_type = 'text/x-rst', + license = 'MIT', + author = 'Brandon Rhodes', + author_email = 'brandon@rhodesmill.org', + url = 'https://github.com/brandon-rhodes/python-sgp4', + classifiers = [ 'Development Status :: 5 - Production/Stable', 'Intended Audience :: Science/Research', 'License :: OSI Approved :: MIT License', @@ -73,8 +70,9 @@ 'Programming Language :: Python :: 3.11', 'Programming Language :: Python :: 3.12', 'Topic :: Scientific/Engineering :: Astronomy', - ], - packages = ['sgp4'], - package_data = {'sgp4': ['SGP4-VER.TLE', 'sample*', 'tcppver.out']}, - ext_modules = ext_modules, + ], + packages = ['sgp4'], + package_data = {'sgp4': ['SGP4-VER.TLE', 'sample*', 'tcppver.out']}, + provides = ['sgp4'], + ext_modules = ext_modules, )