#! /usr/bin/env python
# © 2022 Siemens.

#  This material may only be used with products of Siemens Industry Software Inc.
#  or its affiliates, and for no other purpose.

# If you have a signed license agreement with Siemens for the product with which
# this Software will be used, your use of this Software is subject to the scope of
# license and the software protection and security provisions of that agreement.
# If you do not have such a signed license agreement, your use is subject to the
# Siemens Universal Customer Agreement, which may be viewed at
# https://www.sw.siemens.com/en-US/sw-terms/base/uca/, as supplemented by the
# electronic design automation (EDA) specific terms which may be viewed at
# https://www.sw.siemens.com/en-US/sw-terms/supplements/.

# NOTWITHSTANDING ANYTHING TO THE CONTRARY IN YOUR SIGNED LICENSE AGREMENT WITH
# SISW OR THE SISW END USER LICENSE AGREEMENT, THIS SOFTWARE IS BEING PROVIDED “AS
# IS;” SISW MAKES NO WARRANTY OF ANY KIND WITH REGARD TO THIS SOFTWARE INCLUDING,
# BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY, FITNESS FOR A
# PARTICULAR PURPOSE, AND NON-INFRINGEMENT OF INTELLECTUAL PROPERTY. SISW SHALL
# NOT BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, CONSEQUENTIAL OR PUNITIVE
# DAMAGES, LOST DATA OR PROFITS, EVEN IF SUCH DAMAGES WERE FORESEEABLE, ARISING
# OUT OF OR RELATED TO THIS SOFTWARE OR THE INFORMATION CONTAINED IN IT, EVEN IF
# SISW HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.

# Unless agreed in writing, SISW has no obligation to support or otherwise
# maintain this Software.
import argparse
from pathlib import Path
import pyquesta
import os

parser = argparse.ArgumentParser(description="Generate SVConduit packages")
parser.add_argument('--makefiles', action="store_true", help='Output path to pyquesta.mk dir', default=False)
parser.add_argument('--dpi-dir', action="store_true", help='Output path to DPI src dir', default=False)
args = parser.parse_args()

if __name__ == "__main__":
    pyquesta_path = Path(os.path.join(os.path.dirname(pyquesta.__file__)))  # make this Path one day
    if args.makefiles:
        makefile_path = pyquesta_path / "makefiles"
        print(makefile_path)
    elif args.dpi_dir:
        dpi_path = pyquesta_path / "dpi"
        print(dpi_path)
    else:
        parser.print_help()
