Browse Source

Unset executable bit & remove !#shebang

Unset executable bit from all python sources upon installation, and
remove shebang from all python modules w/o `if __name__ == '__main__'`.

There are corresponding wrappers provided in the $(PREFIX)/bin/ for each
python script (not ui_*.py), so there should be no need to call these
source files directly as commands. Even those python sources which do
not have a script in $(PREFIX)/bin/ -- they are just being imported into
other modules, and their `__name__ == '__main__'` exists simply for
debugging purposes.

Also, restricting to only single valid entry point adheres to

  The Zen of Python
  =================
  There should be one-- and preferably only one --obvious way to do it.

Fixes #240
pull/306/head
ivan tkachenko 3 years ago
parent
commit
525bed3fb5
No known key found for this signature in database GPG Key ID: 4D197017E61437CF
12 changed files with 1 additions and 12 deletions
  1. +1
    -1
      Makefile
  2. +0
    -1
      src/canvaspreviewframe.py
  3. +0
    -1
      src/claudia_database.py
  4. +0
    -1
      src/clickablelabel.py
  5. +0
    -1
      src/jacklib.py
  6. +0
    -1
      src/jacklib_helpers.py
  7. +0
    -1
      src/patchcanvas.py
  8. +0
    -1
      src/patchcanvas_theme.py
  9. +0
    -1
      src/shared.py
  10. +0
    -1
      src/shared_cadence.py
  11. +0
    -1
      src/shared_canvasjack.py
  12. +0
    -1
      src/shared_settings.py

+ 1
- 1
Makefile View File

@@ -159,7 +159,7 @@ install:
install -m 644 resources/scalable/claudia-launcher.svg $(DESTDIR)$(PREFIX)/share/icons/hicolor/scalable/apps/

# Install main code
install -m 755 src/*.py $(DESTDIR)$(PREFIX)/share/cadence/src/
install -m 644 src/*.py $(DESTDIR)$(PREFIX)/share/cadence/src/

# Install addtional stuff for Cadence
install -m 644 data/pulse2jack/* $(DESTDIR)$(PREFIX)/share/cadence/pulse2jack/


+ 0
- 1
src/canvaspreviewframe.py View File

@@ -1,4 +1,3 @@
#!/usr/bin/env python3
# -*- coding: utf-8 -*-

# Custom Mini Canvas Preview, a custom Qt widget


+ 0
- 1
src/claudia_database.py View File

@@ -1,4 +1,3 @@
#!/usr/bin/env python3
# -*- coding: utf-8 -*-

# Package database


+ 0
- 1
src/clickablelabel.py View File

@@ -1,4 +1,3 @@
#!/usr/bin/env python3
# -*- coding: utf-8 -*-

# Clickable Label, a custom Qt widget


+ 0
- 1
src/jacklib.py View File

@@ -1,4 +1,3 @@
#!/usr/bin/env python3
# -*- coding: utf-8 -*-

# JACK ctypes definitions for usage in python applications


+ 0
- 1
src/jacklib_helpers.py View File

@@ -1,4 +1,3 @@
#!/usr/bin/env python3
# -*- coding: utf-8 -*-

# Helper functions for extra jacklib functionality


+ 0
- 1
src/patchcanvas.py View File

@@ -1,4 +1,3 @@
#!/usr/bin/env python3
# -*- coding: utf-8 -*-

# PatchBay Canvas engine using QGraphicsView/Scene


+ 0
- 1
src/patchcanvas_theme.py View File

@@ -1,4 +1,3 @@
#!/usr/bin/env python3
# -*- coding: utf-8 -*-

# PatchBay Canvas Themes


+ 0
- 1
src/shared.py View File

@@ -1,4 +1,3 @@
#!/usr/bin/env python3
# -*- coding: utf-8 -*-

# Common/Shared code


+ 0
- 1
src/shared_cadence.py View File

@@ -1,4 +1,3 @@
#!/usr/bin/env python3
# -*- coding: utf-8 -*-

# Common/Shared code for Cadence


+ 0
- 1
src/shared_canvasjack.py View File

@@ -1,4 +1,3 @@
#!/usr/bin/env python3
# -*- coding: utf-8 -*-

# Common/Shared code related to Canvas and JACK


+ 0
- 1
src/shared_settings.py View File

@@ -1,4 +1,3 @@
#!/usr/bin/env python3
# -*- coding: utf-8 -*-

# Common/Shared code related to the Settings dialog


Loading…
Cancel
Save