1""" 2======================================================================== 3setup.py 4======================================================================== 5setup.py inspired by the PyPA sample project: 6https://github.com/pypa/sampleproject/blob/master/setup.py 7""" 8 9 10from os import path 11 12from setuptools import find_packages, setup 13 14#------------------------------------------------------------------------- 15# get_version 16#------------------------------------------------------------------------- 17 18def get_version(): 19 # Check Python version compatibility 20 import sys 21 assert sys.version_info[0] > 2, "Python 2 is no longer supported!" 22 23 _d = {} 24 with open(path.join(path.dirname(__file__), "pymtl3/version.py")) as f: 25 exec(f.read(), _d) 26 return _d['__version__'] 27 28#------------------------------------------------------------------------- 29# get_long_descrption 30#------------------------------------------------------------------------- 31 32def get_long_description(): 33 here = path.abspath(path.dirname(__file__)) 34 with open(path.join(here, 'README.md'), encoding='utf-8') as f: 35 return f.read() 36 37#------------------------------------------------------------------------- 38# setup 39#------------------------------------------------------------------------- 40 41setup( 42 43 name = 'pymtl3', 44 version = get_version(), 45 description = \ 46 'PyMTL 3 (Mamba): A Python-based hardware generation, simulation, and verification framework', 47 long_description = get_long_description(), 48 long_description_content_type = "text/markdown", 49 url = 'https://github.com/pymtl/pymtl3', 50 author = 'Batten Research Group', 51 author_email = 'brg-pymtl@csl.cornell.edu', 52 53 # BSD 3-Clause License: 54 # - http://choosealicense.com/licenses/bsd-3-clause 55 # - http://opensource.org/licenses/BSD-3-Clause 56 57 license='BSD', 58 59 # Pip will block installation on unsupported versions of Python 60 python_requires=">=3.6", 61 62 # See https://pypi.python.org/pypi?%3Aaction=list_classifiers 63 classifiers=[ 64 'Development Status :: 4 - Beta', 65 'License :: OSI Approved :: BSD License', 66 'Programming Language :: Python :: 3 :: Only', 67 'Operating System :: MacOS :: MacOS X', 68 'Operating System :: POSIX :: Linux', 69 'Topic :: Scientific/Engineering :: Electronic Design Automation (EDA)', 70 ], 71 72 packages = find_packages( 73 exclude=['scripts', 'examples', 'examples.*', 'examples.*.*'] 74 ), 75 76 package_data={ 77 'pymtl3': [ 78 # 'passes/backends/verilog/import_/verilator_wrapper.c.template', 79 # 'passes/backends/verilog/import_/verilator_wrapper.py.template', 80 # 'passes/backends/verilog/tbgen/verilog_tbgen.v.template', 81 ], 82 }, 83 84 install_requires = [ 85 'pytest', 86 'hypothesis >= 4.18.1', 87 'cffi', 88 'greenlet', 89 ], 90 91 entry_points = { 92 'pytest11' : [ 93 'pytest-pymtl3 = pytest_plugin.pytest_pymtl3', 94 ] 95 } 96 97) 98