mirror of
https://github.com/meshtastic/python.git
synced 2026-01-01 20:38:03 -05:00
refactor version info so pyinstaller will work; add build mac and ubuntu standalone executables
This commit is contained in:
26
.github/workflows/build_mac.yml
vendored
Normal file
26
.github/workflows/build_mac.yml
vendored
Normal file
@@ -0,0 +1,26 @@
|
||||
name: Build and publish mac standalone executable
|
||||
|
||||
on: workflow_dispatch
|
||||
|
||||
jobs:
|
||||
build-and-publish:
|
||||
runs-on: macos-latest
|
||||
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v2
|
||||
|
||||
- name: Set up Python 3.9
|
||||
uses: actions/setup-python@v2
|
||||
with:
|
||||
python-version: 3.9
|
||||
|
||||
- name: Build
|
||||
run: |
|
||||
pip install pyinstaller
|
||||
pip install -r requirements.txt
|
||||
pyinstaller -F -n meshtastic meshtastic/__main__.py
|
||||
- uses: actions/upload-artifact@v2
|
||||
with:
|
||||
name: meshtastic
|
||||
path: dist
|
||||
26
.github/workflows/build_ubuntu.yml
vendored
Normal file
26
.github/workflows/build_ubuntu.yml
vendored
Normal file
@@ -0,0 +1,26 @@
|
||||
name: Build and publish ubuntu standalone executable
|
||||
|
||||
on: workflow_dispatch
|
||||
|
||||
jobs:
|
||||
build-and-publish:
|
||||
runs-on: ubuntu-latest
|
||||
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v2
|
||||
|
||||
- name: Set up Python 3.9
|
||||
uses: actions/setup-python@v2
|
||||
with:
|
||||
python-version: 3.9
|
||||
|
||||
- name: Build
|
||||
run: |
|
||||
pip install pyinstaller
|
||||
pip install -r requirements.txt
|
||||
pyinstaller -F -n meshtastic meshtastic/__main__.py
|
||||
- uses: actions/upload-artifact@v2
|
||||
with:
|
||||
name: meshtastic
|
||||
path: dist
|
||||
2
.github/workflows/build_windows.yml
vendored
2
.github/workflows/build_windows.yml
vendored
@@ -15,7 +15,7 @@ jobs:
|
||||
with:
|
||||
python-version: 3.9
|
||||
|
||||
- name: Build exe
|
||||
- name: Build
|
||||
run: |
|
||||
pip install pyinstaller
|
||||
pip install -r requirements.txt
|
||||
|
||||
1
.gitignore
vendored
1
.gitignore
vendored
@@ -14,3 +14,4 @@ venv/
|
||||
.DS_Store
|
||||
__pycache__
|
||||
examples/__pycache__
|
||||
meshtastic.spec
|
||||
|
||||
@@ -818,8 +818,8 @@ def initParser():
|
||||
|
||||
parser.set_defaults(deprecated=None)
|
||||
|
||||
parser.add_argument('--version', action='version',
|
||||
version=f"{pkg_resources.require('meshtastic')[0].version}")
|
||||
the_version = pkg_resources.get_distribution("meshtastic").version
|
||||
parser.add_argument('--version', action='version', version=f"{the_version}")
|
||||
|
||||
parser.add_argument(
|
||||
"--support", action='store_true', help="Show support info (useful when troubleshooting an issue)")
|
||||
|
||||
@@ -195,7 +195,8 @@ def support_info():
|
||||
print(' Machine: {0}'.format(platform.uname().machine))
|
||||
print(' Encoding (stdin): {0}'.format(sys.stdin.encoding))
|
||||
print(' Encoding (stdout): {0}'.format(sys.stdout.encoding))
|
||||
print(' meshtastic: v{0}'.format(pkg_resources.require('meshtastic')[0].version))
|
||||
the_version = pkg_resources.get_distribution("meshtastic").version
|
||||
print(' meshtastic: v{0}'.format(the_version))
|
||||
print(' Executable: {0}'.format(sys.argv[0]))
|
||||
print(' Python: {0} {1} {2}'.format(platform.python_version(),
|
||||
platform.python_implementation(), platform.python_compiler()))
|
||||
|
||||
Reference in New Issue
Block a user