summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSeth M Morton <seth.m.morton@gmail.com>2018-05-11 21:50:55 -0700
committerSeth M Morton <seth.m.morton@gmail.com>2018-05-11 21:50:55 -0700
commit418b47d3b3aae9bbe815e95cd76a9ee0c4d9ad74 (patch)
treec26f6bb90aa70ed8ff560c66022e3cab431890ca
parent77768127d9c13e5bf31c786020dbaa345c6d80ea (diff)
downloadnatsort-418b47d3b3aae9bbe815e95cd76a9ee0c4d9ad74.tar.gz
Move most package metadata to setup.cfg.
A nice side effect is the requirements.txt was able to be removed.
-rw-r--r--requirements.txt2
-rw-r--r--setup.cfg43
-rw-r--r--setup.py65
3 files changed, 45 insertions, 65 deletions
diff --git a/requirements.txt b/requirements.txt
deleted file mode 100644
index a0a35c7..0000000
--- a/requirements.txt
+++ /dev/null
@@ -1,2 +0,0 @@
-# Only Python 2.6 has a requirement.
-argparse; python_version == '2.6'
diff --git a/setup.cfg b/setup.cfg
index 44e5c7f..fc5b54a 100644
--- a/setup.cfg
+++ b/setup.cfg
@@ -1,3 +1,46 @@
+[metadata]
+name = natsort
+version = 5.3.0
+author = Seth M. Morton
+author_email = drtuba78@gmail.com
+url = https://github.com/SethMMorton/natsort
+description = Simple yet flexible natural sorting in Python.
+long_description = file: README.rst
+license = MIT
+classifiers =
+ Development Status :: 5 - Production/Stable
+ Intended Audience :: Developers
+ Intended Audience :: Science/Research
+ Intended Audience :: System Administrators
+ Intended Audience :: Information Technology
+ Intended Audience :: Financial and Insurance Industry
+ Operating System :: OS Independent
+ License :: OSI Approved :: MIT License
+ Natural Language :: English
+ Programming Language :: Python :: 2
+ Programming Language :: Python :: 2.6
+ Programming Language :: Python :: 2.7
+ Programming Language :: Python :: 3
+ Programming Language :: Python :: 3.3
+ Programming Language :: Python :: 3.4
+ Programming Language :: Python :: 3.5
+ Programming Language :: Python :: 3.6
+ Topic :: Scientific/Engineering :: Information Analysis
+ Topic :: Utilities
+ Topic :: Text Processing
+
+[options]
+packages = find:
+install_requires =
+ argparse; python_version == '2.6'
+
+[options.packages.find]
+exclude = test_*
+
+[options.entry_points]
+console_scripts =
+ natsort = natsort.__main__:main
+
[bdist_wheel]
universal = 1
diff --git a/setup.py b/setup.py
index e56bfa0..6f70e3e 100644
--- a/setup.py
+++ b/setup.py
@@ -1,65 +1,4 @@
#! /usr/bin/env python
-# Std. lib imports
-import re
-from os.path import join
-
-# Non-std lib imports
-from setuptools import setup, find_packages
-
-# Read the natsort.py file for the module version number
-VERSIONFILE = join('natsort', '_version.py')
-versionsearch = re.compile(r"^__version__ = ['\"]([^'\"]*)['\"]")
-with open(VERSIONFILE, "rt") as fl:
- for line in fl:
- m = versionsearch.search(line)
- if m:
- VERSION = m.group(1)
- break
- else:
- s = "Unable to locate version string in {0}"
- raise RuntimeError(s.format(VERSIONFILE))
-
-# Read in the documentation for the long_description
-DESCRIPTION = 'Simple yet flexible natural sorting in Python.'
-try:
- with open('README.rst') as fl:
- LONG_DESCRIPTION = fl.read()
-except IOError:
- LONG_DESCRIPTION = DESCRIPTION
-
-# The setup parameters
-setup(
- name='natsort',
- version=VERSION,
- author='Seth M. Morton',
- author_email='drtuba78@gmail.com',
- url='https://github.com/SethMMorton/natsort',
- license='MIT',
- packages=find_packages(exclude=['test*']),
- entry_points={'console_scripts': ['natsort = natsort.__main__:main']},
- description=DESCRIPTION,
- long_description=LONG_DESCRIPTION,
- classifiers=(
- 'Development Status :: 5 - Production/Stable',
- 'Intended Audience :: Developers',
- 'Intended Audience :: Science/Research',
- 'Intended Audience :: System Administrators',
- 'Intended Audience :: Information Technology',
- 'Intended Audience :: Financial and Insurance Industry',
- 'Operating System :: OS Independent',
- 'License :: OSI Approved :: MIT License',
- 'Natural Language :: English',
- 'Programming Language :: Python :: 2',
- 'Programming Language :: Python :: 2.6',
- 'Programming Language :: Python :: 2.7',
- 'Programming Language :: Python :: 3',
- 'Programming Language :: Python :: 3.3',
- 'Programming Language :: Python :: 3.4',
- 'Programming Language :: Python :: 3.5',
- 'Programming Language :: Python :: 3.6',
- 'Topic :: Scientific/Engineering :: Information Analysis',
- 'Topic :: Utilities',
- 'Topic :: Text Processing',
- )
-)
+from setuptools import setup
+setup()