summaryrefslogtreecommitdiff
path: root/mail/pkg
diff options
context:
space:
mode:
Diffstat (limited to 'mail/pkg')
-rwxr-xr-xmail/pkg/pip_install_requirements.sh4
-rw-r--r--mail/pkg/requirements-leap.pip3
-rw-r--r--mail/pkg/requirements.pip3
-rwxr-xr-xmail/pkg/tools/get_authors.sh2
-rw-r--r--mail/pkg/utils.py29
5 files changed, 32 insertions, 9 deletions
diff --git a/mail/pkg/pip_install_requirements.sh b/mail/pkg/pip_install_requirements.sh
new file mode 100755
index 00000000..29f03f3a
--- /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
diff --git a/mail/pkg/requirements-leap.pip b/mail/pkg/requirements-leap.pip
new file mode 100644
index 00000000..f50487ee
--- /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 d77059a6..0caa66b0 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/tools/get_authors.sh b/mail/pkg/tools/get_authors.sh
new file mode 100755
index 00000000..0169bb17
--- /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-
diff --git a/mail/pkg/utils.py b/mail/pkg/utils.py
index deace14b..d1680102 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 <http://www.gnu.org/licenses/>.
-
"""
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))