forked from microsoft/vscode-python
-
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.
allow access to path to access requirement.txt
- Loading branch information
1 parent
3f25b72
commit e0eb242
Showing
2 changed files
with
26 additions
and
0 deletions.
There are no files selected for viewing
File renamed without changes.
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 |
---|---|---|
@@ -0,0 +1,26 @@ | ||
# import github | ||
# import os | ||
|
||
# GH = github.Github(os.getenv("GITHUB_ACCESS_TOKEN")) | ||
# GH_REPO = GH.get_repo(os.getenv("GITHUB_REPOSITORY")) | ||
|
||
|
||
import pathlib | ||
|
||
|
||
def main(): | ||
# load in list of packages and its version from requirements.txt that is in one directory above | ||
root_path = pathlib.Path(__file__).parent.parent.parent | ||
requirement_path = pathlib.Path(root_path, "requirements.txt").read_text( | ||
encoding="utf-8" | ||
) | ||
# with open(requirement_path, "r") as f: | ||
# packages = f.readlines() | ||
# packages = [package.strip() for package in packages] | ||
# packages = [package.split("==") for package in packages] | ||
# print(packages) | ||
print(requirement_path) | ||
|
||
|
||
if __name__ == "__main__": | ||
main() |