-
Notifications
You must be signed in to change notification settings - Fork 2
/
setup.py
62 lines (51 loc) · 1.35 KB
/
setup.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
import os
import sys, os.path, platform, warnings
from distutils import log
from distutils.core import setup, Command
VERSION = "0.0.1"
AUTHOR = "Matthew Ballance"
AUTHOR_EMAIL = "matt.ballance@gmail.com"
DESCRIPTION = "Debug BFMs for RISC-V cores"
LICENSE = "Apache 2.0"
URL = "https://github.com/pybfms/pybfms_riscv_debug"
if os.path.exists("etc/ivpm.info"):
with open("etc/ivpm.info") as fp:
for line in fp:
if line.find("version=") != -1:
VERSION = line[line.find("=")+1:].strip()
break
if VERSION is None:
raise Exception("Error: null version")
if "BUILD_NUM" in os.environ:
VERSION += "." + os.environ["BUILD_NUM"]
try:
from wheel.bdist_wheel import bdist_wheel
except ImportError:
bdist_wheel = None
cmdclass = {
}
if bdist_wheel:
cmdclass['bdist_wheel'] = bdist_wheel
setup(
name = "pybfms_riscv_debug",
version=VERSION,
packages=['riscv_debug_bfms'],
package_dir = {'' : 'src'},
package_data = {'riscv_debug_bfms': ['hdl/*.v']},
author = AUTHOR,
author_email = AUTHOR_EMAIL,
description = DESCRIPTION,
license = LICENSE,
keywords = ["SystemVerilog", "Verilog", "RTL", "cocotb"],
url = URL,
setup_requires=[
'setuptools_scm',
],
cmdclass=cmdclass,
install_requires=[
'cocotb',
'pybfms',
'pybfms-core-debug-common',
'pyelftools'
],
)