-
Notifications
You must be signed in to change notification settings - Fork 17
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
69607f6
commit 21bc641
Showing
5 changed files
with
48 additions
and
3 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,3 +1,3 @@ | ||
libclang | ||
pefile | ||
pyxbe | ||
libclang~=16.0.0 | ||
pefile~=2023.2.7 | ||
pyxbe~=1.0.2 |
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,33 @@ | ||
from pathlib import Path | ||
import logging | ||
|
||
import pkg_resources | ||
|
||
import color | ||
|
||
log = logging.getLogger(__name__) | ||
|
||
|
||
def check_requirements() -> None: | ||
requirements_path = Path(__file__).parent.with_name("requirements.txt") | ||
|
||
with open(requirements_path, "r", encoding="utf-8") as f: | ||
requirements = f.readlines() | ||
|
||
try: | ||
pkg_resources.require(requirements) | ||
except pkg_resources.DistributionNotFound as e: | ||
log.error("Required package '%s' is not installed. Please install project requirements via requirements.txt.", e.req) | ||
exit(1) | ||
except pkg_resources.VersionConflict as e: | ||
log.error("There is a package version conflict. '%s' is installed, but '%s' is required. Please install project requirements via requirements.txt.", e.dist, e.req) | ||
exit(1) | ||
|
||
|
||
def main(): | ||
check_requirements() | ||
|
||
|
||
if __name__ == '__main__': | ||
logging.basicConfig(level=logging.INFO, handlers=[color.ColorLogHandler()]) | ||
main() |
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
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
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