Skip to content

Commit

Permalink
Merge pull request #21 from siliconcompiler/move-to-python-registar
Browse files Browse the repository at this point in the history
move to use sc_package.register_python_data_source
  • Loading branch information
gadfort committed Feb 20, 2024
2 parents 7e85765 + 825846b commit 0817b75
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 16 deletions.
25 changes: 11 additions & 14 deletions lambdapdk/__init__.py
Original file line number Diff line number Diff line change
@@ -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=".."
)
4 changes: 2 additions & 2 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -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']

Expand All @@ -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]
Expand Down

0 comments on commit 0817b75

Please sign in to comment.