install_requires=install_requires,
tests_require=test_requires,
test_suite='nose.collector',
+ entry_points = {
+ 'console_scripts': [
+ 'pywriter=openpower.decoder.pseudo.pywriter:pywriter'
+ ]
+ }
)
def find_wiki_dir():
filedir = os.path.dirname(os.path.abspath(__file__))
basedir = dirname(dirname(dirname(filedir)))
- tabledir = join(basedir, 'libreriscv')
- tabledir = join(tabledir, 'openpower')
- return join(tabledir, 'isatables')
+ tabledir = join(basedir, 'openpower')
+ isatables = join(tabledir, 'isatables')
+ print ("find_wiki_dir", isatables)
+ return isatables
def find_wiki_file(name):
- filedir = os.path.dirname(os.path.abspath(__file__))
- basedir = dirname(dirname(dirname(filedir)))
- tabledir = join(basedir, 'libreriscv')
- tabledir = join(tabledir, 'openpower')
- tabledir = join(tabledir, 'isatables')
-
return join(find_wiki_dir(), name)
import sys
import shutil
import subprocess
-from soc.decoder.pseudo.pagereader import ISA
-from soc.decoder.power_pseudo import convert_to_python
-from soc.decoder.orderedset import OrderedSet
-from soc.decoder.isa.caller import create_args
+from openpower.decoder.pseudo.pagereader import ISA
+from openpower.decoder.power_pseudo import convert_to_python
+from openpower.decoder.orderedset import OrderedSet
+from openpower.decoder.isa.caller import create_args
def get_isasrc_dir():
f.write(' }\n')
-if __name__ == '__main__':
+def pywriter():
isa = PyISAWriter()
write_isa_class = True
if len(sys.argv) == 1: # quick way to do it
isa.patch_if_needed(source)
if write_isa_class:
isa.write_isa_class()
+
+if __name__ == '__main__':
+ pywriter()