Commit e60abdcb authored by Kali Kaneko's avatar Kali Kaneko
Browse files

add polkit install bypass with environment variable

LEAP_SKIP_COPY_POLKIT should be set to 1 to skip the post-install
data copy to the policykit folder.
parent dca30766
......@@ -171,19 +171,34 @@ class cmd_post_install(_install_data):
# We could use a environmental flag.
def run(self):
# is this the real life?
# is this just fantasy?
# get environ flag to skip copy
skip_copy_val = os.environ.get('LEAP_SKIP_COPY_POLKIT', '0')
skip_copy = bool(int(skip_copy_val))
except ValueError:
skip_copy = False
print("WARNING! LEAP_SKIP_COPY_POLKIT must be '0' or '1'")
if skip_copy is True:
print("Skipping install of policykit file per environ var.")
print('about to check for virtualenv')
# is this the real life? is this just fantasy?
if not hasattr(sys, 'real_prefix'):
# looks like we are NOT
# running inside a virtualenv...
# let's install data.
# XXX should add platform switch
import shutil
print("Now installing policykit file...")
print("WARNING! Could not copy data.")
print('inside virtualenv. skipping policykit file install')
cmdclass = versioneer.get_cmdclass()
cmdclass["branding"] = DoBranding
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment