Skip to content
Permalink
Browse files

Updating to latest python packages and simplifying venv bootstrap.

  • Loading branch information...
cyrusdaboo committed Jul 7, 2016
1 parent 029ba03 commit c6ee47d03b0fea13c3cddcf39c59affccb56f76a
@@ -615,7 +615,7 @@ c_dependencies () {
c_dependency -m "3f0c388566c688c82b01a0edf1e6b7a0" \
"PostgreSQL" "${p}" \
"http://ftp.postgresql.org/pub/source/v${v}/${p}.tar.bz2" \
--with-python ${enable_dtrace};
${enable_dtrace};
fi;

}
@@ -678,6 +678,12 @@ py_dependencies () {
--no-setuptools \
${virtualenv_opts} \
"${py_virtualenv}";
case "$(uname -s)" in
Darwin)
echo "macOS virtualenv codesign fix."
cp "/usr/bin/python" "${py_bindir}/python";
;;
esac;
fi;

cd "${wd}";
@@ -735,37 +741,15 @@ macos_oracle () {

bootstrap_virtualenv () {
mkdir -p "${py_ve_tools}";
mkdir -p "${py_ve_tools}/lib";
mkdir -p "${py_ve_tools}/junk";
export PYTHONUSERBASE="${py_ve_tools}"

for pkg in \
setuptools-18.5 \
pip-8.1.2 \
virtualenv-15.0.2 \
setuptools==18.5 \
pip==8.1.2 \
virtualenv==15.0.2 \
; do
local name="${pkg%-*}";
local version="${pkg#*-}";
local first="$(echo "${name}" | sed 's|^\(.\).*$|\1|')";
local url="https://pypi.python.org/packages/source/${first}/${name}/${pkg}.tar.gz";

ruler "Downloading ${pkg}";

local tmp="$(mktemp -d -t ccsXXXXX)";

curl -L "${url}" | tar -C "${tmp}" -xvzf -;

cd "${tmp}/$(basename "${pkg}")";
PYTHONPATH="${py_ve_tools}/lib" \
"${bootstrap_python}" setup.py install \
--install-base="${py_ve_tools}" \
--install-lib="${py_ve_tools}/lib" \
--install-headers="${py_ve_tools}/junk" \
--install-scripts="${py_ve_tools}/junk" \
--install-data="${py_ve_tools}/junk" \
; \
cd "${wd}";

rm -rf "${tmp}";
ruler "Installing ${pkg}";
"${bootstrap_python}" -m pip install -I --user "${pkg}";
done;
}

@@ -2,14 +2,14 @@ Index: twisted/internet/_sslverify.py
===================================================================
--- twisted/internet/_sslverify.py (revision 45115)
+++ twisted/internet/_sslverify.py (working copy)
@@ -162,7 +162,9 @@
@@ -174,7 +174,9 @@
"rejected."
)

major, minor = list(int(part) for part in lib.__version__.split("."))[:2]

- if (major, minor) >= (0, 12):
- if _usablePyOpenSSL(lib.__version__):
+ if hasattr(lib, "__SecureTransport__"):
+ pass
+ elif (major, minor) >= (0, 12):
+ elif _usablePyOpenSSL(lib.__version__):
try:
from service_identity import VerificationError
from service_identity.pyopenssl import verify_hostname
@@ -18,7 +18,7 @@ Index: twisted/protocols/tls.py
===================================================================
--- twisted/protocols/tls.py (revision 45115)
+++ twisted/protocols/tls.py (working copy)
@@ -660,7 +660,9 @@
@@ -705,7 +705,9 @@
@rtype: L{OpenSSL.SSL.Connection}
"""
context = self._oldStyleContextFactory.getContext()
@@ -7,34 +7,34 @@
zope.interface==4.1.3
setuptools==18.5

--editable svn+http://svn.calendarserver.org/repository/calendarserver/twext/trunk@15734#egg=twextpy
cffi==1.3.0
--editable svn+http://svn.calendarserver.org/repository/calendarserver/twext/trunk@15744#egg=twextpy
cffi==1.7.0
pycparser==2.14
#twisted

# [LDAP] extra
python-ldap==2.4.22
python-ldap==2.4.25
#setuptools

# [DAL] extra
sqlparse==0.1.18
sqlparse==0.1.19

# [OpenDirectory] extra
#pyobjc-framework-OpenDirectory # Use system module

# [Postgres] extra
pg8000==1.10.2
pg8000==1.10.6

# [Oracle] extra
#cx_Oracle==5.2 # Needs manual patch

--editable svn+http://svn.calendarserver.org/repository/calendarserver/PyKerberos/trunk@15423#egg=kerberos

--editable svn+http://svn.calendarserver.org/repository/calendarserver/PyCalendar/trunk@15423#egg=pycalendar
python-dateutil==2.4.2
pytz==2015.7
python-dateutil==2.5.3
pytz==2016.4

psutil==3.4.2
setproctitle==1.1.9
psutil==4.3.0
setproctitle==1.1.10
# xattr==0.7.5 # Only needed for upgrades from ancient versions. Added in _cache_deps.
#cffi
@@ -3,27 +3,27 @@
##


Twisted==15.4.0
Twisted==16.3.0
#zope.interface

# NOTE: Twisted also uses pyOpenSSL, pycrypto and service_identity,
# but doesn't specify them as dependencies, so that are explicitly
# added to calendarserver.
#pyOpenSSL
service_identity==14.0.0
service_identity==16.0.0
characteristic==14.3.0
pyasn1==0.1.9
pyasn1-modules==0.0.8
#pyOpenSSL
pycrypto==2.6.1

pyOpenSSL==0.15.1
pyOpenSSL==16.0.0
cryptography==1.1
idna
#pyasn1
#cffi
enum34==1.0.4
enum34==1.1.6
ipaddress
#setuptools==17.0
#setuptools
#six
six==1.10.0
@@ -2,13 +2,13 @@
# Twisted dependency for OS X systems (uses pySecureTransport).
##

Twisted==15.4.0
Twisted==16.3.0
#zope.interface
pycrypto==2.6.1

--editable svn+http://svn.calendarserver.org/repository/calendarserver/OSXFrameworks/trunk@15423#egg=osxframeworks
#cffi==1.3.0
# pycparser==2.14
#cffi
# pycparser

--editable svn+http://svn.calendarserver.org/repository/calendarserver/PySecureTransport/trunk@15554#egg=pysecuretransport

@@ -328,7 +328,7 @@ def version():
install_requirements = [
# Core frameworks
"zope.interface",
"Twisted==15.4.0",
"Twisted==16.3.0",
"twextpy",

# Security frameworks
@@ -24,6 +24,7 @@
from txdav.common.icommondatastore import InternalDataStoreError

import pg8000 as postgres
import six

try:
import os
@@ -430,7 +431,7 @@ def my_text_out(v):
return v.encode("utf-8") if isinstance(v, unicode) else str(v)

connection.realConnection.py_types[str] = (705, postgres.core.FC_TEXT, my_text_out)
connection.realConnection.py_types[postgres.six.text_type] = (705, postgres.core.FC_TEXT, my_text_out)
connection.realConnection.py_types[six.text_type] = (705, postgres.core.FC_TEXT, my_text_out)

def my_text_recv(data, offset, length):
return str(data[offset: offset + length])

0 comments on commit c6ee47d

Please sign in to comment.
You can’t perform that action at this time.