mirror of
https://github.com/IfcOpenShell/IfcOpenShell.git
synced 2026-09-28 03:05:33 +00:00
Ensure files in libs/bin are executable
When blender extracts wheels it doesn't preserve executable permissions
This commit is contained in:
@@ -21,6 +21,7 @@ import bpy
|
|||||||
import bmesh
|
import bmesh
|
||||||
import json
|
import json
|
||||||
import os
|
import os
|
||||||
|
import platform
|
||||||
from ifcopenshell import entity_instance
|
from ifcopenshell import entity_instance
|
||||||
import ifcopenshell.api
|
import ifcopenshell.api
|
||||||
import ifcopenshell.util.element
|
import ifcopenshell.util.element
|
||||||
@@ -437,6 +438,16 @@ class Blender(bonsai.core.tool.Blender):
|
|||||||
current_path = os.environ["PATH"]
|
current_path = os.environ["PATH"]
|
||||||
if bin_dir not in current_path:
|
if bin_dir not in current_path:
|
||||||
os.environ["PATH"] = current_path + os.pathsep + bin_dir
|
os.environ["PATH"] = current_path + os.pathsep + bin_dir
|
||||||
|
# files need to be executable
|
||||||
|
if platform.system() != "Windows":
|
||||||
|
for filename in os.listdir(bin_dir):
|
||||||
|
file_path = os.path.join(bin_dir, filename)
|
||||||
|
if os.path.isfile(file_path):
|
||||||
|
current_permissions = os.stat(file_path).st_mode
|
||||||
|
try:
|
||||||
|
os.chmod(file_path, current_permissions | 0o100)
|
||||||
|
except PermissionError:
|
||||||
|
pass
|
||||||
|
|
||||||
@classmethod
|
@classmethod
|
||||||
def get_default_selection_keypmap(cls) -> tuple:
|
def get_default_selection_keypmap(cls) -> tuple:
|
||||||
|
|||||||
Reference in New Issue
Block a user