Skip to content

Commit d280faf

Browse files
committed
Upgrade dependencies and switch to setuptools
1 parent 6e26aba commit d280faf

File tree

4 files changed

+47
-40
lines changed

4 files changed

+47
-40
lines changed

README.rst

+2-2
Original file line numberDiff line numberDiff line change
@@ -44,9 +44,9 @@ If PostgreSQL is already installed on a separate server, adapt this step.
4444
--------------------
4545
::
4646

47-
$ mkvirtualenv -p python2.6 --no-site-packages oe
47+
$ mkvirtualenv -p python2.6 --no-site-packages --setuptools oe
4848
$ workon oe
49-
$ pip install -U pip distribute
49+
$ pip install -U pip setuptools
5050
$ pip install Babel
5151
$ pip freeze
5252

bootstrap.py

+23-18
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,11 @@
1818
use the -c option to specify an alternate configuration file.
1919
"""
2020

21-
import os, shutil, sys, tempfile
21+
import os
22+
import shutil
23+
import sys
24+
import tempfile
25+
2226
from optparse import OptionParser
2327

2428
tmpeggs = tempfile.mkdtemp()
@@ -31,8 +35,8 @@
3135
Simply run this script in a directory containing a buildout.cfg, using the
3236
Python that you want bin/buildout to use.
3337
34-
Note that by using --setup-source and --download-base to point to
35-
local resources, you can keep this script from going over the network.
38+
Note that by using --find-links to point to local resources, you can keep
39+
this script from going over the network.
3640
'''
3741

3842
parser = OptionParser(usage=usage)
@@ -48,23 +52,21 @@
4852
"bootstrap and buildout will get the newest releases "
4953
"even if they are alphas or betas."))
5054
parser.add_option("-c", "--config-file",
51-
help=("Specify the path to the buildout configuration "
52-
"file to be used."))
55+
help=("Specify the path to the buildout configuration "
56+
"file to be used."))
5357
parser.add_option("-f", "--find-links",
54-
help=("Specify a URL to search for buildout releases"))
58+
help=("Specify a URL to search for buildout releases"))
5559

5660

5761
options, args = parser.parse_args()
5862

5963
######################################################################
60-
# load/install distribute
64+
# load/install setuptools
6165

6266
to_reload = False
6367
try:
64-
import pkg_resources, setuptools
65-
if not hasattr(pkg_resources, '_distribute'):
66-
to_reload = True
67-
raise ImportError
68+
import pkg_resources
69+
import setuptools
6870
except ImportError:
6971
ez = {}
7072

@@ -73,8 +75,10 @@
7375
except ImportError:
7476
from urllib2 import urlopen
7577

76-
exec(urlopen('http://python-distribute.org/distribute_setup.py').read(), ez)
77-
setup_args = dict(to_dir=tmpeggs, download_delay=0, no_fake=True)
78+
# XXX use a more permanent ez_setup.py URL when available.
79+
exec(urlopen('https://bitbucket.org/pypa/setuptools/raw/0.7.2/ez_setup.py'
80+
).read(), ez)
81+
setup_args = dict(to_dir=tmpeggs, download_delay=0)
7882
ez['use_setuptools'](**setup_args)
7983

8084
if to_reload:
@@ -89,7 +93,7 @@
8993
######################################################################
9094
# Install buildout
9195

92-
ws = pkg_resources.working_set
96+
ws = pkg_resources.working_set
9397

9498
cmd = [sys.executable, '-c',
9599
'from setuptools.command.easy_install import main; main()',
@@ -104,22 +108,23 @@
104108
if find_links:
105109
cmd.extend(['-f', find_links])
106110

107-
distribute_path = ws.find(
108-
pkg_resources.Requirement.parse('distribute')).location
111+
setuptools_path = ws.find(
112+
pkg_resources.Requirement.parse('setuptools')).location
109113

110114
requirement = 'zc.buildout'
111115
version = options.version
112116
if version is None and not options.accept_buildout_test_releases:
113117
# Figure out the most recent final version of zc.buildout.
114118
import setuptools.package_index
115119
_final_parts = '*final-', '*final'
120+
116121
def _final_version(parsed_version):
117122
for part in parsed_version:
118123
if (part[:1] == '*') and (part not in _final_parts):
119124
return False
120125
return True
121126
index = setuptools.package_index.PackageIndex(
122-
search_path=[distribute_path])
127+
search_path=[setuptools_path])
123128
if find_links:
124129
index.add_find_links((find_links,))
125130
req = pkg_resources.Requirement.parse(requirement)
@@ -142,7 +147,7 @@ def _final_version(parsed_version):
142147
cmd.append(requirement)
143148

144149
import subprocess
145-
if subprocess.call(cmd, env=dict(os.environ, PYTHONPATH=distribute_path)) != 0:
150+
if subprocess.call(cmd, env=dict(os.environ, PYTHONPATH=setuptools_path)) != 0:
146151
raise Exception(
147152
"Failed to execute command:\n%s",
148153
repr(cmd)[1:-1])

buildout.cfg

+4-3
Original file line numberDiff line numberDiff line change
@@ -59,9 +59,10 @@ output = erppeek.ini
5959

6060
[versions]
6161
argparse = 1.2.1
62-
behave = 1.2.2
62+
behave = 1.2.3
6363
ERPpeek = 1.4.5
64-
hexagonit.recipe.download = 1.6
64+
hexagonit.recipe.download = 1.7
65+
importlib = 1.0.2
6566
mock = 1.0.1
66-
parse = 1.6.1
67+
parse = 1.6.2
6768
unittest2 = 0.5.1

etc/buildout-pinned.cfg

+18-17
Original file line numberDiff line numberDiff line change
@@ -7,41 +7,42 @@ collective.recipe.supervisor = 0.19
77
gf.recipe.bzr = 1.0rc8
88
meld3 = 0.6.10
99
; superlance = 0.7
10-
supervisor = 3.0b1
10+
supervisor = 3.0b2
1111
z3c.recipe.template = 0.1
12-
zc.buildout = 2.1.0
13-
zc.recipe.egg = 2.0.0a3
12+
zc.buildout = 2.2.0
13+
zc.recipe.egg = 2.0.0
1414

1515
; OpenERP
1616
Babel = 0.9.6
17-
distribute = 0.6.35
1817
feedparser = 5.1.3
19-
gdata = 2.0.17
20-
lxml = 3.1.0
21-
Mako = 0.7.3
22-
MarkupSafe = 0.15
23-
Pillow = 1.7.8
24-
psycopg2 = 2.4.6
18+
gdata = 2.0.18
19+
lxml = 3.2.1
20+
Mako = 0.8.1
21+
MarkupSafe = 0.18
22+
Pillow = 2.1.0
23+
psycopg2 = 2.5.1
2524
PyChart = 1.39
2625
pydot = 1.0.28
2726
pyparsing = 1.5.7
2827
python-dateutil = 1.5
29-
python-ldap = 2.4.10
28+
python-ldap = 2.4.13
3029
python-openid = 2.2.5
3130
pytz = 2013b
3231
PyWebDAV = 0.9.8
3332
PyYAML = 3.10
34-
reportlab = 2.6
35-
simplejson = 3.1.2
36-
vatnumber = 1.0
33+
reportlab = 2.7
34+
simplejson = 3.3.0
35+
vatnumber = 1.1
3736
vobject = 0.8.1c
37+
; OpenERP 6.1 gives errors with Werkzeug >= 0.9
38+
; https://gist.github.com/florentx/5973595
3839
Werkzeug = 0.8.3
39-
xlwt = 0.7.4
40+
xlwt = 0.7.5
4041

4142
; OpenERP 7.0
4243
docutils = 0.10
43-
Jinja2 = 2.6
44-
psutil = 0.6.1
44+
Jinja2 = 2.7
45+
psutil = 0.7.1
4546

4647
; OpenERP 6.1
4748
PyXML = 0.8.4

0 commit comments

Comments
 (0)