Portable: Create empty plugins directory.
Fixed file permissions.
This commit is contained in:
parent
09757f4f0d
commit
7add4c5691
0
extras/openslides_gui/gui.py
Executable file → Normal file
0
extras/openslides_gui/gui.py
Executable file → Normal file
@ -510,6 +510,10 @@ def main():
|
|||||||
os.path.join(odir, "packages-info"))
|
os.path.join(odir, "packages-info"))
|
||||||
write_package_info_content(os.path.join(odir, 'packages-info', 'PACKAGES.txt'))
|
write_package_info_content(os.path.join(odir, 'packages-info', 'PACKAGES.txt'))
|
||||||
|
|
||||||
|
# Create empty plugins directory
|
||||||
|
plugindir = os.path.join(odir, "openslides", "plugins")
|
||||||
|
os.makedirs(plugindir)
|
||||||
|
|
||||||
# AUTHORS, LICENSE, README
|
# AUTHORS, LICENSE, README
|
||||||
write_metadatafile('AUTHORS', os.path.join(odir, 'AUTHORS.txt'))
|
write_metadatafile('AUTHORS', os.path.join(odir, 'AUTHORS.txt'))
|
||||||
write_metadatafile('LICENSE', os.path.join(odir, 'LICENSE.txt'))
|
write_metadatafile('LICENSE', os.path.join(odir, 'LICENSE.txt'))
|
||||||
|
8
openslides/utils/plugins.py
Executable file → Normal file
8
openslides/utils/plugins.py
Executable file → Normal file
@ -1,7 +1,7 @@
|
|||||||
# -*- coding: utf-8 -*-
|
# -*- coding: utf-8 -*-
|
||||||
|
|
||||||
import pkgutil
|
|
||||||
import os
|
import os
|
||||||
|
import pkgutil
|
||||||
import sys
|
import sys
|
||||||
|
|
||||||
from django.utils.importlib import import_module
|
from django.utils.importlib import import_module
|
||||||
@ -35,9 +35,10 @@ def get_plugins_from_path(path):
|
|||||||
|
|
||||||
|
|
||||||
def collect_plugins():
|
def collect_plugins():
|
||||||
"""Collect all plugins that can be automatically discovered."""
|
"""
|
||||||
|
Collect all plugins that can be automatically discovered.
|
||||||
|
"""
|
||||||
plugins = get_plugins_from_entry_points()
|
plugins = get_plugins_from_entry_points()
|
||||||
|
|
||||||
# add all modules in plugins/ dir of portable automatically
|
# add all modules in plugins/ dir of portable automatically
|
||||||
if detect_openslides_type() == WINDOWS_PORTABLE_VERSION:
|
if detect_openslides_type() == WINDOWS_PORTABLE_VERSION:
|
||||||
plugins_path = os.path.join(
|
plugins_path = os.path.join(
|
||||||
@ -45,7 +46,6 @@ def collect_plugins():
|
|||||||
if plugins_path not in sys.path:
|
if plugins_path not in sys.path:
|
||||||
sys.path.append(plugins_path)
|
sys.path.append(plugins_path)
|
||||||
plugins += get_plugins_from_path(plugins_path)
|
plugins += get_plugins_from_path(plugins_path)
|
||||||
|
|
||||||
return plugins
|
return plugins
|
||||||
|
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user