[CalendarServer-changes] [12605] twext/trunk
source_changes at macosforge.org
source_changes at macosforge.org
Wed Mar 12 11:25:08 PDT 2014
Revision: 12605
http://trac.calendarserver.org//changeset/12605
Author: wsanchez at apple.com
Date: 2014-02-07 11:06:03 -0800 (Fri, 07 Feb 2014)
Log Message:
-----------
_DEVELOP -> _DEVELOP_PROJECT_
Modified Paths:
--------------
twext/trunk/bin/_build.sh
twext/trunk/bin/develop
twext/trunk/bin/pyflakes
twext/trunk/bin/python
twext/trunk/bin/test
twext/trunk/bin/trial
twext/trunk/bin/twistd
twext/trunk/setup.py
twext/trunk/twext/who/test/test_directory.py
Modified: twext/trunk/bin/_build.sh
===================================================================
--- twext/trunk/bin/_build.sh 2014-02-07 18:59:49 UTC (rev 12604)
+++ twext/trunk/bin/_build.sh 2014-02-07 19:06:03 UTC (rev 12605)
@@ -97,6 +97,8 @@
python="${py_bindir}/python";
+ project="$(setup_print name)";
+
if [ -z "${TWEXT_PKG_CACHE-}" ]; then
dep_packages="${dev_home}/pkg";
else
@@ -104,6 +106,7 @@
fi;
export PYTHONPATH="${wd}:${PYTHONPATH:-}";
+ export _DEVELOP_PROJECT_="${project}";
# These variables are defaults for things which might be configured by
# environment; only set them if they're un-set.
@@ -527,6 +530,20 @@
fi;
ruler;
+ if type -P memcached > /dev/null; then
+ using_system "memcached";
+ else
+ local le="libevent-2.0.21-stable";
+ local mc="memcached-1.4.16";
+ c_dependency -m "b2405cc9ebf264aa47ff615d9de527a2" \
+ "libevent" "${le}" \
+ "http://github.com/downloads/libevent/libevent/${le}.tar.gz";
+ c_dependency -m "1c5781fecb52d70b615c6d0c9c140c9c" \
+ "memcached" "${mc}" \
+ "http://www.memcached.org/files/${mc}.tar.gz";
+ fi;
+
+ ruler;
if type -P postgres > /dev/null; then
using_system "Postgres";
else
Modified: twext/trunk/bin/develop
===================================================================
--- twext/trunk/bin/develop 2014-02-07 18:59:49 UTC (rev 12604)
+++ twext/trunk/bin/develop 2014-02-07 19:06:03 UTC (rev 12605)
@@ -23,8 +23,6 @@
wd="$(cd "$(dirname "$0")/.." && pwd)";
fi;
-export _DEVELOP="true";
-
. "${wd}/bin/_build.sh";
develop;
Modified: twext/trunk/bin/pyflakes
===================================================================
--- twext/trunk/bin/pyflakes 2014-02-07 18:59:49 UTC (rev 12604)
+++ twext/trunk/bin/pyflakes 2014-02-07 19:06:03 UTC (rev 12605)
@@ -21,8 +21,6 @@
wd="$(cd "$(dirname "$0")/.." && pwd -L)";
-export _DEVELOP="true";
-
. "${wd}/bin/_build.sh";
init_build > /dev/null;
Modified: twext/trunk/bin/python
===================================================================
--- twext/trunk/bin/python 2014-02-07 18:59:49 UTC (rev 12604)
+++ twext/trunk/bin/python 2014-02-07 19:06:03 UTC (rev 12605)
@@ -21,10 +21,6 @@
wd="$(cd "$(dirname "$0")/.." && pwd)";
-export _DEVELOP="true";
-
-export PYTHONPATH="${wd}:${PYTHONPATH:-}";
-
. "${wd}/bin/_build.sh";
init_build > /dev/null;
Modified: twext/trunk/bin/test
===================================================================
--- twext/trunk/bin/test 2014-02-07 18:59:49 UTC (rev 12604)
+++ twext/trunk/bin/test 2014-02-07 19:06:03 UTC (rev 12605)
@@ -25,8 +25,6 @@
wd="$(cd "$(dirname "$0")/.." && pwd -L)";
-export _DEVELOP="true";
-
. "${wd}/bin/_build.sh";
init_build > /dev/null;
@@ -86,7 +84,7 @@
if [ $# -eq 0 ]; then
lint="true";
- set - twext;
+ set - calendarserver twistedcaldav txdav txweb2 contrib;
else
lint="false";
fi;
@@ -94,6 +92,15 @@
#
+# Dependencies
+#
+
+#c_dependencies >> "${dev_home}/setup.log";
+#py_dependencies >> "${dev_home}/setup.log";
+
+
+
+#
# Clean up
#
Modified: twext/trunk/bin/trial
===================================================================
--- twext/trunk/bin/trial 2014-02-07 18:59:49 UTC (rev 12604)
+++ twext/trunk/bin/trial 2014-02-07 19:06:03 UTC (rev 12605)
@@ -21,8 +21,6 @@
wd="$(cd "$(dirname "$0")/.." && pwd)";
-export _DEVELOP="true";
-
. "${wd}/bin/_build.sh";
init_build > /dev/null;
Modified: twext/trunk/bin/twistd
===================================================================
--- twext/trunk/bin/twistd 2014-02-07 18:59:49 UTC (rev 12604)
+++ twext/trunk/bin/twistd 2014-02-07 19:06:03 UTC (rev 12605)
@@ -21,8 +21,6 @@
wd="$(cd "$(dirname "$0")/.." && pwd)";
-export _DEVELOP="true";
-
. "${wd}/bin/_build.sh";
init_build > /dev/null;
Modified: twext/trunk/setup.py
===================================================================
--- twext/trunk/setup.py 2014-02-07 18:59:49 UTC (rev 12604)
+++ twext/trunk/setup.py 2014-02-07 19:06:03 UTC (rev 12605)
@@ -97,10 +97,13 @@
return full_version
+
#
# Options
#
+name = "twextpy"
+
description = "Extensions to Twisted"
long_description = file(joinpath(dirname(__file__), "README.rst")).read()
@@ -118,7 +121,16 @@
"Topic :: Software Development :: Libraries :: Python Modules",
]
+author = "Apple Inc."
+author_email = "calendarserver-dev at lists.macosforge.org"
+
+license = "Apache License, Version 2.0"
+
+platforms = ["all"]
+
+
+
#
# Dependencies
#
@@ -146,18 +158,12 @@
# Requirements for development and testing
develop_requirements = read_requirements("py_develop.txt")
-if environment.get("_DEVELOP", "false") == "true":
+if environment.get("_DEVELOP_PROJECT_", None) == name:
install_requirements.extend(develop_requirements)
install_requirements.extend(chain(*extras_requirements.values()))
- # Remove cx_Oracle here because we don't automate it's installation.
- install_requirements = [
- r for r in install_requirements
- if not r.startswith("cx-Oracle")
- ]
-
#
# Set up Extension modules that need to be built
#
@@ -193,16 +199,16 @@
version_file.close()
setup(
- name="twextpy",
+ name=name,
version=version_string,
description=description,
long_description=long_description,
url=url,
classifiers=classifiers,
- author="Apple Inc.",
- author_email="calendarserver-dev at lists.macosforge.org",
- license="Apache License, Version 2.0",
- platforms=["all"],
+ author=author,
+ author_email=author_email,
+ license=license,
+ platforms=platforms,
packages=find_packages(),
package_data={},
scripts=[],
Modified: twext/trunk/twext/who/test/test_directory.py
===================================================================
--- twext/trunk/twext/who/test/test_directory.py 2014-02-07 18:59:49 UTC (rev 12604)
+++ twext/trunk/twext/who/test/test_directory.py 2014-02-07 19:06:03 UTC (rev 12605)
@@ -833,7 +833,7 @@
plugh = self.serviceClass(u"plugh")
wsanchez = self.makeRecord(self.fields_wsanchez)
- wsanchezmod = self.makeRecord(self.fields_wsanchez, plugh)
+ wsanchezmod = self.makeRecord(self.fields_wsanchez, service=plugh)
glyph = self.makeRecord(self.fields_glyph)
glyphmod = self.makeRecord(fields_glyphmod)
@@ -844,6 +844,16 @@
self.assertNotEqual(wsanchez, wsanchezmod) # Different service
+ def test_compareOtherType(self):
+ """
+ Comparison of records with other object types.
+ """
+ wsanchez = self.makeRecord(self.fields_wsanchez)
+
+ self.assertIdentical(wsanchez.__eq__(object()), NotImplemented)
+ self.assertIdentical(wsanchez.__ne__(object()), NotImplemented)
+
+
def test_attributeAccess(self):
"""
Fields can be accessed as attributes.
@@ -922,7 +932,52 @@
raise NotImplementedError("Subclasses should implement this test.")
+ @inlineCallbacks
+ def test_verifyPlaintextPassword(self):
+ """
+ Plain text authentication.
+ """
+ password = u"secret"
+ fields = self.fields_wsanchez.copy()
+ fields[FieldName.password] = password
+
+ wsanchez = self.makeRecord(fields)
+
+ self.assertTrue((yield wsanchez.verifyPlaintextPassword(password)))
+ self.assertFalse((yield wsanchez.verifyPlaintextPassword(u"bleargh")))
+
+
+ @inlineCallbacks
+ def test_verifyHTTPDigest(self):
+ """
+ HTTP digest authentication.
+ """
+ password = u"secret"
+
+ fields = self.fields_wsanchez.copy()
+ fields[FieldName.password] = password
+
+ wsanchez = self.makeRecord(fields)
+
+ result = yield wsanchez.verifyHTTPDigest(
+ username=u"wsanchez",
+ realm=None,
+ nonce=None,
+ cnonce=None,
+ algorithm=None,
+ nc=None,
+ qop=None,
+ response=None,
+ )
+
+ self.assertTrue(result)
+ raise NotImplementedError()
+
+ test_verifyHTTPDigest.todo = "unimplemented"
+
+
+
class DirectoryRecordTest(unittest.TestCase, BaseDirectoryRecordTest):
"""
Tests for L{DirectoryRecord}.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.macosforge.org/pipermail/calendarserver-changes/attachments/20140312/74f30128/attachment.html>
More information about the calendarserver-changes
mailing list