From 67120dc79170d4254d23f44fa6fecaed4da9b13a Mon Sep 17 00:00:00 2001 From: Kali Kaneko Date: Tue, 27 Aug 2013 00:01:53 +0200 Subject: Add data_files under linux * polkit file * /etc/leap/resolv-update --- setup.py | 22 ++++++++++++++++------ 1 file changed, 16 insertions(+), 6 deletions(-) (limited to 'setup.py') diff --git a/setup.py b/setup.py index 2c80eb5c..7f2a5011 100755 --- a/setup.py +++ b/setup.py @@ -108,6 +108,21 @@ class cmd_sdist(versioneer_sdist): cmdclass["build"] = cmd_build cmdclass["sdist"] = cmd_sdist +import platform +_system = platform.system() +IS_LINUX = True if _system == "Linux" else False + +if IS_LINUX: + data_files = [ + # ("share/man/man1", + # ["docs/man/bitmask.1"]), + ("share/polkit-1/actions", + ["pkg/linux/polkit/net.openvpn.gui.leap.policy"]), + ("/etc/leap/", + ["pkg/linux/resolv-update"]), + ] +else: + data_files = [] setup( name="leap.bitmask", @@ -146,12 +161,7 @@ setup( include_package_data=True, # not being used? -- setuptools does not like it. # looks like debhelper is honoring it... - data_files=[ - # ("share/man/man1", - # ["docs/man/bitmask.1"]), - ("share/polkit-1/actions", - ["pkg/linux/polkit/net.openvpn.gui.leap.policy"]), - ], + data_files=data_files, zip_safe=False, platforms="all", entry_points={ -- cgit v1.2.3 From 4da5d2ef7a6671c6f7f83a290c52441da5ac9873 Mon Sep 17 00:00:00 2001 From: Kali Kaneko Date: Wed, 4 Sep 2013 17:14:17 +0200 Subject: warn user if python3 is used to run setup --- setup.py | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) (limited to 'setup.py') diff --git a/setup.py b/setup.py index 7f2a5011..5099c1b1 100755 --- a/setup.py +++ b/setup.py @@ -1,10 +1,33 @@ #!/usr/bin/env python # -*- coding: utf-8 -*- +# setup.py +# Copyright (C) 2013 LEAP +# +# This program is free software: you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation, either version 3 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program. If not, see . +""" +Setup file for bitmask. +""" from __future__ import print_function import sys +if not sys.version_info[0] == 2: + print("[ERROR] Sorry, Python 3 is not supported (yet). " + "Try running with python2: python2 setup.py ...") + exit() + try: from setuptools import setup, find_packages except ImportError: -- cgit v1.2.3 From a114a0003695ed8a31277b83f99dd64a100988ed Mon Sep 17 00:00:00 2001 From: Kali Kaneko Date: Tue, 10 Sep 2013 19:13:15 +0200 Subject: do not try to install globally. --- setup.py | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'setup.py') diff --git a/setup.py b/setup.py index 5099c1b1..88cb0e40 100755 --- a/setup.py +++ b/setup.py @@ -135,17 +135,17 @@ import platform _system = platform.system() IS_LINUX = True if _system == "Linux" else False +data_files = [] + if IS_LINUX: + # XXX use check_for_permissions to install data + # globally. See #3805 data_files = [ - # ("share/man/man1", - # ["docs/man/bitmask.1"]), ("share/polkit-1/actions", ["pkg/linux/polkit/net.openvpn.gui.leap.policy"]), - ("/etc/leap/", + ("etc/leap/", ["pkg/linux/resolv-update"]), ] -else: - data_files = [] setup( name="leap.bitmask", -- cgit v1.2.3