summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorantialias <antialias@leap.se>2012-10-08 16:52:23 -0400
committerantialias <antialias@leap.se>2012-10-08 16:52:23 -0400
commitc561063117f006e05a2953ee920a9a290e8d5b96 (patch)
tree6d4b6a5acccd1060cb0276e74b93e1b1f7d109c3
parentf751247efd8b941989b4f72397bda03e66dee7c0 (diff)
parent7ba328fb9ce68b108c9e3d8670f9aabc883be99c (diff)
Merge branch 'feature/fix-polkit-install' of ssh://leap.se/leap_client into develop
-rw-r--r--.gitignore1
-rwxr-xr-xsetup.py33
2 files changed, 29 insertions, 5 deletions
diff --git a/.gitignore b/.gitignore
index a8e2ce6d..c577e14f 100644
--- a/.gitignore
+++ b/.gitignore
@@ -18,4 +18,5 @@ src/leap.egg-info/
src/leap_client.egg-info
src/leap/_branding.py
src/leap/certs/*.pem
+src/*.egg-info
MANIFEST
diff --git a/setup.py b/setup.py
index 74775dd0..e1566752 100755
--- a/setup.py
+++ b/setup.py
@@ -159,11 +159,38 @@ class cmd_sdist(_sdist):
versioneer.SHORT_VERSION_PY % self._versioneer_generated_versions)
f.close()
+from distutils.command.install_data import install_data as _install_data
+
+
+class cmd_post_install(_install_data):
+ """
+ workaround for installing non-package data
+ outside of the bounds of our internal data
+ Debian or other packaging should igore this.
+ """
+ # We could use a environmental flag.
+ def run(self):
+ _install_data.run(self)
+ # 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...")
+ shutil.copyfile(
+ "pkg/linux/polkit/net.openvpn.gui.leap.policy",
+ "/usr/share/polkit-1/actions"
+ "/net.openvpn.gui.leap.policy")
cmdclass = versioneer.get_cmdclass()
cmdclass["branding"] = DoBranding
cmdclass["build"] = cmd_build
cmdclass["sdist"] = cmd_sdist
+cmdclass["install_data"] = cmd_post_install
+
launcher_name = branding.get_shortname()
if launcher_name:
@@ -205,7 +232,7 @@ setup(
include_package_data=True,
zip_safe=False,
- # add platform switch
+ # not being used since setuptools does not like it.
data_files=[
("share/man/man1",
["docs/leap.1"]),
@@ -213,11 +240,7 @@ setup(
["pkg/linux/polkit/net.openvpn.gui.leap.policy"])
],
platforms="all",
- #scripts=["pkg/scripts/leap"],
entry_points = {
'console_scripts': [leap_launcher]
},
- #entry_points="""
- # -*- Entry points: -*-
- #""",
)