summaryrefslogtreecommitdiff
path: root/setup.py
diff options
context:
space:
mode:
authorTomás Touceda <chiiph@leap.se>2013-11-01 10:50:38 -0300
committerTomás Touceda <chiiph@leap.se>2013-11-01 10:50:38 -0300
commit23e9034664edf6b2a01a677c4fa4e6efd880e364 (patch)
treefc90f154cf81cbaf48dd2d4a738a379591c4e7c7 /setup.py
parenta06b5719f028e619a4b3800fb346ed3c984e4d25 (diff)
parent80fde752f0bf7946869361f6a77d1952f9339636 (diff)
Merge branch 'release-0.3.6'0.3.6
Diffstat (limited to 'setup.py')
-rwxr-xr-xsetup.py93
1 files changed, 62 insertions, 31 deletions
diff --git a/setup.py b/setup.py
index 78c5b0fb..dca8f44a 100755
--- a/setup.py
+++ b/setup.py
@@ -44,7 +44,6 @@ versioneer.versionfile_build = 'leap/bitmask/_version.py'
versioneer.tag_prefix = '' # tags are like 1.2.0
versioneer.parentdir_prefix = 'leap.bitmask-'
-#from setuptools import Command
# The following import avoids the premature unloading of the `util` submodule
# when running tests, which would cause an error when nose finishes tests and
@@ -74,10 +73,69 @@ trove_classifiers = [
"Topic :: Utilities",
]
+DOWNLOAD_BASE = ('https://github.com/leapcode/bitmask_client/'
+ 'archive/%s.tar.gz')
+_versions = versioneer.get_versions()
+VERSION = _versions['version']
+VERSION_FULL = _versions['full']
+DOWNLOAD_URL = ""
-parsed_reqs = utils.parse_requirements()
+# get the short version for the download url
+_version_short = re.findall('\d+\.\d+\.\d+', VERSION)
+if len(_version_short) > 0:
+ VERSION_SHORT = _version_short[0]
+ DOWNLOAD_URL = DOWNLOAD_BASE % VERSION_SHORT
cmdclass = versioneer.get_cmdclass()
+
+
+from setuptools import Command
+
+
+class freeze_debianver(Command):
+ """
+ Freezes the version in a debian branch.
+ To be used after merging the development branch onto the debian one.
+ """
+ user_options = []
+
+ def initialize_options(self):
+ pass
+
+ def finalize_options(self):
+ pass
+
+ def run(self):
+ proceed = str(raw_input(
+ "This will overwrite the file _version.py. Continue? [y/N] "))
+ if proceed != "y":
+ print("He. You scared. Aborting.")
+ return
+ template = r"""
+# This file was generated by the `freeze_debianver` command in setup.py
+# Using 'versioneer.py' (0.7+) from
+# revision-control system data, or from the parent directory name of an
+# unpacked source archive. Distribution tarballs contain a pre-generated copy
+# of this file.
+
+version_version = '{version}'
+version_full = '{version_full}'
+"""
+ templatefun = r"""
+
+def get_versions(default={}, verbose=False):
+ return {'version': version_version, 'full': version_full}
+"""
+ subst_template = template.format(
+ version=VERSION_SHORT,
+ version_full=VERSION_FULL) + templatefun
+ with open(versioneer.versionfile_source, 'w') as f:
+ f.write(subst_template)
+
+
+cmdclass["freeze_debianver"] = freeze_debianver
+parsed_reqs = utils.parse_requirements()
+
leap_launcher = 'bitmask=leap.bitmask.app:main'
from setuptools.command.develop import develop as _develop
@@ -150,16 +208,6 @@ if IS_LINUX:
["pkg/linux/resolv-update"]),
]
-DOWNLOAD_BASE = ('https://github.com/leapcode/bitmask_client/'
- 'archive/%s.tar.gz')
-VERSION = versioneer.get_version()
-DOWNLOAD_URL = ""
-
-# get the short version for the download url
-short_ver = re.findall('\d+\.\d+\.\d+', VERSION)
-if len(short_ver) > 0:
- DOWNLOAD_URL = DOWNLOAD_BASE % short_ver[0]
-
setup(
name="leap.bitmask",
@@ -168,25 +216,8 @@ setup(
cmdclass=cmdclass,
description=("The Internet Encryption Toolkit: "
"Encrypted Internet Proxy and Encrypted Mail."),
- # XXX unify the long_description on a file of its own, so we
- # can reuse it easily.
- long_description=(
- "Bitmask is the multiplatform desktop client for the LEAP Platform."
- "\n"
- "The LEAP Encryption Access Project develops "
- "a multi-year plan to secure everyday communication.\n "
- "The Encrypted Internet Proxy (EIP) provides circumvention, location "
- "anonymization, and traffic encryption in a hassle-free, "
- "automatically self-configuring fashion.\n"
- "Encrypted Mail offers automatic encryption and decryption for "
- "both outgoing and incoming email, adding public key cryptography "
- "to your mail without you ever having to worry about key distribution "
- "or signature verification. \n"
- "The Encrypted Mail services will run local SMTP and IMAP proxies "
- "that, once you configure the mail client of your choice, will "
- "automatically encrypt and decrypt your email using GPG encryption "
- "under the hood."
- ),
+ long_description=open('README.rst').read() + '\n\n\n' +
+ open('CHANGELOG.rst').read(),
classifiers=trove_classifiers,
install_requires=parsed_reqs,
test_suite='nose.collector',