From b17d57d763e2d206e6dcff7b3e245b3dc6b480c4 Mon Sep 17 00:00:00 2001 From: Kali Kaneko Date: Tue, 9 Apr 2013 23:08:33 +0900 Subject: Initial import --- mail/pkg/requirements-dev.pip | 14 ++++++++++++++ mail/pkg/requirements.pip | 3 +++ 2 files changed, 17 insertions(+) create mode 100644 mail/pkg/requirements-dev.pip create mode 100644 mail/pkg/requirements.pip (limited to 'mail/pkg') diff --git a/mail/pkg/requirements-dev.pip b/mail/pkg/requirements-dev.pip new file mode 100644 index 0000000..4bd76f6 --- /dev/null +++ b/mail/pkg/requirements-dev.pip @@ -0,0 +1,14 @@ +# --------------------------- +# -- external requirements -- +# -- during development -- +# --------------------------- +# +# For temporary work, you can point this to your developer repo. +# consolidated changes will be pushed to pypi and then added +# to the main requirements.pip +# +# NOTE: you have to run pip install -r pkg/requirements.pip for pip +# to install it. (do it after python setup.py develop and it +# will only install this) + +-e git+git://leap.se/soledad@develop#egg=leap.soledad diff --git a/mail/pkg/requirements.pip b/mail/pkg/requirements.pip new file mode 100644 index 0000000..1b5e5ef --- /dev/null +++ b/mail/pkg/requirements.pip @@ -0,0 +1,3 @@ +leap.common +leap.soledad +twisted -- cgit v1.2.3 From 98bb3f2cd3bf007041265583af95845264d7e189 Mon Sep 17 00:00:00 2001 From: drebs Date: Mon, 6 May 2013 19:31:56 -0300 Subject: Adapt smtp-relay to use leap.common.keymanager * Add docstrings to smtp-relay classes. * Setup test suite. * Add setuptools-trial as dependency for tests. * Move smtp-relay tests to default test directory. * Add tests for smtp-relay. * Send of unencrypted mail depending on 'encrypted_only' param. * Malformed email address. * Add a helper function for smtp-relay. * Assert params for initializing SMTPFactory. * Use mail.util.parseaddr to parse email address. * Use email.message.Message to represent an email message in smtp-relay. * Make requirements effective and fix leap.common version in setup.py. * Add/remove dependencies in setup.py. * Fix Soledad instantiation in tests. * Fix sender address in smtp-relay. * Fix some comments regarding twisted's SSL and SMTP. * Remove authentication from smtp-relay when sending. This closes #2446. --- mail/pkg/requirements.pip | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'mail/pkg') diff --git a/mail/pkg/requirements.pip b/mail/pkg/requirements.pip index 1b5e5ef..5f4e7ef 100644 --- a/mail/pkg/requirements.pip +++ b/mail/pkg/requirements.pip @@ -1,3 +1,3 @@ -leap.common +leap.common>=0.2.3-dev leap.soledad twisted -- cgit v1.2.3 From 0a97738430e6c487a4b76bc0b2f726be8d4942fe Mon Sep 17 00:00:00 2001 From: Kali Kaneko Date: Mon, 15 Apr 2013 16:22:39 +0900 Subject: Functional SoledadBackedAccount and LeapMailboxes The imap service is launched from the tac file, and still needs some information to be provided in separate config files that stub much of the initialization parameters. working fetch and store methods. tested with offlineimap and thunderbird. several mailboxes might be broken. --- mail/pkg/requirements.pip | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'mail/pkg') diff --git a/mail/pkg/requirements.pip b/mail/pkg/requirements.pip index 1b5e5ef..af633f9 100644 --- a/mail/pkg/requirements.pip +++ b/mail/pkg/requirements.pip @@ -1,3 +1,3 @@ -leap.common -leap.soledad +leap.common>=0.2.3-dev +leap.soledad>=0.0.2-dev twisted -- cgit v1.2.3 From 698c4cbf18933cf083b543806b5a6e11019a90da Mon Sep 17 00:00:00 2001 From: Kali Kaneko Date: Fri, 23 Aug 2013 12:42:02 +0200 Subject: improve packaging --- mail/pkg/__init__.py | 0 mail/pkg/requirements-testing.pip | 2 + mail/pkg/requirements.pip | 6 ++- mail/pkg/utils.py | 84 +++++++++++++++++++++++++++++++++++++++ 4 files changed, 90 insertions(+), 2 deletions(-) create mode 100644 mail/pkg/__init__.py create mode 100644 mail/pkg/requirements-testing.pip create mode 100644 mail/pkg/utils.py (limited to 'mail/pkg') diff --git a/mail/pkg/__init__.py b/mail/pkg/__init__.py new file mode 100644 index 0000000..e69de29 diff --git a/mail/pkg/requirements-testing.pip b/mail/pkg/requirements-testing.pip new file mode 100644 index 0000000..7233634 --- /dev/null +++ b/mail/pkg/requirements-testing.pip @@ -0,0 +1,2 @@ +setuptools-trial +mock diff --git a/mail/pkg/requirements.pip b/mail/pkg/requirements.pip index d8888fd..13d8b6a 100644 --- a/mail/pkg/requirements.pip +++ b/mail/pkg/requirements.pip @@ -1,2 +1,4 @@ -leap.soledad>=0.0.2-dev -twisted +leap.soledad.client>=0.3.0 +leap.common>=0.3.0 +leap.keymanager>=0.3.0 +twisted # >= 12.0.3 ?? diff --git a/mail/pkg/utils.py b/mail/pkg/utils.py new file mode 100644 index 0000000..deace14 --- /dev/null +++ b/mail/pkg/utils.py @@ -0,0 +1,84 @@ +# -*- coding: utf-8 -*- +# utils.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 . + +""" +Utils to help in the setup process +""" + +import os +import re +import sys + + +def get_reqs_from_files(reqfiles): + """ + Returns the contents of the top requirement file listed as a + string list with the lines + + @param reqfiles: requirement files to parse + @type reqfiles: list of str + """ + for reqfile in reqfiles: + if os.path.isfile(reqfile): + return open(reqfile, 'r').read().split('\n') + + +def parse_requirements(reqfiles=['requirements.txt', + 'requirements.pip', + 'pkg/requirements.pip']): + """ + Parses the requirement files provided. + + Checks the value of LEAP_VENV_SKIP_PYSIDE to see if it should + return PySide as a dep or not. Don't set, or set to 0 if you want + to install it through pip. + + @param reqfiles: requirement files to parse + @type reqfiles: list of str + """ + + requirements = [] + skip_pyside = os.getenv("LEAP_VENV_SKIP_PYSIDE", "0") != "0" + for line in get_reqs_from_files(reqfiles): + # -e git://foo.bar/baz/master#egg=foobar + if re.match(r'\s*-e\s+', line): + pass + # do not try to do anything with externals on vcs + #requirements.append(re.sub(r'\s*-e\s+.*#egg=(.*)$', r'\1', + #line)) + # http://foo.bar/baz/foobar/zipball/master#egg=foobar + elif re.match(r'\s*https?:', line): + requirements.append(re.sub(r'\s*https?:.*#egg=(.*)$', r'\1', + line)) + # -f lines are for index locations, and don't get used here + elif re.match(r'\s*-f\s+', line): + pass + + # argparse is part of the standard library starting with 2.7 + # adding it to the requirements list screws distro installs + elif line == 'argparse' and sys.version_info >= (2, 7): + pass + elif line == 'PySide' and skip_pyside: + pass + # do not include comments + elif line.lstrip().startswith('#'): + pass + else: + if line != '': + requirements.append(line) + + return requirements -- cgit v1.2.3 From d8f65603a63addea0b4056693992d479869b93a3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tom=C3=A1s=20Touceda?= Date: Fri, 18 Oct 2013 09:21:23 -0300 Subject: Fold in changes and update dependencies --- mail/pkg/requirements.pip | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'mail/pkg') diff --git a/mail/pkg/requirements.pip b/mail/pkg/requirements.pip index 13d8b6a..6fa0df4 100644 --- a/mail/pkg/requirements.pip +++ b/mail/pkg/requirements.pip @@ -1,4 +1,4 @@ leap.soledad.client>=0.3.0 leap.common>=0.3.0 -leap.keymanager>=0.3.0 +leap.keymanager>=0.3.4 twisted # >= 12.0.3 ?? -- cgit v1.2.3 From 3737cf5859d6e4a1a749a3719de937b821adf092 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tom=C3=A1s=20Touceda?= Date: Fri, 1 Nov 2013 10:41:45 -0300 Subject: Update requirements --- mail/pkg/requirements.pip | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'mail/pkg') diff --git a/mail/pkg/requirements.pip b/mail/pkg/requirements.pip index 6fa0df4..4780b5c 100644 --- a/mail/pkg/requirements.pip +++ b/mail/pkg/requirements.pip @@ -1,4 +1,4 @@ leap.soledad.client>=0.3.0 -leap.common>=0.3.0 +leap.common>=0.3.5 leap.keymanager>=0.3.4 twisted # >= 12.0.3 ?? -- cgit v1.2.3 From 9a47ffa709eff203aeb4a0d37f8e6d30045d2d58 Mon Sep 17 00:00:00 2001 From: Kali Kaneko Date: Wed, 6 Nov 2013 11:09:19 -0200 Subject: Make the pkey a property so we can allow multiple accounts in the imap fetcher. --- mail/pkg/requirements.pip | 1 + 1 file changed, 1 insertion(+) (limited to 'mail/pkg') diff --git a/mail/pkg/requirements.pip b/mail/pkg/requirements.pip index 4780b5c..ae1a38b 100644 --- a/mail/pkg/requirements.pip +++ b/mail/pkg/requirements.pip @@ -2,3 +2,4 @@ leap.soledad.client>=0.3.0 leap.common>=0.3.5 leap.keymanager>=0.3.4 twisted # >= 12.0.3 ?? +zope.proxy -- cgit v1.2.3 From 203b3d792b474ee056d0d1646696eae67a500f1e Mon Sep 17 00:00:00 2001 From: Kali Kaneko Date: Wed, 6 Nov 2013 14:40:55 -0200 Subject: add missing zope.interface dep --- mail/pkg/requirements.pip | 1 + 1 file changed, 1 insertion(+) (limited to 'mail/pkg') diff --git a/mail/pkg/requirements.pip b/mail/pkg/requirements.pip index 4780b5c..13d04f9 100644 --- a/mail/pkg/requirements.pip +++ b/mail/pkg/requirements.pip @@ -1,3 +1,4 @@ +zope.interface leap.soledad.client>=0.3.0 leap.common>=0.3.5 leap.keymanager>=0.3.4 -- cgit v1.2.3 From 25259ab23887e3ffe9b738aad7701064a6b3b1fc Mon Sep 17 00:00:00 2001 From: Kali Kaneko Date: Thu, 5 Dec 2013 09:58:49 -0400 Subject: add with_venvwrapper script --- mail/pkg/tools/with_venvwrapper.sh | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) create mode 100755 mail/pkg/tools/with_venvwrapper.sh (limited to 'mail/pkg') diff --git a/mail/pkg/tools/with_venvwrapper.sh b/mail/pkg/tools/with_venvwrapper.sh new file mode 100755 index 0000000..693c0ac --- /dev/null +++ b/mail/pkg/tools/with_venvwrapper.sh @@ -0,0 +1,16 @@ +#!/bin/bash + +#Wraps a command in a virtualenwrapper passed as first argument. +#Example: +#with_virtualenvwrapper.sh leap-bitmask ./run_tests.sh + +wd=`pwd` +alias pyver='python -c "import $1;print $1.__path__[0]; print $1.__version__;"' + +source `which virtualenvwrapper.sh` +echo "Activating virtualenv " $1 +echo "------------------------------------" +workon $1 +cd $wd +echo "running version: " `pyver leap.bitmask` +$2 $3 $4 $5 -- cgit v1.2.3 From ef9b08a404127c1768e85e07cb48fe24efed63aa Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tom=C3=A1s=20Touceda?= Date: Fri, 6 Dec 2013 15:46:32 -0300 Subject: Update requirements --- mail/pkg/requirements.pip | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'mail/pkg') diff --git a/mail/pkg/requirements.pip b/mail/pkg/requirements.pip index 7ed5087..dc0635c 100644 --- a/mail/pkg/requirements.pip +++ b/mail/pkg/requirements.pip @@ -1,6 +1,6 @@ zope.interface leap.soledad.client>=0.3.0 leap.common>=0.3.5 -leap.keymanager>=0.3.4 +leap.keymanager>=0.3.7 twisted # >= 12.0.3 ?? zope.proxy -- cgit v1.2.3 From 868fb445e580ad50bb0fff1ec709d5f5f2110ecd Mon Sep 17 00:00:00 2001 From: Kali Kaneko Date: Tue, 10 Dec 2013 13:08:15 -0400 Subject: add testing reqs --- mail/pkg/requirements-testing.pip | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'mail/pkg') diff --git a/mail/pkg/requirements-testing.pip b/mail/pkg/requirements-testing.pip index 7233634..41222f7 100644 --- a/mail/pkg/requirements-testing.pip +++ b/mail/pkg/requirements-testing.pip @@ -1,2 +1,7 @@ setuptools-trial mock +nose +rednose +nose-progressive +coverage +pep8>=1.1 -- cgit v1.2.3 From 268733f2077ce3b2918f2fd057dc188cb0e42874 Mon Sep 17 00:00:00 2001 From: Kali Kaneko Date: Thu, 23 Jan 2014 02:32:12 -0400 Subject: add enum dependency --- mail/pkg/requirements.pip | 1 + 1 file changed, 1 insertion(+) (limited to 'mail/pkg') diff --git a/mail/pkg/requirements.pip b/mail/pkg/requirements.pip index dc0635c..603eaf6 100644 --- a/mail/pkg/requirements.pip +++ b/mail/pkg/requirements.pip @@ -4,3 +4,4 @@ leap.common>=0.3.5 leap.keymanager>=0.3.7 twisted # >= 12.0.3 ?? zope.proxy +enum -- cgit v1.2.3 From bf288ed42760d14292cb1b0c19df8a17fe44ba2a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tom=C3=A1s=20Touceda?= Date: Fri, 4 Apr 2014 16:38:28 -0300 Subject: Update requirements --- mail/pkg/requirements.pip | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'mail/pkg') diff --git a/mail/pkg/requirements.pip b/mail/pkg/requirements.pip index 603eaf6..17ceba6 100644 --- a/mail/pkg/requirements.pip +++ b/mail/pkg/requirements.pip @@ -1,7 +1,7 @@ zope.interface -leap.soledad.client>=0.3.0 -leap.common>=0.3.5 -leap.keymanager>=0.3.7 +leap.soledad.client>=0.4.5 +leap.common>=0.3.7 +leap.keymanager>=0.3.8 twisted # >= 12.0.3 ?? zope.proxy enum -- cgit v1.2.3 From 62f3c0ba594c1c8b403c1ae53a6f5a554ce262af Mon Sep 17 00:00:00 2001 From: Ruben Pollan Date: Fri, 2 Jan 2015 21:05:22 -0600 Subject: Port `enum` to `enum34` --- mail/pkg/requirements.pip | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'mail/pkg') diff --git a/mail/pkg/requirements.pip b/mail/pkg/requirements.pip index 17ceba6..5bd4972 100644 --- a/mail/pkg/requirements.pip +++ b/mail/pkg/requirements.pip @@ -4,4 +4,4 @@ leap.common>=0.3.7 leap.keymanager>=0.3.8 twisted # >= 12.0.3 ?? zope.proxy -enum +enum34 -- cgit v1.2.3 From ad2a2a188e2d7692ddb2fa3aab05100671853c69 Mon Sep 17 00:00:00 2001 From: Kali Kaneko Date: Thu, 15 Jan 2015 16:31:22 -0400 Subject: remove enum dep --- mail/pkg/requirements.pip | 1 - 1 file changed, 1 deletion(-) (limited to 'mail/pkg') diff --git a/mail/pkg/requirements.pip b/mail/pkg/requirements.pip index 5bd4972..64ff28c 100644 --- a/mail/pkg/requirements.pip +++ b/mail/pkg/requirements.pip @@ -4,4 +4,3 @@ leap.common>=0.3.7 leap.keymanager>=0.3.8 twisted # >= 12.0.3 ?? zope.proxy -enum34 -- cgit v1.2.3 From 09e83b39ecb60f9866c3f54fae8dc41f27093e19 Mon Sep 17 00:00:00 2001 From: Kali Kaneko Date: Fri, 16 Jan 2015 19:19:53 -0400 Subject: add service-identity as a dependency for leap.mail --- mail/pkg/requirements.pip | 1 + 1 file changed, 1 insertion(+) (limited to 'mail/pkg') diff --git a/mail/pkg/requirements.pip b/mail/pkg/requirements.pip index 64ff28c..20f93a6 100644 --- a/mail/pkg/requirements.pip +++ b/mail/pkg/requirements.pip @@ -4,3 +4,4 @@ leap.common>=0.3.7 leap.keymanager>=0.3.8 twisted # >= 12.0.3 ?? zope.proxy +service-identity -- cgit v1.2.3 From 224ce27d98662e5823711a650d92ca9e6087a6e9 Mon Sep 17 00:00:00 2001 From: Ivan Alejandro Date: Fri, 10 Jul 2015 17:11:58 -0300 Subject: [pkg] bump dependencies --- mail/pkg/requirements.pip | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'mail/pkg') diff --git a/mail/pkg/requirements.pip b/mail/pkg/requirements.pip index 20f93a6..d77059a 100644 --- a/mail/pkg/requirements.pip +++ b/mail/pkg/requirements.pip @@ -1,7 +1,7 @@ zope.interface -leap.soledad.client>=0.4.5 -leap.common>=0.3.7 -leap.keymanager>=0.3.8 +leap.soledad.client>=0.7.0 +leap.common>=0.4.0 +leap.keymanager>=0.4.0 twisted # >= 12.0.3 ?? zope.proxy service-identity -- cgit v1.2.3 From 46de0ce8859d9fb5265b90e38bbc05138a254cc3 Mon Sep 17 00:00:00 2001 From: Kali Kaneko Date: Wed, 22 Jul 2015 12:23:18 -0400 Subject: [pkg] separate leap requirements this is part of a process to make the setup of the development mode less troublesome. from now on, setting up a virtualenv in pure development mode will be as easy as telling pip to just install the external dependencies:: pip install -r pkg/requirements.pip and traversing all the leap repos for the needed leap dependencies doing:: python setup.py develop - Related: #7288 --- mail/pkg/requirements-leap.pip | 3 +++ mail/pkg/requirements.pip | 3 --- mail/pkg/utils.py | 29 +++++++++++++++++++++++------ 3 files changed, 26 insertions(+), 9 deletions(-) create mode 100644 mail/pkg/requirements-leap.pip (limited to 'mail/pkg') diff --git a/mail/pkg/requirements-leap.pip b/mail/pkg/requirements-leap.pip new file mode 100644 index 0000000..f50487e --- /dev/null +++ b/mail/pkg/requirements-leap.pip @@ -0,0 +1,3 @@ +leap.common>=0.4.0 +leap.soledad.client>=0.7.0 +leap.keymanager>=0.4.0 diff --git a/mail/pkg/requirements.pip b/mail/pkg/requirements.pip index d77059a..0caa66b 100644 --- a/mail/pkg/requirements.pip +++ b/mail/pkg/requirements.pip @@ -1,7 +1,4 @@ zope.interface -leap.soledad.client>=0.7.0 -leap.common>=0.4.0 -leap.keymanager>=0.4.0 twisted # >= 12.0.3 ?? zope.proxy service-identity diff --git a/mail/pkg/utils.py b/mail/pkg/utils.py index deace14..d168010 100644 --- a/mail/pkg/utils.py +++ b/mail/pkg/utils.py @@ -14,20 +14,34 @@ # # You should have received a copy of the GNU General Public License # along with this program. If not, see . - """ Utils to help in the setup process """ - import os import re import sys +def is_develop_mode(): + """ + Returns True if we're calling the setup script using the argument for + setuptools development mode. + + This avoids messing up with dependency pinning and order, the + responsibility of installing the leap dependencies is left to the + developer. + """ + args = sys.argv + devflags = "setup.py", "develop" + if (args[0], args[1]) == devflags: + return True + return False + + def get_reqs_from_files(reqfiles): """ Returns the contents of the top requirement file listed as a - string list with the lines + string list with the lines. @param reqfiles: requirement files to parse @type reqfiles: list of str @@ -43,6 +57,9 @@ def parse_requirements(reqfiles=['requirements.txt', """ Parses the requirement files provided. + The passed reqfiles list is a list of possible locations to try, the + function will return the contents of the first path found. + Checks the value of LEAP_VENV_SKIP_PYSIDE to see if it should return PySide as a dep or not. Don't set, or set to 0 if you want to install it through pip. @@ -58,9 +75,9 @@ def parse_requirements(reqfiles=['requirements.txt', if re.match(r'\s*-e\s+', line): pass # do not try to do anything with externals on vcs - #requirements.append(re.sub(r'\s*-e\s+.*#egg=(.*)$', r'\1', - #line)) - # http://foo.bar/baz/foobar/zipball/master#egg=foobar + # requirements.append(re.sub(r'\s*-e\s+.*#egg=(.*)$', r'\1', + # line)) + # http://foo.bar/baz/foobar/zipball/master#egg=foobar elif re.match(r'\s*https?:', line): requirements.append(re.sub(r'\s*https?:.*#egg=(.*)$', r'\1', line)) -- cgit v1.2.3 From 0d445589fcc2567bc9b995e5a27689506361fe43 Mon Sep 17 00:00:00 2001 From: Kali Kaneko Date: Mon, 27 Jul 2015 22:12:01 -0400 Subject: [pkg] add AUTHORS file + one-liner to generate it --- mail/pkg/tools/get_authors.sh | 2 ++ 1 file changed, 2 insertions(+) create mode 100755 mail/pkg/tools/get_authors.sh (limited to 'mail/pkg') diff --git a/mail/pkg/tools/get_authors.sh b/mail/pkg/tools/get_authors.sh new file mode 100755 index 0000000..0169bb1 --- /dev/null +++ b/mail/pkg/tools/get_authors.sh @@ -0,0 +1,2 @@ +#!/bin/sh +git log --format='%aN <%aE>' | awk '{arr[$0]++} END{for (i in arr){print arr[i], i;}}' | sort -rn | cut -d' ' -f2- -- cgit v1.2.3 From 8af25f6423ab9cf17a225362df401bde06fdbe7a Mon Sep 17 00:00:00 2001 From: Kali Kaneko Date: Mon, 27 Jul 2015 22:15:23 -0400 Subject: [pkg] add script to install base requirements - update pip - install base reqs --- mail/pkg/pip_install_requirements.sh | 4 ++++ 1 file changed, 4 insertions(+) create mode 100755 mail/pkg/pip_install_requirements.sh (limited to 'mail/pkg') diff --git a/mail/pkg/pip_install_requirements.sh b/mail/pkg/pip_install_requirements.sh new file mode 100755 index 0000000..29f03f3 --- /dev/null +++ b/mail/pkg/pip_install_requirements.sh @@ -0,0 +1,4 @@ +#!/bin/sh +# Update pip and install LEAP base requirements. +pip install -U pip +pip install -r pkg/requirements.pip -- cgit v1.2.3 From 6e98cbd8c7483ab4666f0a2db727e67c1e477dd9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Parm=C3=A9nides=20GV?= Date: Fri, 31 Jul 2015 09:02:45 +0200 Subject: [feat] use wheels to install dependencies generate_wheels uses $WHEELHOUSE to generate and store the wheels for requirements.pip and requirements-testing.pip (if it exists). pip_install_requirements.sh installs requirements.pip from them if possible (if not, then it fetches them from pypi) or, if passed the --testing flag, it installs requirements-testing.pip. Related: #7327 --- mail/pkg/generate_wheels.sh | 14 +++++++ mail/pkg/pip_install_requirements.sh | 71 ++++++++++++++++++++++++++++++++++-- 2 files changed, 82 insertions(+), 3 deletions(-) create mode 100755 mail/pkg/generate_wheels.sh (limited to 'mail/pkg') diff --git a/mail/pkg/generate_wheels.sh b/mail/pkg/generate_wheels.sh new file mode 100755 index 0000000..6679d1d --- /dev/null +++ b/mail/pkg/generate_wheels.sh @@ -0,0 +1,14 @@ +#!/bin/sh +# Generate wheels for dependencies +# For convenience, u1db and dirspec are allowed with insecure flags enabled. +# Use at your own risk. + +if [ "$WHEELHOUSE" = "" ]; then + WHEELHOUSE=$HOME/wheelhouse +fi + +pip wheel --wheel-dir $WHEELHOUSE pip +pip wheel --wheel-dir $WHEELHOUSE -r pkg/requirements.pip +if [ -f pkg/requirements-testing.pip ]; then + pip wheel --wheel-dir $WHEELHOUSE -r pkg/requirements-testing.pip +fi diff --git a/mail/pkg/pip_install_requirements.sh b/mail/pkg/pip_install_requirements.sh index 29f03f3..bd44457 100755 --- a/mail/pkg/pip_install_requirements.sh +++ b/mail/pkg/pip_install_requirements.sh @@ -1,4 +1,69 @@ #!/bin/sh -# Update pip and install LEAP base requirements. -pip install -U pip -pip install -r pkg/requirements.pip +# Update pip and install LEAP base/testing requirements. +# For convenience, $insecure_packages are allowed with insecure flags enabled. +# Use at your own risk. +# See $usage for help + +insecure_packages="" + +return_wheelhouse() { + if [ "$WHEELHOUSE" = "" ]; then + WHEELHOUSE=$HOME/wheelhouse + fi + + if [ ! -d "$WHEELHOUSE" ]; then + mkdir $WHEELHOUSE + fi + + echo "$WHEELHOUSE" +} + +show_help() { + usage="Usage: $0 [--testing]\n --testing\tInstall dependencies from requirements-testing.pip\n +\t\tOtherwise, it will install requirements.pip" + echo $usage + + exit 1 +} + +process_arguments() { + testing=false + while [ "$#" -gt 0 ]; do + # From http://stackoverflow.com/a/31443098 + case "$1" in + --help) show_help;; + --testing) testing=true; shift 1;; + + -h) show_help;; + -*) echo "unknown option: $1" >&2; exit 1;; + esac + done +} + +return_insecure_flags() { + for insecure_package in $insecure_packages; do + flags="$flags --allow-external $insecure_package --allow-unverified $insecure_package" + done + + echo $flags +} + +return_packages() { + if $testing ; then + packages="-r pkg/requirements-testing.pip" + else + packages="-r pkg/requirements.pip" + fi + + echo $packages +} + +process_arguments $@ +wheelhouse=`return_wheelhouse` +install_options="-U --find-links=$wheelhouse" +insecure_flags=`return_insecure_flags` +packages=`return_packages` + +pip install -U wheel +pip install $install_options pip +pip install $install_options $insecure_flags $packages -- cgit v1.2.3 From 85eb777a96e6184145bb6f5a71ce90bb4108c56b Mon Sep 17 00:00:00 2001 From: Bruno Wagner Date: Mon, 3 Aug 2015 17:40:04 -0300 Subject: [tests] Added requirements-latest help HEAD development Added requirements-latest to make sure we always use the latest develop of all dependencies in an automated way --- mail/pkg/requirements-latest.pip | 9 +++++++++ 1 file changed, 9 insertions(+) create mode 100644 mail/pkg/requirements-latest.pip (limited to 'mail/pkg') diff --git a/mail/pkg/requirements-latest.pip b/mail/pkg/requirements-latest.pip new file mode 100644 index 0000000..846a319 --- /dev/null +++ b/mail/pkg/requirements-latest.pip @@ -0,0 +1,9 @@ +--index-url https://pypi.python.org/simple/ + +--allow-external u1db --allow-unverified u1db +--allow-external dirspec --allow-unverified dirspec +-e 'git+https://github.com/pixelated-project/leap_pycommon.git@develop#egg=leap.common' +-e 'git+https://github.com/pixelated-project/soledad.git@develop#egg=leap.soledad.common&subdirectory=common/' +-e 'git+https://github.com/pixelated-project/soledad.git@develop#egg=leap.soledad.client&subdirectory=client/' +-e 'git+https://github.com/pixelated-project/keymanager.git@develop#egg=leap.keymanager' +-e . -- cgit v1.2.3 From 2a58095dcd4168e6d36ac86ea44fd350c24e03d5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Parm=C3=A9nides=20GV?= Date: Thu, 6 Aug 2015 08:55:50 +0200 Subject: [feat] WHEELHOUSE can be a url + --use-leap-wheels --use-leap-wheels sets --trusted-host (remove it when we have a proper cert) and WHEELHOUSE to https://ftp.lizard.leap.se Until we get ftp.lizard cname, use lizard as the wheels server. - Related: #7339 --- mail/pkg/pip_install_requirements.sh | 53 ++++++++++++++++++++++++------------ 1 file changed, 35 insertions(+), 18 deletions(-) (limited to 'mail/pkg') diff --git a/mail/pkg/pip_install_requirements.sh b/mail/pkg/pip_install_requirements.sh index bd44457..57732e2 100755 --- a/mail/pkg/pip_install_requirements.sh +++ b/mail/pkg/pip_install_requirements.sh @@ -1,38 +1,31 @@ -#!/bin/sh +#!/bin/bash # Update pip and install LEAP base/testing requirements. # For convenience, $insecure_packages are allowed with insecure flags enabled. # Use at your own risk. # See $usage for help insecure_packages="" - -return_wheelhouse() { - if [ "$WHEELHOUSE" = "" ]; then - WHEELHOUSE=$HOME/wheelhouse - fi - - if [ ! -d "$WHEELHOUSE" ]; then - mkdir $WHEELHOUSE - fi - - echo "$WHEELHOUSE" -} +leap_wheelhouse=https://lizard.leap.se/wheels show_help() { - usage="Usage: $0 [--testing]\n --testing\tInstall dependencies from requirements-testing.pip\n -\t\tOtherwise, it will install requirements.pip" - echo $usage + usage="Usage: $0 [--testing] [--use-leap-wheels]\n --testing\t\tInstall dependencies from requirements-testing.pip\n +\t\t\tOtherwise, it will install requirements.pip\n +--use-leap-wheels\tUse wheels from leap.se" + echo -e $usage exit 1 } process_arguments() { testing=false + use_leap_wheels=false + while [ "$#" -gt 0 ]; do # From http://stackoverflow.com/a/31443098 case "$1" in --help) show_help;; --testing) testing=true; shift 1;; + --use-leap-wheels) use_leap_wheels=true; shift 1;; -h) show_help;; -*) echo "unknown option: $1" >&2; exit 1;; @@ -40,6 +33,31 @@ process_arguments() { done } +return_wheelhouse() { + if $use_leap_wheels ; then + WHEELHOUSE=$leap_wheelhouse + elif [ "$WHEELHOUSE" = "" ]; then + WHEELHOUSE=$HOME/wheelhouse + fi + + # Tested with bash and zsh + if [[ $WHEELHOUSE != http* && ! -d "$WHEELHOUSE" ]]; then + mkdir $WHEELHOUSE + fi + + echo "$WHEELHOUSE" +} + +return_install_options() { + wheelhouse=`return_wheelhouse` + install_options="-U --find-links=$wheelhouse" + if $use_leap_wheels ; then + install_options="$install_options --trusted-host lizard.leap.se" + fi + + echo $install_options +} + return_insecure_flags() { for insecure_package in $insecure_packages; do flags="$flags --allow-external $insecure_package --allow-unverified $insecure_package" @@ -59,8 +77,7 @@ return_packages() { } process_arguments $@ -wheelhouse=`return_wheelhouse` -install_options="-U --find-links=$wheelhouse" +install_options=`return_install_options` insecure_flags=`return_insecure_flags` packages=`return_packages` -- cgit v1.2.3 From ecd6cdd674acdcbbaba13b844177cfd8160e5848 Mon Sep 17 00:00:00 2001 From: Kali Kaneko Date: Mon, 14 Sep 2015 23:33:16 -0400 Subject: [pkg] bump leap versions needed --- mail/pkg/requirements-leap.pip | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'mail/pkg') diff --git a/mail/pkg/requirements-leap.pip b/mail/pkg/requirements-leap.pip index f50487e..feb9f37 100644 --- a/mail/pkg/requirements-leap.pip +++ b/mail/pkg/requirements-leap.pip @@ -1,3 +1,3 @@ -leap.common>=0.4.0 +leap.common>=0.4.3 leap.soledad.client>=0.7.0 leap.keymanager>=0.4.0 -- cgit v1.2.3 From ea5d20bc1c8fa3a137cc54d8faa0294f5014d959 Mon Sep 17 00:00:00 2001 From: Folker Bernitt Date: Tue, 9 Feb 2016 10:29:52 +0100 Subject: [tests] fix missing pycryptopp dependency and mock async calls - leap_mail still uses pycryptopp and therefore still needs the dependency - Keymanager calls to async HTTPClient had not been mocked, causing a test to fail - fixed a pep8 warning --- mail/pkg/requirements-latest.pip | 2 ++ 1 file changed, 2 insertions(+) (limited to 'mail/pkg') diff --git a/mail/pkg/requirements-latest.pip b/mail/pkg/requirements-latest.pip index 846a319..f561d4e 100644 --- a/mail/pkg/requirements-latest.pip +++ b/mail/pkg/requirements-latest.pip @@ -1,5 +1,7 @@ --index-url https://pypi.python.org/simple/ +pycryptopp + --allow-external u1db --allow-unverified u1db --allow-external dirspec --allow-unverified dirspec -e 'git+https://github.com/pixelated-project/leap_pycommon.git@develop#egg=leap.common' -- cgit v1.2.3 From 9e15deaee705fcc5f01f10c63c695595e937d3b1 Mon Sep 17 00:00:00 2001 From: Ruben Pollan Date: Thu, 11 Feb 2016 01:20:33 +0100 Subject: [feat] Use cryptography instead of pycryptopp to reduce dependencies. * Resolves: #7889 --- mail/pkg/requirements-latest.pip | 2 -- 1 file changed, 2 deletions(-) (limited to 'mail/pkg') diff --git a/mail/pkg/requirements-latest.pip b/mail/pkg/requirements-latest.pip index f561d4e..846a319 100644 --- a/mail/pkg/requirements-latest.pip +++ b/mail/pkg/requirements-latest.pip @@ -1,7 +1,5 @@ --index-url https://pypi.python.org/simple/ -pycryptopp - --allow-external u1db --allow-unverified u1db --allow-external dirspec --allow-unverified dirspec -e 'git+https://github.com/pixelated-project/leap_pycommon.git@develop#egg=leap.common' -- cgit v1.2.3 From f3780bce87a9fdb398e40eab7ea06918c841c777 Mon Sep 17 00:00:00 2001 From: Giovane Date: Tue, 5 Jan 2016 17:54:17 -0200 Subject: Fix pixelated repos reference on requirements --- mail/pkg/requirements-latest.pip | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'mail/pkg') diff --git a/mail/pkg/requirements-latest.pip b/mail/pkg/requirements-latest.pip index 846a319..3526bbd 100644 --- a/mail/pkg/requirements-latest.pip +++ b/mail/pkg/requirements-latest.pip @@ -1,9 +1,9 @@ --index-url https://pypi.python.org/simple/ ---allow-external u1db --allow-unverified u1db ---allow-external dirspec --allow-unverified dirspec --e 'git+https://github.com/pixelated-project/leap_pycommon.git@develop#egg=leap.common' --e 'git+https://github.com/pixelated-project/soledad.git@develop#egg=leap.soledad.common&subdirectory=common/' --e 'git+https://github.com/pixelated-project/soledad.git@develop#egg=leap.soledad.client&subdirectory=client/' --e 'git+https://github.com/pixelated-project/keymanager.git@develop#egg=leap.keymanager' +https://launchpad.net/dirspec/stable-13-10/13.10/+download/dirspec-13.10.tar.gz +https://launchpad.net/ubuntu/+archive/primary/+files/u1db_13.09.orig.tar.bz2 +-e 'git+https://github.com/pixelated/leap_pycommon.git@develop#egg=leap.common' +-e 'git+https://github.com/pixelated/soledad.git@develop#egg=leap.soledad.common&subdirectory=common/' +-e 'git+https://github.com/pixelated/soledad.git@develop#egg=leap.soledad.client&subdirectory=client/' +-e 'git+https://github.com/pixelated/keymanager.git@develop#egg=leap.keymanager' -e . -- cgit v1.2.3 From e720cba178e97b31966497a9e53e828b75f404ab Mon Sep 17 00:00:00 2001 From: Kali Kaneko Date: Mon, 18 Apr 2016 11:41:53 -0400 Subject: [pkg] bump leap deps --- mail/pkg/requirements-leap.pip | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'mail/pkg') diff --git a/mail/pkg/requirements-leap.pip b/mail/pkg/requirements-leap.pip index feb9f37..134b783 100644 --- a/mail/pkg/requirements-leap.pip +++ b/mail/pkg/requirements-leap.pip @@ -1,3 +1,3 @@ -leap.common>=0.4.3 -leap.soledad.client>=0.7.0 -leap.keymanager>=0.4.0 +leap.common>=0.5.1 +leap.soledad.client>=0.8.0 +leap.keymanager>=0.5.0 -- cgit v1.2.3 From 47187ffe9d3f78e6d8c74f92fc4cdba2f245232d Mon Sep 17 00:00:00 2001 From: Christoph Kluenter Date: Tue, 5 Jul 2016 14:59:34 +0200 Subject: remove links to pixelated See https://github.com/pixelated/puppet-pixelated/issues/49 --- mail/pkg/requirements-latest.pip | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'mail/pkg') diff --git a/mail/pkg/requirements-latest.pip b/mail/pkg/requirements-latest.pip index 3526bbd..58347b6 100644 --- a/mail/pkg/requirements-latest.pip +++ b/mail/pkg/requirements-latest.pip @@ -2,8 +2,8 @@ https://launchpad.net/dirspec/stable-13-10/13.10/+download/dirspec-13.10.tar.gz https://launchpad.net/ubuntu/+archive/primary/+files/u1db_13.09.orig.tar.bz2 --e 'git+https://github.com/pixelated/leap_pycommon.git@develop#egg=leap.common' --e 'git+https://github.com/pixelated/soledad.git@develop#egg=leap.soledad.common&subdirectory=common/' --e 'git+https://github.com/pixelated/soledad.git@develop#egg=leap.soledad.client&subdirectory=client/' --e 'git+https://github.com/pixelated/keymanager.git@develop#egg=leap.keymanager' +-e 'git+https://github.com/leapcode/leap_pycommon.git@develop#egg=leap.common' +-e 'git+https://github.com/leapcode/soledad.git@develop#egg=leap.soledad.common&subdirectory=common/' +-e 'git+https://github.com/leapcode/soledad.git@develop#egg=leap.soledad.client&subdirectory=client/' +-e 'git+https://github.com/leapcode/keymanager.git@develop#egg=leap.keymanager' -e . -- cgit v1.2.3