Merge branch 'patch-1' of https://github.com/berkerpeksag/hy into berkerpeksag-patch-1

This commit is contained in:
Nicolas Dandrimont 2013-09-22 12:27:22 +02:00
commit 7a403a2660

View File

@ -19,34 +19,34 @@
# 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"
try: try:
verstrline = open(VERSIONFILE, "rt").read() verstrline = open(VERSIONFILE, "rt").read()
except EnvironmentError: except EnvironmentError:
pass # Okay, there is no version file. pass # Okay, there is no version file.
else: else:
VSRE = r"^__version__ = ['\"]([^'\"]*)['\"]" VSRE = r"^__version__ = ['\"]([^'\"]*)['\"]"
mo = re.search(VSRE, verstrline, re.M) mo = re.search(VSRE, verstrline, re.M)
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",