From 6cd459bb1474488bd5f81dbe73a70b19e62ab0c3 Mon Sep 17 00:00:00 2001 From: "Kali Kaneko (leap communications)" Date: Thu, 1 Sep 2016 00:08:25 -0400 Subject: [pkg] handle dependencies as extras --- .gitignore | 2 +- pkg/requirements-testing.pip | 7 +++++++ pkg/requirements.pip | 3 +++ setup.py | 48 ++++++++++++++++++++++++++++++++++---------- 4 files changed, 48 insertions(+), 12 deletions(-) create mode 100644 pkg/requirements-testing.pip diff --git a/.gitignore b/.gitignore index c60eab2..44bba98 100644 --- a/.gitignore +++ b/.gitignore @@ -26,7 +26,7 @@ var/ *.egg # Unit test / coverage reports -htmlcov/ +cov_html/ .tox/ .coverage .coverage.* diff --git a/pkg/requirements-testing.pip b/pkg/requirements-testing.pip new file mode 100644 index 0000000..aa6bfe6 --- /dev/null +++ b/pkg/requirements-testing.pip @@ -0,0 +1,7 @@ +mock +pep8 +flake8 +coverage +pytest +pytest-pep8 +pytest-cov diff --git a/pkg/requirements.pip b/pkg/requirements.pip index 7f39774..640aa79 100644 --- a/pkg/requirements.pip +++ b/pkg/requirements.pip @@ -1,2 +1,5 @@ twisted colorama +zope.interface +service-identity +leap.common diff --git a/setup.py b/setup.py index fe44737..bbc0452 100644 --- a/setup.py +++ b/setup.py @@ -2,12 +2,38 @@ Setup file for leap.bitmask """ from setuptools import setup, find_packages + import versioneer -# This requirements list is curated by hand. Here we can specify ranges. -requirements = [ - "twisted", - "colorama"] + +# This requirements list is curated by hand, and +# needs to be updated every time that requirements.pip +# changes. +# Note that here we can specify ranges. + +required = [ + 'twisted', # 14.0.0 + 'zope.interface', + 'service-identity', + 'colorama', + 'srp', + 'leap.common', +] + +extras = { + 'mail': [ + 'leap.soledad.client', + 'gnupg', + ], + 'gui': [ + 'PyQt', + ], + 'all': [ + 'PyQt', + 'leap.soledad.client', + 'gnupg', + ] +} trove_classifiers = [ @@ -25,14 +51,13 @@ trove_classifiers = [ "Topic :: Utilities" ] +VERSION = versioneer.get_version() DOWNLOAD_BASE = ('https://github.com/leapcode/bitmask-dev/' 'archive/%s.tar.gz') - -VERSION = versioneer.get_version() DOWNLOAD_URL = DOWNLOAD_BASE % VERSION - +# Entry points gui_launcher = 'bitmask=leap.bitmask.gui.app:start_app' bitmask_cli = 'bitmaskctl=leap.bitmask.cli.bitmask_cli:main' bitmaskd = 'bitmaskd=leap.bitmask.core.launcher:run_bitmaskd' @@ -41,7 +66,7 @@ bitmaskd = 'bitmaskd=leap.bitmask.core.launcher:run_bitmaskd' setup( name='leap.bitmask', version=VERSION, - cmdclass = versioneer.get_cmdclass(), + cmdclass=versioneer.get_cmdclass(), url='https://leap.se/', download_url=DOWNLOAD_URL, license='GPLv3+', @@ -51,16 +76,17 @@ setup( maintainer_email='kali@leap.se', description=("The Internet Encryption Toolkit: " "Encrypted Internet Proxy and Encrypted Mail."), - long_description = open('README.rst').read(), + long_description=open('README.rst').read(), classifiers=trove_classifiers, - namespace_packages=["leap"], + namespace_packages=['leap'], package_dir={'': 'src'}, package_data={'': ['*.pem']}, packages=find_packages('src'), - install_requires=requirements, include_package_data=True, zip_safe=True, entry_points={ 'console_scripts': [gui_launcher, bitmask_cli, bitmaskd] }, + install_requires=required, + extras_require=extras, ) -- cgit v1.2.3