diff options
author | Kali Kaneko <kali@leap.se> | 2016-04-18 10:56:20 -0400 |
---|---|---|
committer | Kali Kaneko <kali@leap.se> | 2016-04-18 10:56:20 -0400 |
commit | e30e06d9062578e1932b5a6a4c4124a1663e18c2 (patch) | |
tree | 7c81bef2afd8d32d0179cc0192239271252bc311 /setup.py | |
parent | e5796bf55e3db177ee567118519136fd96ada3c4 (diff) | |
parent | cef15c04610ee188052af78ead8cfe7ea29d81c6 (diff) |
Merge tag '0.5.1'
Tag leap.bitmask version 0.5.1
# gpg: Signature made Mon 18 Apr 2016 10:52:44 AM BOT
# gpg: using RSA key 1CAF6C5B9F720808
# gpg: Good signature from "Kaliyuga <kaliyuga@riseup.net>" [ultimate]
# gpg: aka "Kali Kaneko (leap communications) <kali@leap.se>" [ultimate]
Diffstat (limited to 'setup.py')
-rw-r--r-- | setup.py | 65 |
1 files changed, 35 insertions, 30 deletions
@@ -20,16 +20,17 @@ setup file for leap.common import re from setuptools import setup, find_packages from setuptools import Command +import versioneer from pkg import utils -import versioneer -versioneer.versionfile_source = 'src/leap/common/_version.py' -versioneer.versionfile_build = 'leap/common/_version.py' -versioneer.tag_prefix = '' # tags are like 1.2.0 -versioneer.parentdir_prefix = 'leap.common-' -parsed_reqs = utils.parse_requirements() +requirements = utils.parse_requirements() +dependency_links = [requirement for requirement + in requirements if requirement.startswith('http')] +requirements = [requirement for requirement + in requirements if requirement not in dependency_links] +requirements.append('dirspec') tests_requirements = [ 'mock', @@ -49,11 +50,11 @@ trove_classifiers = [ "Topic :: Utilities" ] -DOWNLOAD_BASE = ('https://github.com/leapcode/leap_pycommon/' +DOWNLOAD_BASE = ('https://github.com/leapcode/bitmask_client/' 'archive/%s.tar.gz') _versions = versioneer.get_versions() VERSION = _versions['version'] -VERSION_FULL = _versions['full'] +VERSION_REVISION = _versions['full-revisionid'] DOWNLOAD_URL = "" # get the short version for the download url @@ -62,15 +63,30 @@ if len(_version_short) > 0: VERSION_SHORT = _version_short[0] DOWNLOAD_URL = DOWNLOAD_BASE % VERSION_SHORT -cmdclass = versioneer.get_cmdclass() - 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 = [] + template = r""" +# This file was generated by the `freeze_debianver` command in setup.py +# Using 'versioneer.py' (0.16) 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}' +full_revisionid = '{full_revisionid}' +""" + templatefun = r""" + +def get_versions(default={}, verbose=False): + return {'version': version_version, + 'full-revisionid': full_revisionid} +""" def initialize_options(self): pass @@ -84,34 +100,23 @@ class freeze_debianver(Command): 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( + subst_template = self.template.format( version=VERSION_SHORT, - version_full=VERSION_FULL) + templatefun - with open(versioneer.versionfile_source, 'w') as f: + full_revisionid=VERSION_REVISION) + self.templatefun + versioneer_cfg = versioneer.get_config_from_root('.') + with open(versioneer_cfg.versionfile_source, 'w') as f: f.write(subst_template) + try: long_description = open('README.rst').read() + '\n\n\n' + \ open('CHANGELOG').read() except Exception: long_description = "" +cmdclass = versioneer.get_cmdclass() cmdclass["freeze_debianver"] = freeze_debianver + setup( name='leap.common', version=VERSION, @@ -134,8 +139,8 @@ setup( # packages=find_packages('src', exclude=['leap.common.tests']), packages=find_packages('src'), test_suite='leap.common.tests', - install_requires=parsed_reqs, - # dependency_links=dependency_links, + install_requires=requirements, + dependency_links=dependency_links, tests_require=tests_requirements, include_package_data=True, zip_safe=False, |