diff options
Diffstat (limited to 'setup.py.in')
-rw-r--r-- | setup.py.in | 57 |
1 files changed, 0 insertions, 57 deletions
diff --git a/setup.py.in b/setup.py.in deleted file mode 100644 index 27f3778f4..000000000 --- a/setup.py.in +++ /dev/null @@ -1,57 +0,0 @@ -#!/usr/bin/env python - -from distutils.core import setup, Extension -import distutils.file_util -import distutils.dir_util -from distutils.command.build import build -import os -import os.path - -so_ext = "@SOEXT@" -libghdl_version = "@libghdl_version@" -ghdl_version = "@ghdl_version@" - -long_description = """GHDL is a vhdl simulator and libghdl provides a low-level -interface to the parser. This library gives access to the AST so that you can -write tools like linters. -""" - -class GHDLBuild(build): - def my_copy_tree(self, src, dst): - """Tuned version of copy_tree: exclude .o files""" - distutils.dir_util.mkpath(dst, verbose=True) - - for n in os.listdir(src): - src_name = os.path.join(src, n) - dst_name = os.path.join(dst, n) - - if os.path.isdir(src_name): - self.my_copy_tree(src_name, dst_name) - elif not src_name.endswith(".o"): - distutils.file_util.copy_file(src_name, dst_name) - - def run(self): - # Run original build code - build.run(self) - - # Copy VHDL libraries & shared library - dstdir = os.path.join(self.build_lib, 'libghdl') - libghdl_filename = "libghdl-" + libghdl_version + so_ext - distutils.file_util.copy_file(libghdl_filename, dstdir) - with open(os.path.join(dstdir, "config.py"), 'w') as f: - f.write('libghdl_filename="{}"\n'.format(libghdl_filename)) - self.my_copy_tree(os.path.join("lib", "ghdl"), - os.path.join(dstdir, "ghdl")) - -setup (name='libghdl', - version=ghdl_version, - description = 'Interface to ghdl, a VHDL analyzer', - long_description = long_description, - author = 'Tristan Gingold', - author_email = 'tgingold@free.fr', - url = 'http://github.com/ghdl/ghdl', - license = 'GPL-2.0-or-later', - package_dir = {'libghdl' : 'src/vhdl/python/libghdl'}, - packages = ['libghdl', 'libghdl.thin', 'libghdl.thin.vhdl'], - cmdclass = { - 'build': GHDLBuild}) |