From 2bdeda021b3e9f54972e809598bf8f364a3c76ed Mon Sep 17 00:00:00 2001 From: Florent Kermarrec Date: Wed, 28 Aug 2019 07:19:30 +0200 Subject: [PATCH] move standalone core generation to litedram package and make it usable externally When LiteDRAM is installed, standalone core can now be generated with "litedram_gen config.yml" --- examples/litedram_gen.py => litedram/gen.py | 0 setup.py | 5 +++++ test/test_examples.py | 2 +- 3 files changed, 6 insertions(+), 1 deletion(-) rename examples/litedram_gen.py => litedram/gen.py (100%) mode change 100755 => 100644 diff --git a/examples/litedram_gen.py b/litedram/gen.py old mode 100755 new mode 100644 similarity index 100% rename from examples/litedram_gen.py rename to litedram/gen.py diff --git a/setup.py b/setup.py index d09bdd7..1fc46ca 100755 --- a/setup.py +++ b/setup.py @@ -33,4 +33,9 @@ setup( ], packages=find_packages(exclude=("test*", "sim*", "doc*", "examples*")), include_package_data=True, + entry_points={ + "console_scripts": [ + "litedram_gen=litedram.gen:main", + ], + }, ) diff --git a/test/test_examples.py b/test/test_examples.py index f021d52..06f3978 100644 --- a/test/test_examples.py +++ b/test/test_examples.py @@ -8,7 +8,7 @@ import os def build_config(name): errors = 0 os.system("rm -rf examples/build") - os.system("cd examples && python3 litedram_gen.py {}.yml".format(name)) + os.system("cd examples && litedram_gen {}.yml".format(name)) errors += not os.path.isfile("examples/build/gateware/litedram_core.v") os.system("rm -rf examples/build") return errors