summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--README.rst26
-rw-r--r--changes/bug-3675_qfiledialog-and-qtreactor-freezes1
-rw-r--r--changes/bug_3711-warn-with-python31
-rw-r--r--data/images/favicon.icobin318 -> 1150 bytes
-rw-r--r--data/images/mask-small.pngbin0 -> 18172 bytes
-rw-r--r--data/images/watermark.pngbin22819 -> 0 bytes
-rw-r--r--docs/Makefile1
-rw-r--r--docs/conf.py37
-rw-r--r--docs/index.rst16
-rw-r--r--docs/release_checklist.wiki8
-rw-r--r--docs/user/install.rst62
-rw-r--r--docs/user/intro.rst18
-rw-r--r--docs/user/leap-color-small.png (renamed from data/images/leap-color-small.png)bin10100 -> 10100 bytes
-rw-r--r--docs/user/running.rst9
-rw-r--r--pkg/requirements-docs.pip1
-rwxr-xr-xsetup.py23
-rw-r--r--src/leap/bitmask/__init__.py75
-rw-r--r--src/leap/bitmask/app.py2
-rw-r--r--src/leap/bitmask/gui/loggerwindow.py3
-rw-r--r--src/leap/bitmask/gui/mainwindow.py2
-rw-r--r--src/leap/bitmask/util/__init__.py50
-rw-r--r--src/leap/bitmask/util/leap_argparse.py6
22 files changed, 240 insertions, 101 deletions
diff --git a/README.rst b/README.rst
index 7c415663..f8308566 100644
--- a/README.rst
+++ b/README.rst
@@ -1,11 +1,27 @@
-The LEAP Encryption Access Project Client
-=========================================
-
+Bitmask
+=======
*your internet encryption toolkit*
.. image:: https://pypip.in/v/leap.bitmask/badge.png
:target: https://crate.io/packages/leap.bitmask
+**Bitmask** is the multiplatform desktop client for the services offered by
+`the LEAP Platform`_.
+It is written in python using `PySide`_ and licensed under the GPL3.
+Currently we distribute pre-compiled bundles for Linux and OSX, with Windows
+bundles following soon.
+
+.. _`PySide`: http://qt-project.org/wiki/PySide
+.. _`the LEAP Platform`: https://github.com/leapcode/leap_platform
+
+
+Read the Docs!
+------------------
+
+The latest documentation is available at `Read The Docs`_.
+
+.. _`Read The Docs`: http://bitmask.rtfd.org
+
Dependencies
------------------
@@ -55,7 +71,7 @@ Hacking
The Bitmask git repository is available at::
- git://leap.se/bitmask
+ git://leap.se/leap_client
Some steps need to be run when setting a development environment for the first time.
@@ -101,7 +117,7 @@ which the first time should automagically install all the needed dependencies in
License
=======
-.. image:: https://raw.github.com/leapcode/bitmask/develop/docs/user/gpl.png
+.. image:: https://raw.github.com/leapcode/leap_client/develop/docs/user/gpl.png
Bitmask is released under the terms of the `GNU GPL version 3`_ or later.
diff --git a/changes/bug-3675_qfiledialog-and-qtreactor-freezes b/changes/bug-3675_qfiledialog-and-qtreactor-freezes
new file mode 100644
index 00000000..fa0ef6a2
--- /dev/null
+++ b/changes/bug-3675_qfiledialog-and-qtreactor-freezes
@@ -0,0 +1 @@
+ o Fix save logs to file dialog freezing. Closes #3675.
diff --git a/changes/bug_3711-warn-with-python3 b/changes/bug_3711-warn-with-python3
new file mode 100644
index 00000000..79271caf
--- /dev/null
+++ b/changes/bug_3711-warn-with-python3
@@ -0,0 +1 @@
+ o Complain if setup.py is run with python3. Closes: #3711
diff --git a/data/images/favicon.ico b/data/images/favicon.ico
index b5f3505a..7f41dd1d 100644
--- a/data/images/favicon.ico
+++ b/data/images/favicon.ico
Binary files differ
diff --git a/data/images/mask-small.png b/data/images/mask-small.png
new file mode 100644
index 00000000..5f5f1b41
--- /dev/null
+++ b/data/images/mask-small.png
Binary files differ
diff --git a/data/images/watermark.png b/data/images/watermark.png
deleted file mode 100644
index d8e3f965..00000000
--- a/data/images/watermark.png
+++ /dev/null
Binary files differ
diff --git a/docs/Makefile b/docs/Makefile
index 16aa258b..5c2c4145 100644
--- a/docs/Makefile
+++ b/docs/Makefile
@@ -4,6 +4,7 @@
# You can set these variables from the command line.
SPHINXOPTS =
SPHINXBUILD = sphinx-build
+#SPHINXBUILD = $(VIRTUAL_ENV)/bin/sphinx-build
PAPER =
BUILDDIR = _build
diff --git a/docs/conf.py b/docs/conf.py
index 39f17d9b..3c908b2c 100644
--- a/docs/conf.py
+++ b/docs/conf.py
@@ -1,6 +1,6 @@
# -*- coding: utf-8 -*-
#
-# LEAP documentation build configuration file, created by
+# Bitmask documentation build configuration file, created by
# sphinx-quickstart on Sun Jul 22 18:32:05 2012.
#
# This file is execfile()d with the current directory set to its containing dir.
@@ -18,16 +18,20 @@ import sys, os
# documentation root, use os.path.abspath to make it absolute, like shown here.
sys.path.insert(0, os.path.abspath('../src'))
sys.path.insert(0, os.path.abspath('../src/leap'))
-sys.path.insert(0, os.path.abspath('../src/leap/crypto'))
-sys.path.insert(0, os.path.abspath('../src/leap/keymanager'))
-sys.path.insert(0, os.path.abspath('../src/leap/services'))
-sys.path.insert(0, os.path.abspath('../src/leap/services/eip'))
-sys.path.insert(0, os.path.abspath('../src/leap/util'))
-
-sys.path.insert(0, os.path.abspath(
- os.path.expanduser(
- '~/Virtualenvs/leap-client/local/lib/python2.7/'
- 'site-packages/leap/common')))
+sys.path.insert(0, os.path.abspath('../src/leap/bitmask'))
+sys.path.insert(0, os.path.abspath('../src/leap/bitmask/crypto'))
+sys.path.insert(0, os.path.abspath('../src/leap/bitmask/keymanager'))
+sys.path.insert(0, os.path.abspath('../src/leap/bitmask/services'))
+sys.path.insert(0, os.path.abspath('../src/leap/bitmask/services/eip'))
+sys.path.insert(0, os.path.abspath('../src/leap/bitmask/util'))
+
+try:
+ sys.path.insert(0, os.path.abspath(
+ os.path.expanduser(
+ '~/Virtualenvs/leap-bitmask/local/lib/python2.7/'
+ 'site-packages/leap/common')))
+except:
+ pass
# TODO: should add all the virtualenv site-packages to the path
# as a workaround, install all in your path.
@@ -58,17 +62,18 @@ source_suffix = '.rst'
master_doc = 'index'
# General information about the project.
-project = u'LEAP'
-copyright = u'2012, The LEAP Encryption Access Project'
+project = u'Bitmask'
+copyright = u'2012-2013, The LEAP Encryption Access Project'
# The version info for the project you're documenting, acts as replacement for
# |version| and |release|, also used in various other places throughout the
# built documents.
#
# The short X.Y version.
-version = '0.2.1-dev1'
+import leap.bitmask
+version = leap.bitmask.__short_version__
# The full version, including alpha/beta/rc tags.
-release = '0.2.1'
+release = leap.bitmask.__version__
# The language for content autogenerated by Sphinx. Refer to documentation
# for a list of supported languages.
@@ -128,7 +133,7 @@ html_theme = 'default'
# The name of an image file (relative to this directory) to place at the top
# of the sidebar.
-html_logo = "../data/images/leap-color-small.png"
+html_logo = "../data/images/mask-small.png"
# The name of an image file (within the static path) to use as favicon of the
# docs. This file should be a Windows icon file (.ico) being 16x16 or 32x32
diff --git a/docs/index.rst b/docs/index.rst
index e3078929..d0b0ff22 100644
--- a/docs/index.rst
+++ b/docs/index.rst
@@ -1,15 +1,20 @@
-.. LEAP documentation master file, created by
+.. Bitmask documentation master file, created by
sphinx-quickstart on Sun Jul 22 18:32:05 2012.
You can adapt this file completely to your liking, but it should at least
contain the root `toctree` directive.
-LEAP Client
+Bitmask
=====================================
-Release v\ |version|. (`Impatient? jump to the` :ref:`Installation <install>` `section!`)
+Release v \ |version|. (`Impatient? jump to the` :ref:`Installation <install>` `section!`)
.. if you change this paragraph, change it in user/intro too
-The **LEAP Encryption Access Project Client** is a :ref:`GPL3 Licensed <gpl3>` multiplatform client, written in python using PySide, that supports the features offered by :ref:`the LEAP Platform <leapplatform>`. Currently is being tested on Linux, support for OSX and Windows will come soon.
+**Bitmask** is the multiplatform desktop client for the services offered by :ref:`the LEAP Platform <leapplatform>`.
+It is written in python using `PySide`_ and :ref:`licensed under the GPL3 <gpl3>`.
+Currently we distribute pre-compiled bundles for Linux and OSX, with Windows
+bundles following soon.
+
+.. _`PySide`: http://qt-project.org/wiki/PySide
User Guide
----------
@@ -48,7 +53,6 @@ If you want to contribute to the project, we wrote this for you.
.. dev/internals
dev/authors
dev/todo
- dev/workflow
Packager Guide
---------------
@@ -87,3 +91,5 @@ If you are looking for a reference to specific classes or functions, you are lik
:maxdepth: 2
api/leap
+
+
diff --git a/docs/release_checklist.wiki b/docs/release_checklist.wiki
index e766d6f8..e6467048 100644
--- a/docs/release_checklist.wiki
+++ b/docs/release_checklist.wiki
@@ -1,4 +1,5 @@
= Bitmask Release Checklist (*) =
+ * [ ] Check that all tests are passing!
* [ ] Tag everything
* Should be done for the following packages, in order:
1. leap.common
@@ -24,10 +25,13 @@
* [ ] git push origin X.Y.Z
* [ ] git checkout master && git pull origin master && git merge release-X.Y.Z && git push origin master
* [ ] git checkout develop && git pull origin develop && git merge release-X.Y.Z && git push origin develop
- * [ ] Build bundles
+ * [ ] Build and upload bundles
* [ ] Use the scripts under pkg/<os>/ to build the the bundles.
* [ ] Sign them with gpg -a <path/to/bundle>
- * [ ] Upload bundle and signature to web-uploads@salmon.leap.se:~/public/client/<os>/
+ * [ ] Upload bundle and signature to web-uploads@salmon.leap.se:~/public/client/<os>/Bitmask-<os>-<ver>.(tar.bz2,dmg,zip)
+ * [ ] Update symbolic link for latest upload and signature:
+ * [ ] ~/public/client/Bitmask-<os>-latest
+ * [ ] ~/public/client/Bitmask-<os>-latest.asc
* [ ] Announce
* [ ] Mail leap@lists.riseup.net
diff --git a/docs/user/install.rst b/docs/user/install.rst
index da1d914c..b5fb7810 100644
--- a/docs/user/install.rst
+++ b/docs/user/install.rst
@@ -4,28 +4,51 @@ Installation
============
This part of the documentation covers the installation of Bitmask.
-We assume that you want to get it properly installed before being able to use it.
+We assume that you want to get it properly installed before being able to use it. But we can we wrong.
+Standalone bundle
+-----------------
+
+Maybe the quickest way of running Bitmask in your machine is using the standalone bundle. That is the recommended way to use Bitmask for the time being.
+
+You can get the latest bundles, and their matching signatures at `the downloads page <https://downloads.leap.se/client/>`_.
+
+Linux
+^^^^^
+- `Linux 32 bits bundle`_ (`signature <https://downloads.leap.se/client/linux/Bitmask-linux32-latest.tar.bz2.asc>`_)
+- `Linux 64 bits bundle`_ (`signature <https://downloads.leap.se/client/linux/Bitmask-linux64-latest.tar.bz2.asc>`_)
+
+OSX
+^^^
+- `OSX bundle`_ (`signature <https://downloads.leap.se/client/osx/Bitmask-OSX-latest.dmg.asc>`_)
+
+Windows
+^^^^^^^
.. note::
- The recommended way of installing in the near future will be the standalone bundles, but those are not quite ready yet. Methods described in this page assume you are familiar with python code, and you can find your way through the process of dependencies install. You can refer to the sections :ref:`setting up a working environment <environment>` or :ref:`fetching latest code for testing <fetchinglatest>`.
+ The release of the bundles for Windows is delayed right now. We should resume
+ producing them shortly, keep tuned.
+Signature verification
+^^^^^^^^^^^^^^^^^^^^^^
-Distribute & Pip
-----------------
+For the signature verification you can use ::
-.. warning:: The package in the cheese shop is from the stable, `0.2.0` release, which is now outdated. You are encouraged to install the development version instead.
+ $ gpg --verify Bitmask-linux64-latest.tar.bz2.asc
-Installing Bitmask is as simple as using `pip <http://www.pip-installer.org/>`_ for the already released versions ::
+Asuming that you downloaded the linux 64 bits bundle.
- $ pip install bitmask
+.. _`Linux 64 bits bundle`: https://downloads.leap.se/client/linux/Bitmask-linux64-latest.tar.bz2
+.. _`Linux 32 bits bundle`: https://downloads.leap.se/client/linux/Bitmask-linux32-latest.tar.bz2
+.. _`OSX bundle`: https://downloads.leap.se/client/osx/Bitmask-OSX-latest.dmg
+.. _`Windows bundle`: https://downloads.leap.se/client/windows/Bitmask-windows-latest.zip
Debian package
--------------
.. warning::
- The debian package in the leap repositories is from the stable, `0.2.0` release, which is now outdated. You are encouraged to install the development version instead,
+ The debian package that you can currently find in the leap repositories is from the stable, `0.2.0` release, which is now outdated. You are encouraged to install the development version or the standalone bundles while we upload the newest packages.
First, you need to bootstrap your apt-key::
@@ -44,18 +67,35 @@ And then you can happily install bitmask::
apt-get install bitmask
+Distribute & Pip
+----------------
+
+.. note::
+
+ The rest of the methods described below in this page assume you are familiar with python code, and you can find your way through the process of dependencies install. For more insight, you can also refer to the sections :ref:`setting up a working environment <environment>` or :ref:`fetching latest code for testing <fetchinglatest>`.
+
+.. image:: https://pypip.in/v/leap.bitmask/badge.png
+ :target: https://crate.io/packages/leap.bitmask
+
+
+Installing Bitmask is as simple as using `pip <http://www.pip-installer.org/>`_ for the already released versions ::
+
+ $ pip install leap.bitmask
+
+
Show me the code!
-----------------
+.. XXX UPDATE REPO NAMES AS SOON AS #3417 is DONE
+
You can get the code from LEAP public git repository ::
- $ git clone git://leap.se/bitmask
+ $ git clone git://leap.se/leap_client
Or from the github mirror ::
- $ git clone git://github.com/leapcode/bitmask.git
+ $ git clone git://github.com/leapcode/leap_client.git
Once you have grabbed a copy of the sources, you can install it into your site-packages easily ::
$ pyton setup.py install
-
diff --git a/docs/user/intro.rst b/docs/user/intro.rst
index 22ad9356..b93df12b 100644
--- a/docs/user/intro.rst
+++ b/docs/user/intro.rst
@@ -6,26 +6,34 @@ Introduction
Bitmask
-------
.. if yoy change this, change it also in the index.rst
-**Bitmask** is a :ref:`GPL3 Licensed <gpl3>` multiplatform client, written in python using PySide, that supports the features offered by :ref:`the LEAP Platform <leapplatform>`. Currently is being tested on Linux, support for OSX and Windows will come soon.
+**Bitmask** is the multiplatform desktop client for the services offered by :ref:`the LEAP Platform <leapplatform>`.
+It is written in python using `PySide`_ and :ref:`licensed under the GPL3 <gpl3>`.
+Currently we distribute pre-compiled bundles for Linux and OSX, with Windows
+bundles following soon.
Features
^^^^^^^^
Bitmask allows to easily secure communications.
-- Provider selection
-- User registration
+- Provider selection.
+- User registration.
- Encrypted Internet Proxy support (autoconfigured service using openvpn).
+- Encrypted email.
Coming soon
^^^^^^^^^^^^
-- Encrypted email
+- Encrypted chat.
+
.. _leapplatform:
The LEAP Platform
^^^^^^^^^^^^^^^^^
+
+.. image:: leap-color-small.*
+
The LEAP Provider Platform is the server-side part of LEAP that is run by service providers. It consists of a set of complementary packages and recipes to automate the maintenance of LEAP services in a hardened GNU/Linux environment. Our goal is to make it painless for service providers and ISPs to deploy a secure communications platform.
Read `more about the LEAP Platform <https://leap.se/en/technology/platform>`_ or `check out the code <https://github.com/leapcode/leap_platform>`_.
@@ -97,5 +105,7 @@ Bitmask is released under the terms of the `GNU GPL version 3`_ or later.
.. _`GNU GPL version 3`: http://www.gnu.org/licenses/gpl.txt
+.. _`PySide`: http://qt-project.org/wiki/PySide
+
.. ??? include whole version?
.. include:: ../COPYING
diff --git a/data/images/leap-color-small.png b/docs/user/leap-color-small.png
index bc9d4e7f..bc9d4e7f 100644
--- a/data/images/leap-color-small.png
+++ b/docs/user/leap-color-small.png
Binary files differ
diff --git a/docs/user/running.rst b/docs/user/running.rst
index da83e9ef..0a93204c 100644
--- a/docs/user/running.rst
+++ b/docs/user/running.rst
@@ -3,7 +3,8 @@
Running
==================
-This document covers how to launch Bitmask.
+This document covers how to launch Bitmask. Also know as, where the magic
+happens.
Launching Bitmask
-----------------
@@ -11,7 +12,7 @@ After a successful installation, there should be a launcher called `bitmask` som
% bitmask
-The first time you launch it, it should launch the first run wizard that will guide you through the setup of the LEAP Services.
+The first time you launch it, it should launch the first run wizard that will guide you through the mostly automatic configuration of the LEAP Services.
.. note::
@@ -37,8 +38,8 @@ If you ask for it, you can also have all that debug info in a beautiful file rea
.. If you want to increment the level of verbosity passed to openvpn, you can do::
.. $ bitmask --openvpn-verbosity 4
-Options
-------------
+I want all the options!
+-----------------------
To see all the available command line options::
$ bitmask --help
diff --git a/pkg/requirements-docs.pip b/pkg/requirements-docs.pip
new file mode 100644
index 00000000..6966869c
--- /dev/null
+++ b/pkg/requirements-docs.pip
@@ -0,0 +1 @@
+sphinx
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 <http://www.gnu.org/licenses/>.
+"""
+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:
diff --git a/src/leap/bitmask/__init__.py b/src/leap/bitmask/__init__.py
index e69de29b..ebdd53c4 100644
--- a/src/leap/bitmask/__init__.py
+++ b/src/leap/bitmask/__init__.py
@@ -0,0 +1,75 @@
+# -*- coding: utf-8 -*-
+# __init__.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 <http://www.gnu.org/licenses/>.
+"""
+Init file for leap.bitmask
+
+Initializes version and app info.
+"""
+import re
+
+from pkg_resources import parse_version
+
+from leap.bitmask.util import first
+
+
+def _is_release_version(version):
+ """
+ Helper to determine whether a version is a final release or not.
+ The release needs to be of the form: w.x.y.z containing only numbers
+ and dots.
+
+ :param version: the version string
+ :type version: str
+ :returns: if the version is a release version or not.
+ :rtype: bool
+ """
+ parsed_version = parse_version(version)
+ not_number = 0
+ for x in parsed_version:
+ try:
+ int(x)
+ except:
+ not_number += 1
+
+ return not_number == 1
+
+
+__version__ = "unknown"
+IS_RELEASE_VERSION = False
+
+__short_version__ = "unknown"
+
+try:
+ from leap.bitmask._version import get_versions
+ __version__ = get_versions()['version']
+ IS_RELEASE_VERSION = _is_release_version(__version__)
+ del get_versions
+except ImportError:
+ #running on a tree that has not run
+ #the setup.py setver
+ pass
+
+__appname__ = "unknown"
+try:
+ from leap._appname import __appname__
+except ImportError:
+ #running on a tree that has not run
+ #the setup.py setver
+ pass
+
+__short_version__ = first(re.findall('\d\.\d\.\d', __version__))
+__full_version__ = __appname__ + '/' + str(__version__)
diff --git a/src/leap/bitmask/app.py b/src/leap/bitmask/app.py
index 0dce5e61..158f1afe 100644
--- a/src/leap/bitmask/app.py
+++ b/src/leap/bitmask/app.py
@@ -156,7 +156,7 @@ def main():
from leap.bitmask.gui.mainwindow import MainWindow
from leap.bitmask.platform_init import IS_MAC
from leap.bitmask.platform_init.locks import we_are_the_one_and_only
- from leap.bitmask.util import __version__ as VERSION
+ from leap.bitmask import __version__ as VERSION
from leap.bitmask.util.requirement_checker import check_requirements
# pylint: avoid unused import
diff --git a/src/leap/bitmask/gui/loggerwindow.py b/src/leap/bitmask/gui/loggerwindow.py
index 9b4ba55d..ece4cad6 100644
--- a/src/leap/bitmask/gui/loggerwindow.py
+++ b/src/leap/bitmask/gui/loggerwindow.py
@@ -146,7 +146,8 @@ class LoggerWindow(QtGui.QDialog):
Lets the user save the current log to a file
"""
fileName, filtr = QtGui.QFileDialog.getSaveFileName(
- self, self.tr("Save As"))
+ self, self.tr("Save As"),
+ options=QtGui.QFileDialog.DontUseNativeDialog)
if fileName:
try:
diff --git a/src/leap/bitmask/gui/mainwindow.py b/src/leap/bitmask/gui/mainwindow.py
index 1fdd0792..706b9c2a 100644
--- a/src/leap/bitmask/gui/mainwindow.py
+++ b/src/leap/bitmask/gui/mainwindow.py
@@ -58,7 +58,7 @@ from leap.bitmask.services.eip.vpnlaunchers import \
EIPNoPolkitAuthAgentAvailable
from leap.bitmask.services.eip.vpnlaunchers import EIPNoTunKextLoaded
-from leap.bitmask.util import __version__ as VERSION
+from leap.bitmask import __version__ as VERSION
from leap.bitmask.util.keyring_helpers import has_keyring
from leap.bitmask.util.leap_log_handler import LeapLogHandler
diff --git a/src/leap/bitmask/util/__init__.py b/src/leap/bitmask/util/__init__.py
index ce8323cd..6dd18bcf 100644
--- a/src/leap/bitmask/util/__init__.py
+++ b/src/leap/bitmask/util/__init__.py
@@ -15,59 +15,11 @@
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
"""
-Initializes version and app info, plus some small and handy functions.
+Some small and handy functions.
"""
import datetime
import os
-from pkg_resources import parse_version
-
-
-def _is_release_version(version):
- """
- Helper to determine whether a version is a final release or not.
- The release needs to be of the form: w.x.y.z containing only numbers
- and dots.
-
- :param version: the version string
- :type version: str
- :returns: if the version is a release version or not.
- :rtype: bool
- """
- parsed_version = parse_version(version)
- not_number = 0
- for x in parsed_version:
- try:
- int(x)
- except:
- not_number += 1
-
- return not_number == 1
-
-
-__version__ = "unknown"
-IS_RELEASE_VERSION = False
-
-try:
- from leap.bitmask._version import get_versions
- __version__ = get_versions()['version']
- IS_RELEASE_VERSION = _is_release_version(__version__)
- del get_versions
-except ImportError:
- #running on a tree that has not run
- #the setup.py setver
- pass
-
-__appname__ = "unknown"
-try:
- from leap._appname import __appname__
-except ImportError:
- #running on a tree that has not run
- #the setup.py setver
- pass
-
-__full_version__ = __appname__ + '/' + str(__version__)
-
def first(things):
"""
diff --git a/src/leap/bitmask/util/leap_argparse.py b/src/leap/bitmask/util/leap_argparse.py
index 71f5163d..bc21a9cf 100644
--- a/src/leap/bitmask/util/leap_argparse.py
+++ b/src/leap/bitmask/util/leap_argparse.py
@@ -14,10 +14,12 @@
#
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
-
+"""
+Parses the command line arguments passed to the application.
+"""
import argparse
-from leap.bitmask.util import IS_RELEASE_VERSION
+from leap.bitmask import IS_RELEASE_VERSION
def build_parser():