From 679de33b95ba88af5fa1a50e29cef39d59ec2d70 Mon Sep 17 00:00:00 2001 From: Ruben Pollan Date: Fri, 4 Jul 2014 12:16:33 -0500 Subject: Update documentation about events/proto --- src/leap/common/events/__init__.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/leap/common/events/__init__.py b/src/leap/common/events/__init__.py index 6eaf3d4..0cc6573 100644 --- a/src/leap/common/events/__init__.py +++ b/src/leap/common/events/__init__.py @@ -27,14 +27,14 @@ To register a callback to be executed when a specific event is signaled, use leap.common.events.register(): >>> from leap.common.events import register ->>> from leap.common.events.proto import CLIENT_UID ->>> register(CLIENT_UID, lambda req: do_something(req)) +>>> from leap.common.events import events_pb2 as proto +>>> register(proto.CLIENT_UID, lambda req: do_something(req)) To signal an event, use leap.common.events.signal(): >>> from leap.common.events import signal ->>> from leap.common.events.proto import CLIENT_UID ->>> signal(CLIENT_UID) +>>> from leap.common.events import events_pb2 as proto +>>> signal(proto.CLIENT_UID) NOTE ABOUT SYNC/ASYNC REQUESTS: -- cgit v1.2.3 From 60b51222f5aab24e8aab1b9f763c2d63eb29bc89 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tom=C3=A1s=20Touceda?= Date: Thu, 10 Jul 2014 11:29:31 -0300 Subject: Look for cacert.pem in the Resources dir in OSX --- changes/feature_support_cacert_osx | 1 + src/leap/common/ca_bundle.py | 8 ++++++++ 2 files changed, 9 insertions(+) create mode 100644 changes/feature_support_cacert_osx diff --git a/changes/feature_support_cacert_osx b/changes/feature_support_cacert_osx new file mode 100644 index 0000000..90a51bf --- /dev/null +++ b/changes/feature_support_cacert_osx @@ -0,0 +1 @@ + o Look for bundled cacert.pem in the Resources dir for OSX. \ No newline at end of file diff --git a/src/leap/common/ca_bundle.py b/src/leap/common/ca_bundle.py index 1e00f25..d8c72a6 100644 --- a/src/leap/common/ca_bundle.py +++ b/src/leap/common/ca_bundle.py @@ -21,8 +21,12 @@ If you are packaging Requests, e.g., for a Linux distribution or a managed environment, you can change the definition of where() to return a separately packaged CA bundle. """ +import platform import os.path +_system = platform.system() + +IS_MAC = _system == "Darwin" def where(): """ @@ -30,6 +34,10 @@ def where(): :rtype: str """ # vendored bundle inside Requests, plus some additions of ours + if IS_MAC: + return os.path.join("/Applications", "Bitmask.app", + "Contents", "Resources", + "cacert.pem") return os.path.join(os.path.dirname(__file__), 'cacert.pem') if __name__ == '__main__': -- cgit v1.2.3 From 1e9010e2902bf53706758f40da8b68b35908c811 Mon Sep 17 00:00:00 2001 From: kali Date: Mon, 14 Jul 2014 15:25:06 -0500 Subject: include pemfile in the installed package --- changes/bug_5897-include-pemfiles | 1 + setup.py | 1 + 2 files changed, 2 insertions(+) create mode 100644 changes/bug_5897-include-pemfiles diff --git a/changes/bug_5897-include-pemfiles b/changes/bug_5897-include-pemfiles new file mode 100644 index 0000000..b25345b --- /dev/null +++ b/changes/bug_5897-include-pemfiles @@ -0,0 +1 @@ +o Include pemfile in the package data. Closes: #5897 diff --git a/setup.py b/setup.py index 264d04c..a7de8f9 100644 --- a/setup.py +++ b/setup.py @@ -127,6 +127,7 @@ setup( classifiers=trove_classifiers, namespace_packages=["leap"], package_dir={'': 'src'}, + package_data={'': ['*.pem']}, # For now, we do not exclude tests because of the circular dependency # between leap.common and leap.soledad. #packages=find_packages('src', exclude=['leap.common.tests']), -- cgit v1.2.3 From bde8a330dc0a0cd43df1679a3f2c1d08b9bcfdf3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tom=C3=A1s=20Touceda?= Date: Fri, 18 Jul 2014 10:57:43 -0300 Subject: Fold in changes --- CHANGELOG | 4 ++++ changes/bug_5897-include-pemfiles | 1 - changes/feature_support_cacert_osx | 1 - 3 files changed, 4 insertions(+), 2 deletions(-) delete mode 100644 changes/bug_5897-include-pemfiles delete mode 100644 changes/feature_support_cacert_osx diff --git a/CHANGELOG b/CHANGELOG index e76720c..8895de3 100644 --- a/CHANGELOG +++ b/CHANGELOG @@ -1,3 +1,7 @@ +0.3.9 Jul 18, 2014: + o Include pemfile in the package data. Closes #5897. + o Look for bundled cacert.pem in the Resources dir for OSX. + 0.3.8 Jun 6, 2014: o Add Soledad sync status signals. Closes #5517. diff --git a/changes/bug_5897-include-pemfiles b/changes/bug_5897-include-pemfiles deleted file mode 100644 index b25345b..0000000 --- a/changes/bug_5897-include-pemfiles +++ /dev/null @@ -1 +0,0 @@ -o Include pemfile in the package data. Closes: #5897 diff --git a/changes/feature_support_cacert_osx b/changes/feature_support_cacert_osx deleted file mode 100644 index 90a51bf..0000000 --- a/changes/feature_support_cacert_osx +++ /dev/null @@ -1 +0,0 @@ - o Look for bundled cacert.pem in the Resources dir for OSX. \ No newline at end of file -- cgit v1.2.3