diff --git a/.github/workflows/release_linux.yml b/.github/workflows/release_linux.yml index 87bbd001..727cf1a3 100644 --- a/.github/workflows/release_linux.yml +++ b/.github/workflows/release_linux.yml @@ -40,7 +40,7 @@ jobs: -n nanovna-saver \ --add-data "build/lib/python3.*/site-packages/PyQt6/sip.*.so:PyQt6/sip.so" \ --add-data "build/lib/python3.*/site-packages/PyQt6/Qt6:PyQt6/Qt6" \ - nanovna-saver.py + src/nanovna-saver.py - name: Archive production artifacts uses: actions/upload-artifact@v1 with: diff --git a/.github/workflows/release_win.yml b/.github/workflows/release_win.yml index f0eafb66..4c082cd9 100644 --- a/.github/workflows/release_win.yml +++ b/.github/workflows/release_win.yml @@ -42,7 +42,7 @@ jobs: -n nanovna-saver.exe ` --add-data "venv/Lib/site-packages/PyQt6/sip.cp*-win_amd64.pyd;PyQt6/sip.pyd" ` --add-data "venv/Lib/site-packages/PyQt6/Qt6;PyQt6/Qt6" ` - nanovna-saver.py + src/nanovna-saver.py - name: Archive production artifacts uses: actions/upload-artifact@v1 with: diff --git a/nanovna-saver.py b/src/nanovna-saver.py similarity index 73% rename from nanovna-saver.py rename to src/nanovna-saver.py index baa34aed..e6a0c83a 100755 --- a/nanovna-saver.py +++ b/src/nanovna-saver.py @@ -19,19 +19,7 @@ # This launcher is ignored by setuptools. Its only purpose is direct # execution from a source tree. -import os.path -import sys - -# Ignore the current working directory. -src = os.path.join(os.path.dirname(__file__), "src") - -if os.path.exists(src): - sys.path.insert(0, src) - -# pylint: disable-next=wrong-import-position import NanoVNASaver.__main__ -# The traditional test does not make sense here. -assert __name__ == "__main__" - -NanoVNASaver.__main__.main() +if __name__ == '__main__': + NanoVNASaver.__main__.main()