Various setup.py enhancements.

- PEP8 fixes
- Use setuptools.find_packages()
- Update PyPI classifiers
- Update website URL
- Install the argparse module in Python 2.6 and before
- Delete the duplicate rply in install_requires. With the PyPI
  version, tests are failed.
This commit is contained in:
Berker Peksag 2013-09-20 08:27:46 +03:00
parent b2c51d0130
commit 522553ffec

View File

@ -19,12 +19,12 @@
# FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER # FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
# DEALINGS IN THE SOFTWARE. # DEALINGS IN THE SOFTWARE.
from setuptools import setup
import os import os
import re import re
import sys import sys
from setuptools import find_packages, setup
PKG = "hy" PKG = "hy"
VERSIONFILE = os.path.join(PKG, "version.py") VERSIONFILE = os.path.join(PKG, "version.py")
verstr = "unknown" verstr = "unknown"
@ -38,15 +38,15 @@ else:
if mo: if mo:
__version__ = mo.group(1) __version__ = mo.group(1)
else: else:
raise RuntimeError("if %s.py exists, it is required to be well-formed" % (VERSIONFILE,)) msg = "if %s.py exists, it is required to be well-formed" % VERSIONFILE
raise RuntimeError(msg)
long_description = """Hy is a Python <--> Lisp layer. It helps long_description = """Hy is a Python <--> Lisp layer. It helps
make things work nicer, and lets Python and the Hy lisp variant play make things work nicer, and lets Python and the Hy lisp variant play
nice together. """ nice together. """
install_requires = ["rply"] install_requires = []
if sys.version_info[0] == 2: if sys.version_info[:2] < (2, 7):
install_requires.append('argparse>=1.2.1') install_requires.append('argparse>=1.2.1')
if os.name == 'nt': if os.name == 'nt':
install_requires.append('pyreadline==2.0') install_requires.append('pyreadline==2.0')
@ -61,23 +61,16 @@ setup(
'hyc = hy.cmdline:hyc_main' 'hyc = hy.cmdline:hyc_main'
] ]
}, },
packages=[ packages=find_packages(exclude=['tests*']),
'hy',
'hy.lex',
'hy.core',
'hy.models',
'hy.contrib',
],
package_data={ package_data={
'hy.core': ['*.hy'], 'hy.core': ['*.hy'],
}, },
setup_requires=['rply'],
author="Paul Tagliamonte", author="Paul Tagliamonte",
author_email="tag@pault.ag", author_email="tag@pault.ag",
long_description=long_description, long_description=long_description,
description='Lisp and Python love each other.', description='Lisp and Python love each other.',
license="Expat", license="Expat",
url="http://hy.pault.ag/", url="http://hylang.org/",
platforms=['any'], platforms=['any'],
classifiers=[ classifiers=[
"Development Status :: 4 - Beta", "Development Status :: 4 - Beta",
@ -87,8 +80,10 @@ setup(
"Operating System :: OS Independent", "Operating System :: OS Independent",
"Programming Language :: Lisp", "Programming Language :: Lisp",
"Programming Language :: Python", "Programming Language :: Python",
"Programming Language :: Python :: 2",
"Programming Language :: Python :: 2.6", "Programming Language :: Python :: 2.6",
"Programming Language :: Python :: 2.7", "Programming Language :: Python :: 2.7",
"Programming Language :: Python :: 3",
"Programming Language :: Python :: 3.2", "Programming Language :: Python :: 3.2",
"Programming Language :: Python :: 3.3", "Programming Language :: Python :: 3.3",
"Topic :: Software Development :: Code Generators", "Topic :: Software Development :: Code Generators",