1
0
mirror of https://github.com/myhdl/myhdl.git synced 2025-01-24 21:52:56 +08:00

clean up setup.py

* Prefer setuptools over distutils
* Extend version checking to disallow python 3.0 to 3.3
* Add python version classifiers
This commit is contained in:
Keerthan Jaic 2015-03-24 03:49:56 -04:00
parent c79bbc72c1
commit db677326eb

View File

@ -1,48 +1,41 @@
""" myhdl's distutils distribution and installation script. """ """ myhdl's distribution and installation script. """
from __future__ import print_function
import sys import sys
requiredVersion = (2, 6) if sys.version_info < (2, 6) or (3, 0) <= sys.version_info < (3, 4):
requiredVersionStr = ".".join([str(i) for i in requiredVersion]) raise RuntimeError("Python version 2.6, 2.7 or >= 3.4 required.")
versionError = "ERROR: myhdl requires Python %s or higher" % requiredVersionStr
# use version_info to check version # Prefer setuptools over distutils
# this was new in 2.0, so first see if it exists
try: try:
sys.version_info from setuptools import setup
except: except ImportError:
print(versionError) from distutils.core import setup
raise SystemExit(1)
if sys.version_info < requiredVersion: setup(
print(versionError) name="myhdl",
raise SystemExit(1) version="0.9.dev0",
description="Python as a Hardware Description Language",
from distutils.core import setup long_description="See home page.",
author="Jan Decaluwe",
classifiers = """\ author_email="jan@jandecaluwe.com",
Development Status :: 5 - Production/Stable url="http://www.myhdl.org",
Intended Audience :: Developers download_url="https://bitbucket.org/jandecaluwe/myhdl/get/0.8.1.zip",
License :: OSI Approved :: GNU Library or Lesser General Public License (LGPL) packages=['myhdl', 'myhdl.conversion'],
Operating System :: OS Independent license="LGPL",
Programming Language :: Python platforms='any',
Topic :: Scientific/Engineering :: Electronic Design Automation (EDA) keywords="HDL ASIC FPGA hardware design",
""" classifiers=[
'Development Status :: 5 - Production/Stable',
'Intended Audience :: Developers',
setup(name="myhdl", 'Topic :: Scientific/Engineering :: Electronic Design Automation (EDA)',
version="0.9", 'License :: OSI Approved :: GNU Lesser General Public License v2 (LGPLv2)',
description="Python as a Hardware Description Language", 'Operating System :: OS Independent',
long_description = "See home page.", 'Programming Language :: Python',
author="Jan Decaluwe", 'Programming Language :: Python :: 2',
author_email="jan@jandecaluwe.com", 'Programming Language :: Python :: 2.6',
url="http://www.myhdl.org", 'Programming Language :: Python :: 2.7',
download_url="https://bitbucket.org/jandecaluwe/myhdl/get/0.8.1.zip", 'Programming Language :: Python :: 3',
packages=['myhdl', 'myhdl.conversion'], 'Programming Language :: Python :: 3.4',
license="LGPL", ]
platforms=["Any"], )
keywords="HDL ASIC FPGA hardware design",
classifiers=filter(None, classifiers.split("\n")),
)