Skip to content

Python packaging should not call compileall on the install folder since it is likely installed as root #609

@jay-sridharan

Description

@jay-sridharan

This line here calls python3 -m compileall <my_package_install_dir> but this is usually inside a system folder and is installed using root.

This causes permission errors during packaging. The compileall should only happen if the install target is called, because the install command is usually executed like

sudo cmake --install <build_dir>

because it needs root permissions anyway to do the install. But packaging should be able to happen without needing to write to any root-owned folders, which is what the compileall module is trying to do.

\"${CMAKE_INSTALL_PREFIX}/${ARG_DESTINATION}/${package_name}\"

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions