From f1c397a70c6ecbc7dfed978752f69ebe351433d6 Mon Sep 17 00:00:00 2001 From: kali Date: Wed, 30 Jan 2013 14:12:18 +0900 Subject: fix pep8 that was breaking pkg build --- src/leap/_version.py | 33 ++++++++++++++++++++------------- 1 file changed, 20 insertions(+), 13 deletions(-) diff --git a/src/leap/_version.py b/src/leap/_version.py index c33430ea..6f7e3d05 100644 --- a/src/leap/_version.py +++ b/src/leap/_version.py @@ -17,6 +17,7 @@ git_full = "$Format:%H$" import subprocess import sys + def run_command(args, cwd=None, verbose=False): try: # remember shell=False, so use git.cmd on windows, not just git @@ -41,6 +42,7 @@ import sys import re import os.path + def get_expanded_variables(versionfile_source): # the code embedded in _version.py can just fetch the value of these # variables. When used from setup.py, we don't want to import @@ -48,7 +50,7 @@ def get_expanded_variables(versionfile_source): # used from _version.py. variables = {} try: - for line in open(versionfile_source,"r").readlines(): + for line in open(versionfile_source, "r").readlines(): if line.strip().startswith("git_refnames ="): mo = re.search(r'=\s*"(.*)"', line) if mo: @@ -61,12 +63,13 @@ def get_expanded_variables(versionfile_source): pass return variables + def versions_from_expanded_variables(variables, tag_prefix, verbose=False): refnames = variables["refnames"].strip() if refnames.startswith("$Format"): if verbose: print("variables are unexpanded, not using") - return {} # unexpanded, so not in an unpacked git-archive tarball + return {} # unexpanded, so not in an unpacked git-archive tarball refs = set([r.strip() for r in refnames.strip("()").split(",")]) for ref in list(refs): if not re.search(r'\d', ref): @@ -87,13 +90,14 @@ def versions_from_expanded_variables(variables, tag_prefix, verbose=False): r = ref[len(tag_prefix):] if verbose: print("picking %s" % r) - return { "version": r, - "full": variables["full"].strip() } + return {"version": r, + "full": variables["full"].strip()} # no suitable tags, so we use the full revision id if verbose: print("no suitable tags, using full revision id") - return { "version": variables["full"].strip(), - "full": variables["full"].strip() } + return {"version": variables["full"].strip(), + "full": variables["full"].strip()} + def versions_from_vcs(tag_prefix, versionfile_source, verbose=False): # this runs 'git' from the root of the source tree. That either means @@ -110,7 +114,7 @@ def versions_from_vcs(tag_prefix, versionfile_source, verbose=False): here = os.path.abspath(__file__) except NameError: # some py2exe/bbfreeze/non-CPython implementations don't do __file__ - return {} # not always correct + return {} # not always correct # versionfile_source is the relative path from the top of the source tree # (where the .git directory might live) to this file. Invert this to find @@ -135,7 +139,8 @@ def versions_from_vcs(tag_prefix, versionfile_source, verbose=False): return {} if not stdout.startswith(tag_prefix): if verbose: - print("tag '%s' doesn't start with prefix '%s'" % (stdout, tag_prefix)) + print("tag '%s' doesn't start with prefix '%s'" % ( + stdout, tag_prefix)) return {} tag = stdout[len(tag_prefix):] stdout = run_command([GIT, "rev-parse", "HEAD"], cwd=root) @@ -147,7 +152,8 @@ def versions_from_vcs(tag_prefix, versionfile_source, verbose=False): return {"version": tag, "full": full} -def versions_from_parentdir(parentdir_prefix, versionfile_source, verbose=False): +def versions_from_parentdir(parentdir_prefix, versionfile_source, + verbose=False): if IN_LONG_VERSION_PY: # We're running from _version.py. If it's from a source tree # (execute-in-place), we can work upwards to find the root of the @@ -157,7 +163,7 @@ def versions_from_parentdir(parentdir_prefix, versionfile_source, verbose=False) here = os.path.abspath(__file__) except NameError: # py2exe/bbfreeze/non-CPython don't have __file__ - return {} # without __file__, we have no hope + return {} # without __file__, we have no hope # versionfile_source is the relative path from the top of the source # tree to _version.py. Invert this to find the root from __file__. root = here @@ -174,7 +180,8 @@ def versions_from_parentdir(parentdir_prefix, versionfile_source, verbose=False) dirname = os.path.basename(root) if not dirname.startswith(parentdir_prefix): if verbose: - print("guessing rootdir is '%s', but '%s' doesn't start with prefix '%s'" % + print("guessing rootdir is '%s', but '%s' " + "doesn't start with prefix '%s'" % (root, dirname, parentdir_prefix)) return None return {"version": dirname[len(parentdir_prefix):], "full": ""} @@ -183,8 +190,9 @@ tag_prefix = "" parentdir_prefix = "leap_client-" versionfile_source = "src/leap/_version.py" + def get_versions(default={"version": "unknown", "full": ""}, verbose=False): - variables = { "refnames": git_refnames, "full": git_full } + variables = {"refnames": git_refnames, "full": git_full} ver = versions_from_expanded_variables(variables, tag_prefix, verbose) if not ver: ver = versions_from_vcs(tag_prefix, versionfile_source, verbose) @@ -194,4 +202,3 @@ def get_versions(default={"version": "unknown", "full": ""}, verbose=False): if not ver: ver = default return ver - -- cgit v1.2.3 From 15e8cf89db0ba3f4921a9ffcae72a0bc4cbf4b69 Mon Sep 17 00:00:00 2001 From: kali Date: Wed, 30 Jan 2013 14:46:56 +0900 Subject: rename manpage I am also commiting the manpage itself temporarily, we should leave only the .rst in the repo! --- Makefile | 2 +- docs/man/leap-client.1 | 83 ++++++++++ docs/man/leap-client.1.rst | 86 ++++++++++ docs/man/leap.1 | 400 +++++++++++++++++++++++++++++++++++++++++++++ docs/man/leap.1.rst | 86 ---------- setup.py | 6 +- 6 files changed, 573 insertions(+), 90 deletions(-) create mode 100644 docs/man/leap-client.1 create mode 100644 docs/man/leap-client.1.rst create mode 100644 docs/man/leap.1 delete mode 100644 docs/man/leap.1.rst diff --git a/Makefile b/Makefile index cfcd47a1..8d63232f 100644 --- a/Makefile +++ b/Makefile @@ -60,7 +60,7 @@ $(COMPILED_DIR)/%_rc.py : $(RESOURCE_DIR)/%.qrc $(PYRCC) $< -o $@ manpages: - rst2man docs/man/leap.1.rst docs/man/leap.1 + rst2man docs/man/leap-client.1.rst docs/man/leap-client.1 apidocs: @sphinx-apidoc -o docs/api src/leap diff --git a/docs/man/leap-client.1 b/docs/man/leap-client.1 new file mode 100644 index 00000000..aef24d85 --- /dev/null +++ b/docs/man/leap-client.1 @@ -0,0 +1,83 @@ +.\" Man page generated from reStructeredText. +. +.TH LEAP-CLIENT 1 "2013-01-30" "0.2" "General Commands Manual" +.SH NAME +leap-client \- graphical client to control LEAP, the encrypted internet access toolkit. +. +.nr rst2man-indent-level 0 +. +.de1 rstReportMargin +\\$1 \\n[an-margin] +level \\n[rst2man-indent-level] +level margin: \\n[rst2man-indent\\n[rst2man-indent-level]] +- +\\n[rst2man-indent0] +\\n[rst2man-indent1] +\\n[rst2man-indent2] +.. +.de1 INDENT +.\" .rstReportMargin pre: +. RS \\$1 +. nr rst2man-indent\\n[rst2man-indent-level] \\n[an-margin] +. nr rst2man-indent-level +1 +.\" .rstReportMargin post: +.. +.de UNINDENT +. RE +.\" indent \\n[an-margin] +.\" old: \\n[rst2man-indent\\n[rst2man-indent-level]] +.nr rst2man-indent-level -1 +.\" new: \\n[rst2man-indent\\n[rst2man-indent-level]] +.in \\n[rst2man-indent\\n[rst2man-indent-level]]u +.. +.SH SYNOPSIS +.sp +leap\-client [\-h] [\-d] [\-l [LOG FILE]] [\-\-openvpn\-verbosity [OPENVPN_VERB]] +.SH DESCRIPTION +.sp +\fIleap\-client\fP is a graphical client to control LEAP, the encrypted internet access toolkit. +.sp +When launched, it places an icon in the system tray from where the LEAP services can be controlled. +.SH OPTIONS +.SS general options +.sp +\fB\-h, \-\-help\fP Print a help message and exit. +.sp +\fB\-d, \-\-debug\fP Launches client in debug mode, writing debug info to stdout. +.sp +\fB\-\-\-logfile=\fP Writes log to file. +.SS openvpn options +.sp +\fB\-\-openvpn\-verbosity\fP [0\-5] Verbosity level for openvpn logs. +.SH WARNING +.sp +This software is still in early alfa testing. So don\(aqt trust your life to it! +.sp +At the current time, the LEAP Client is not compatible with \fBopenresolv\fP, but it works with \fBresolvconf\fP. +.SH FILES +.SS /etc/leap/resolv\-update +.sp +Post up/down script passed to openvpn. It writes /etc/resolv.conf to avoid dns leaks, and restores the original resolv.conf on exit. +.SS /etc/leap/resolv\-head +.SS /etc/leap/resolv\-tail +.sp +Custom entries that will appear in the written resolv.conf +.SS /usr/share/polkit\-1/actions/net.openvpn.gui.leap.policy +.sp +PolicyKit policy file, used for granting access to openvpn without the need of entering a password each time. +.SS ~/.config/leap/ +.sp +Main config folder +.SS ~/.config/leap/leap.conf +.sp +GUI options +.SH BUGS +.sp +Please report any bugs to \fI\%https://leap.se/code\fP +.SH AUTHOR +LEAP Encryption Access Project https://leap.se +.SH COPYRIGHT +GPLv3+ +.\" Generated by docutils manpage writer. +.\" +. diff --git a/docs/man/leap-client.1.rst b/docs/man/leap-client.1.rst new file mode 100644 index 00000000..1ef5b3cc --- /dev/null +++ b/docs/man/leap-client.1.rst @@ -0,0 +1,86 @@ +=========== +leap-client +=========== + +------------------------------------------------------------------------ +graphical client to control LEAP, the encrypted internet access toolkit. +------------------------------------------------------------------------ + +:Author: LEAP Encryption Access Project https://leap.se +:Date: 2013-01-30 +:Copyright: GPLv3+ +:Version: 0.2 +:Manual section: 1 +:Manual group: General Commands Manual + +SYNOPSIS +======== + +leap-client [-h] [-d] [-l [LOG FILE]] [--openvpn-verbosity [OPENVPN_VERB]] + +DESCRIPTION +=========== + +*leap-client* is a graphical client to control LEAP, the encrypted internet access toolkit. + +When launched, it places an icon in the system tray from where the LEAP services can be controlled. + + +OPTIONS +======= + +general options +--------------- + +**-h, --help** Print a help message and exit. + +**-d, --debug** Launches client in debug mode, writing debug info to stdout. + +**---logfile=** Writes log to file. + +openvpn options +--------------- + +**--openvpn-verbosity** [0-5] Verbosity level for openvpn logs. + + +WARNING +======= + +This software is still in early alfa testing. So don't trust your life to it! + +At the current time, the LEAP Client is not compatible with ``openresolv``, but it works with ``resolvconf``. + +FILES +===== + +/etc/leap/resolv-update +----------------------- +Post up/down script passed to openvpn. It writes /etc/resolv.conf to avoid dns leaks, and restores the original resolv.conf on exit. + +/etc/leap/resolv-head +--------------------- +/etc/leap/resolv-tail +--------------------- + +Custom entries that will appear in the written resolv.conf + +/usr/share/polkit-1/actions/net.openvpn.gui.leap.policy +------------------------------------------------------- + +PolicyKit policy file, used for granting access to openvpn without the need of entering a password each time. + +~/.config/leap/ +--------------- + +Main config folder + +~/.config/leap/leap.conf +------------------------ + +GUI options + +BUGS +==== + +Please report any bugs to https://leap.se/code diff --git a/docs/man/leap.1 b/docs/man/leap.1 new file mode 100644 index 00000000..d543bed2 --- /dev/null +++ b/docs/man/leap.1 @@ -0,0 +1,400 @@ + + + + + + +leap-client + + + + + + +
+

leap-client

+

graphical client to control LEAP, the encrypted internet access toolkit.

+ +++ + + + + + + + + + + + + + +
Author:LEAP Encryption Access Project https://leap.se
Date:2013-01-30
Copyright:GPLv3+
Version:0.2
Manual section:1
Manual group:General Commands Manual
+
+

SYNOPSIS

+

leap-client [-h] [-d] [-l [LOG FILE]] [--openvpn-verbosity [OPENVPN_VERB]]

+
+
+

DESCRIPTION

+

leap-client is a graphical client to control LEAP, the encrypted internet access toolkit.

+

When launched, it places an icon in the system tray from where the LEAP services can be controlled.

+
+
+

OPTIONS

+
+

general options

+

-h, --help Print a help message and exit.

+

-d, --debug Launches client in debug mode, writing debug info to stdout.

+

---logfile=<file> Writes log to file.

+
+
+

openvpn options

+

--openvpn-verbosity [0-5] Verbosity level for openvpn logs.

+
+
+
+

WARNING

+

This software is still in early alfa testing. So don't trust your life to it!

+

At the current time, the LEAP Client is not compatible with openresolv, but it works with resolvconf.

+
+
+

FILES

+
+

/etc/leap/resolv-update

+

Post up/down script passed to openvpn. It writes /etc/resolv.conf to avoid dns leaks, and restores the original resolv.conf on exit.

+
+
+

/etc/leap/resolv-head

+
+
+

/etc/leap/resolv-tail

+

Custom entries that will appear in the written resolv.conf

+
+
+

/usr/share/polkit-1/actions/net.openvpn.gui.leap.policy

+

PolicyKit policy file, used for granting access to openvpn without the need of entering a password each time.

+
+
+

~/.config/leap/

+

Main config folder

+
+
+

~/.config/leap/leap.conf

+

GUI options

+
+
+
+

BUGS

+

Please report any bugs to https://leap.se/code

+
+
+ + diff --git a/docs/man/leap.1.rst b/docs/man/leap.1.rst deleted file mode 100644 index 1ef5b3cc..00000000 --- a/docs/man/leap.1.rst +++ /dev/null @@ -1,86 +0,0 @@ -=========== -leap-client -=========== - ------------------------------------------------------------------------- -graphical client to control LEAP, the encrypted internet access toolkit. ------------------------------------------------------------------------- - -:Author: LEAP Encryption Access Project https://leap.se -:Date: 2013-01-30 -:Copyright: GPLv3+ -:Version: 0.2 -:Manual section: 1 -:Manual group: General Commands Manual - -SYNOPSIS -======== - -leap-client [-h] [-d] [-l [LOG FILE]] [--openvpn-verbosity [OPENVPN_VERB]] - -DESCRIPTION -=========== - -*leap-client* is a graphical client to control LEAP, the encrypted internet access toolkit. - -When launched, it places an icon in the system tray from where the LEAP services can be controlled. - - -OPTIONS -======= - -general options ---------------- - -**-h, --help** Print a help message and exit. - -**-d, --debug** Launches client in debug mode, writing debug info to stdout. - -**---logfile=** Writes log to file. - -openvpn options ---------------- - -**--openvpn-verbosity** [0-5] Verbosity level for openvpn logs. - - -WARNING -======= - -This software is still in early alfa testing. So don't trust your life to it! - -At the current time, the LEAP Client is not compatible with ``openresolv``, but it works with ``resolvconf``. - -FILES -===== - -/etc/leap/resolv-update ------------------------ -Post up/down script passed to openvpn. It writes /etc/resolv.conf to avoid dns leaks, and restores the original resolv.conf on exit. - -/etc/leap/resolv-head ---------------------- -/etc/leap/resolv-tail ---------------------- - -Custom entries that will appear in the written resolv.conf - -/usr/share/polkit-1/actions/net.openvpn.gui.leap.policy -------------------------------------------------------- - -PolicyKit policy file, used for granting access to openvpn without the need of entering a password each time. - -~/.config/leap/ ---------------- - -Main config folder - -~/.config/leap/leap.conf ------------------------- - -GUI options - -BUGS -==== - -Please report any bugs to https://leap.se/code diff --git a/setup.py b/setup.py index 64c2a4f5..67d8ea5c 100755 --- a/setup.py +++ b/setup.py @@ -200,7 +200,7 @@ setup( author='The LEAP Encryption Access Project', author_email='info@leap.se', url='https://leap.se', - license='GPLv3+', + license='GPL-3+', packages=find_packages( 'src', exclude=['ez_setup', 'setup', 'examples', 'tests']), @@ -208,10 +208,10 @@ setup( zip_safe=False, # not being used since setuptools does not like it. - # XXX it should be only for linux! + # looks like debhelper is honoring it... data_files=[ ("share/man/man1", - ["docs/man/leap.1"]), + ["docs/man/leap-client.1"]), ("share/polkit-1/actions", ["pkg/linux/polkit/net.openvpn.gui.leap.policy"]) ], -- cgit v1.2.3 From 5b9d2d9dd14e7bea95a3c754f9d3a38dd00c080d Mon Sep 17 00:00:00 2001 From: kali Date: Wed, 30 Jan 2013 14:38:11 +0900 Subject: fill empty docs, were breaking sphixdoc dh step --- docs/dev/authors.rst | 8 ++++++++ docs/dev/todo.rst | 6 ++++++ docs/pkg/osx.rst | 7 +++++++ docs/pkg/win.rst | 7 +++++++ 4 files changed, 28 insertions(+) diff --git a/docs/dev/authors.rst b/docs/dev/authors.rst index e69de29b..db32bd94 100644 --- a/docs/dev/authors.rst +++ b/docs/dev/authors.rst @@ -0,0 +1,8 @@ +.. _authors: + +Authors +======= + +We are many. +We are legion. + diff --git a/docs/dev/todo.rst b/docs/dev/todo.rst index e69de29b..c50eac09 100644 --- a/docs/dev/todo.rst +++ b/docs/dev/todo.rst @@ -0,0 +1,6 @@ +.. _todo: + +To-Do +===== + +alot diff --git a/docs/pkg/osx.rst b/docs/pkg/osx.rst index e69de29b..dca018b6 100644 --- a/docs/pkg/osx.rst +++ b/docs/pkg/osx.rst @@ -0,0 +1,7 @@ +.. _osx: + +OS X +===== + +Nothing here +move on diff --git a/docs/pkg/win.rst b/docs/pkg/win.rst index e69de29b..ef2cec5f 100644 --- a/docs/pkg/win.rst +++ b/docs/pkg/win.rst @@ -0,0 +1,7 @@ +.. _win: + +Windows +======= + +Nothing here +move on -- cgit v1.2.3