-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #21 from siliconcompiler/move-to-python-registar
move to use sc_package.register_python_data_source
- Loading branch information
Showing
2 changed files
with
13 additions
and
16 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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=".." | ||
) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters