-
Notifications
You must be signed in to change notification settings - Fork 33
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
Showing
4 changed files
with
100 additions
and
58 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
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,16 @@ | ||
# Adalink main entry point for PyInstaller. | ||
# | ||
# This is necessary because pointing PyInstaller at the adalink.main module | ||
# directly will produce an executable that doesn't work (it fails to resolve | ||
# the relative imports). Instead this module serves as a simple 'bootstrap' | ||
# that imports adalink and calls its main without any relative imports. | ||
# | ||
# You don't need or want to call this script directly, it's only for pointing | ||
# PyInstaller at to produce a standalone executable! | ||
# | ||
# Author: Tony DiCola | ||
import adalink.main | ||
|
||
|
||
if __name__ == '__main__': | ||
adalink.main.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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,3 @@ | ||
# Adalink tool version. Will be used in the setup.py script and shown with | ||
# the --version command line parameter. | ||
__version__ = '2.2.0' | ||
__version__ = '2.3.0' |
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,16 @@ | ||
# adalink.cores Module | ||
# | ||
# Import all python files in the directory to simplify adding a new core. | ||
# Just drop a new core .py file in the directory and it will be picked up | ||
# automatically. | ||
# Import all python files in the directory to make them available to use. | ||
# | ||
# Author: Tony DiCola | ||
import os | ||
|
||
|
||
# Import all python files in the cores directory by setting them to the __all__ | ||
# global which tells python the modules to load. Grabs a list of all files in | ||
# the directory and filters down to just the names (without .py extensions) of | ||
# python files that don't start with '__' (which are module metadata that should | ||
# be ignored. | ||
__all__ = map(lambda x: x[:-3], | ||
filter(lambda x: not x.startswith('__') and x.lower().endswith('.py'), | ||
os.listdir(__path__[0]))) | ||
# Import all python files in the cores directory manually. This is a change | ||
# from previous behavior which automatically imported cores, but relied on | ||
# somewhat brittle behavior for finding the path of the current script (and | ||
# would have problems with py2exe). Since dynamically loading new cores | ||
# isn't really that important, just import each one explicitly: | ||
import atsamd21g18 | ||
import lpc824 | ||
import lpc1343 | ||
import nrf51822 | ||
import stm32f2 |