i hate python packaging but everything works now
This commit is contained in:
parent
02fc53cbf7
commit
ad18b9263b
|
|
@ -3,3 +3,4 @@
|
|||
*.vcd
|
||||
*.out
|
||||
dist/
|
||||
*.egg-info
|
||||
|
|
@ -1,35 +1,31 @@
|
|||
[build-system]
|
||||
requires = ["setuptools"]
|
||||
build-backend = "setuptools.build_meta"
|
||||
|
||||
[project]
|
||||
name = "manta"
|
||||
version = "0.0.0"
|
||||
name = "mantaray"
|
||||
version = "0.0.4"
|
||||
authors = [
|
||||
{ name="Fischer Moseley", email="fischerm@mit.edu" },
|
||||
]
|
||||
description = "An In-Situ Debugging Tool for Programmable Hardware"
|
||||
readme = "README.md"
|
||||
dependencies = [
|
||||
'PyYAML',
|
||||
'pyserial',
|
||||
'pyvcd',
|
||||
"PyYAML",
|
||||
"pyserial",
|
||||
"pyvcd",
|
||||
]
|
||||
|
||||
requires-python = ">=3.7"
|
||||
classifiers = [
|
||||
"Programming Language :: Python :: 3",
|
||||
"License :: OSI Approved :: GNU General Public License v3 (GPLv3)",
|
||||
"Operating System :: OS Independent",
|
||||
"Development Status :: 2 - Pre-Alpha",
|
||||
]
|
||||
|
||||
[project.urls]
|
||||
"Homepage" = "https://github.com/fischermoseley/manta"
|
||||
"Bug Tracker" = "https://github.com/fischermoseley/manta/issues"
|
||||
|
||||
[project.scripts]
|
||||
manta = "manta:main"
|
||||
|
||||
[tool.setuptools.packages.find]
|
||||
where = ["src"]
|
||||
|
||||
[tool.setuptools.package-data]
|
||||
mypkg = ["*.sv", "*.v"]
|
||||
manta = ["*.sv", "*.v"]
|
||||
|
||||
[build-system]
|
||||
requires = ["setuptools"]
|
||||
build-backend = "setuptools.build_meta"
|
||||
|
|
@ -11,16 +11,16 @@ debug = True
|
|||
version = "0.0.0"
|
||||
|
||||
|
||||
def load_source_files(path):
|
||||
"""concatenates the contents of the list of files provided into a single string"""
|
||||
def load_source_files():
|
||||
"""loads source files and returns a string of their contents concatenated together"""
|
||||
|
||||
downlink_template = pkgutil.get_data(__name__, "hdl/manta_template.sv")
|
||||
downlink_template += pkgutil.get_data(__name__, "hdl/fifo.sv")
|
||||
downlink_template += pkgutil.get_data(__name__, "hdl/uart_tx.sv")
|
||||
downlink_template += pkgutil.get_data(__name__, "hdl/uart_rx.sv")
|
||||
downlink_template = pkgutil.get_data(__name__, "manta_template.sv").decode()
|
||||
downlink_template += pkgutil.get_data(__name__, "fifo.sv").decode()
|
||||
downlink_template += pkgutil.get_data(__name__, "uart_tx.sv").decode()
|
||||
downlink_template += pkgutil.get_data(__name__, "uart_rx.sv").decode()
|
||||
downlink_template += pkgutil.get_data(
|
||||
__name__, "hdl/xilinx_true_dual_port_read_first_2_clock_ram.v"
|
||||
)
|
||||
).decode()
|
||||
|
||||
return downlink_template
|
||||
|
||||
|
|
@ -113,7 +113,7 @@ def check_config(config):
|
|||
|
||||
|
||||
def gen_downlink_core(config):
|
||||
buf = downlink_template
|
||||
buf = load_source_files()
|
||||
dl = config["downlink"]
|
||||
|
||||
# add timestamp
|
||||
|
|
@ -325,7 +325,7 @@ def export_waveform(config, data, path):
|
|||
raise NotImplementedError("More file formats to come!")
|
||||
|
||||
|
||||
if __name__ == "__main__":
|
||||
def main():
|
||||
# print help menu if no args passed or help menu requested
|
||||
if len(argv) == 1 or argv[1] == "help" or argv[1] == "ray" or argv[1] == "bae":
|
||||
print_help()
|
||||
|
|
@ -373,3 +373,7 @@ if __name__ == "__main__":
|
|||
else:
|
||||
print("Option not recognized.")
|
||||
print_help()
|
||||
|
||||
|
||||
if __name__ == "__main__":
|
||||
main()
|
||||
|
|
@ -0,0 +1,2 @@
|
|||
import manta
|
||||
manta.main()
|
||||
Loading…
Reference in New Issue