From 825846b2fa2ae8f95ccacf4ab383948722e72f30 Mon Sep 17 00:00:00 2001 From: Peter Gadfort Date: Tue, 20 Feb 2024 10:35:56 -0500 Subject: [PATCH] move to use sc_package.register_python_data_source --- lambdapdk/__init__.py | 25 +++++++++++-------------- pyproject.toml | 4 ++-- 2 files changed, 13 insertions(+), 16 deletions(-) diff --git a/lambdapdk/__init__.py b/lambdapdk/__init__.py index 871e1839..015553bc 100644 --- a/lambdapdk/__init__.py +++ b/lambdapdk/__init__.py @@ -1,18 +1,15 @@ -import os +import siliconcompiler.package as sc_package + + __version__ = "0.1.8" def register_data_source(chip): - # check if local - root_path = os.path.dirname(os.path.dirname(__file__)) - test_path = os.path.join(root_path, 'lambdapdk', 'asap7', 'base', 'apr', 'asap7_tech.lef') - if os.path.exists(test_path): - path = root_path - ref = None - else: - path = 'git+https://github.com/siliconcompiler/lambdapdk.git' - ref = f'v{__version__}' - - chip.register_package_source(name='lambdapdk', - path=path, - ref=ref) + sc_package.register_python_data_source( + chip, + "lambdapdk", + "lambdapdk", + "git+https://github.com/siliconcompiler/lambdapdk.git", + alternative_ref=f"v{__version__}", + python_module_path_append=".." + ) diff --git a/pyproject.toml b/pyproject.toml index d76694d6..c6b0cb5a 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -13,7 +13,7 @@ urls = {Homepage = "https://github.com/siliconcompiler/lambdapdk"} requires-python = ">= 3.8" license = {file = "LICENSE"} dependencies = [ - "siliconcompiler >= 0.18.1" + "siliconcompiler >= 0.20.2" ] dynamic = ['version'] @@ -31,7 +31,7 @@ dev = [ "pytest >= 6.2.4", "pytest-timeout >= 2.1.0", "tclint >= 0.1.4", - "lambdalib >= 0.1.4" + "lambdalib >= 0.1.5" ] [tool.tclint]