Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Merge branch 'master' of github.com:collective/mr.migrator

Conflicts:
	mr/migrator/runner/__init__.py
  • Loading branch information...
commit ffdb1f15a2b6287d333e7f0b418e2ed5c8f21237 2 parents 0535607 + 16c7c95
Dylan Jay authored
View
42 CHANGES.txt
@@ -1,25 +1,65 @@
-1.0b5 (Unreleased)
+1.0b10 (2012-01-23)
+-------------------
+
+- Revert portion of ec799dcd3d, causing ConfigurationErrors
+ [aclark]
+
+1.0b9 (2012-01-23)
+------------------
+
+- Fix brown bag release (bad MANIFEST)
+ [aclark]
+
+1.0b8 (2012-01-23)
+------------------
+
+- Fix brown bag release (missing zcml)
+ [aclark]
+
+1.0b7 (2012-01-23)
+------------------
+
+- Look for pipeline.cfg in cwd
+ [aclark]
+
+1.0b6 (2012-01-23)
+------------------
+
+- Fix brown bag release
+ [aclark]
+
+1.0b5 (2012-01-22)
------------------
- Bug fix: support for --zcml arguments
+ [aclark]
1.0b4 (2011-08-14)
------------------
+
- Bug fix: ZCML config
[aclark]
1.0b3 (2011-08-14)
------------------
+
- Bug fix: ZCML config
[aclark]
1.0b2 (2011-08-14)
------------------
+
- Bug fix: Python 2.4 compat
[aclark]
1.0b1 (2011-06-29)
------------------
+
- allow way of running zcml for blueprint packages in commandline
+ [djay]
+
- split out commandline runner from funnelweb
+ [djay]
+
- add start of form for running transmogrifier inside plone
+ [djay]
View
2  MANIFEST.in
@@ -0,0 +1,2 @@
+include *.txt *.rst
+recursive-include mr *.txt *.py *.zcml
View
22 bootstrap.py
@@ -18,13 +18,13 @@
use the -c option to specify an alternate configuration file.
"""
-import os, shutil, sys, tempfile, textwrap, urllib, urllib2, subprocess
+import os, shutil, sys, tempfile, urllib, urllib2, subprocess
from optparse import OptionParser
if sys.platform == 'win32':
def quote(c):
if ' ' in c:
- return '"%s"' % c # work around spawn lamosity on windows
+ return '"%s"' % c # work around spawn lamosity on windows
else:
return c
else:
@@ -57,13 +57,13 @@ def quote(c):
# out any namespace packages from site-packages that might have been
# loaded by .pth files.
clean_path = sys.path[:]
-import site
+import site # imported because of its side effects
sys.path[:] = clean_path
for k, v in sys.modules.items():
if k in ('setuptools', 'pkg_resources') or (
hasattr(v, '__path__') and
- len(v.__path__)==1 and
- not os.path.exists(os.path.join(v.__path__[0],'__init__.py'))):
+ len(v.__path__) == 1 and
+ not os.path.exists(os.path.join(v.__path__[0], '__init__.py'))):
# This is a namespace package. Remove it.
sys.modules.pop(k)
@@ -72,10 +72,11 @@ def quote(c):
setuptools_source = 'http://peak.telecommunity.com/dist/ez_setup.py'
distribute_source = 'http://python-distribute.org/distribute_setup.py'
+
# parsing arguments
def normalize_to_url(option, opt_str, value, parser):
if value:
- if '://' not in value: # It doesn't smell like a URL.
+ if '://' not in value: # It doesn't smell like a URL.
value = 'file://%s' % (
urllib.pathname2url(
os.path.abspath(os.path.expanduser(value))),)
@@ -110,7 +111,7 @@ def normalize_to_url(option, opt_str, value, parser):
help=("Specify a URL or file location for the setup file. "
"If you use Setuptools, this will default to " +
setuptools_source + "; if you use Distribute, this "
- "will default to " + distribute_source +"."))
+ "will default to " + distribute_source + "."))
parser.add_option("--download-base", action="callback", dest="download_base",
callback=normalize_to_url, nargs=1, type="string",
help=("Specify a URL or directory for downloading "
@@ -156,7 +157,7 @@ def normalize_to_url(option, opt_str, value, parser):
try:
import pkg_resources
- import setuptools # A flag. Sometimes pkg_resources is installed alone.
+ import setuptools # A flag. Sometimes pkg_resources is installed alone.
if not hasattr(pkg_resources, '_distribute'):
raise ImportError
except ImportError:
@@ -211,6 +212,7 @@ def normalize_to_url(option, opt_str, value, parser):
# Figure out the most recent final version of zc.buildout.
import setuptools.package_index
_final_parts = '*final-', '*final'
+
def _final_version(parsed_version):
for part in parsed_version:
if (part[:1] == '*') and (part not in _final_parts):
@@ -242,7 +244,7 @@ def _final_version(parsed_version):
if is_jython:
import subprocess
exitcode = subprocess.Popen(cmd, env=env).wait()
-else: # Windows prefers this, apparently; otherwise we would prefer subprocess
+else: # Windows prefers this, apparently; otherwise we would prefer subprocess
exitcode = os.spawnle(*([os.P_WAIT, sys.executable] + cmd + [env]))
if exitcode != 0:
sys.stdout.flush()
@@ -256,5 +258,5 @@ def _final_version(parsed_version):
ws.require(requirement)
import zc.buildout.buildout
zc.buildout.buildout.main(args)
-if not options.eggs: # clean up temporary egg directory
+if not options.eggs: # clean up temporary egg directory
shutil.rmtree(eggs_dir)
View
3  buildout.cfg
@@ -1,3 +0,0 @@
-[buildout]
-#extends = test-3.3.x.cfg
-extends = test-4.1.x.cfg
View
7 buildout.cfg.in
@@ -0,0 +1,7 @@
+# Copy to buildout.cfg and uncomment one config
+[buildout]
+develop = .
+extends =
+# conf/test-3.3.x.cfg
+# conf/test-4.1.x.cfg
+# conf/aclark-buildout.cfg
View
7 conf/aclark-buildout.cfg
@@ -0,0 +1,7 @@
+[buildout]
+extends = http://build.pythonpackages.com/buildout/plone/4.2.x-dev
+
+[plone]
+eggs +=
+ mr.migrator
+ transmogrify.filesystem
View
6 conf/aclark-pipeline/pipeline.cfg
@@ -0,0 +1,6 @@
+[transmogrifier]
+pipeline =
+ source
+
+[source]
+blueprint = transmogrify.filesystem
View
6 conf/test-3.3.x.cfg
@@ -0,0 +1,6 @@
+[buildout]
+extends = http://build.pythonpackages.com/buildout/plone/3.3.x-dev
+
+[plone]
+#eggs += mr.migrator
+eggs += funnelweb
View
2  test-4.1.x.cfg → conf/test-4.1.x.cfg
@@ -4,8 +4,6 @@ allow-hosts =
pypi.python.org
auto-checkout = collective.jsonmigrator
extends = http://dist.plone.org/release/4.1-latest/versions.cfg
-
-develop = .
dump-picked-versions-file = picked.cfg
exec-sitecustomize = false
extensions =
View
16 mr/migrator/runner/__init__.py
@@ -35,7 +35,17 @@ def error(self):
def runner(args={}, pipeline=None):
# Make sure GS ZCML is loaded before we load ours
- load_config('autoinclude.zcml', mr.migrator)
+
+ # XXX This delays loading a bit too long. Getting:
+ # ConfigurationError: ('Unknown directive',
+ # u'http://namespaces.zope.org/genericsetup', u'importStep')
+ # again
+ #
+ # load_config('autoinclude.zcml', mr.migrator)
+
+ load_config("meta.zcml", Products.GenericSetup)
+ load_config("configure.zcml", Products.GenericSetup)
+ load_config('configure.zcml', mr.migrator)
parser = OptionParser()
@@ -58,7 +68,9 @@ def runner(args={}, pipeline=None):
elif pipeline is not None:
config = pipeline
else:
- config = resource_filename(__name__, 'pipeline.cfg')
+ # XXX How about if we look for pipeline.cfg in the cwd?
+ # config = resource_filename(__name__, 'pipeline.cfg')
+ config = 'pipeline.cfg'
pipelineid = load_pipeline(config, parser)
View
2  setup.py
@@ -26,7 +26,7 @@
def read(*rnames):
return open(os.path.join(os.path.dirname(__file__), *rnames)).read()
-version = '1.0b5'
+version = '1.0b10'
long_description = (
read('README.rst')
View
7 test-3.3.x.cfg
@@ -1,7 +0,0 @@
-[buildout]
-develop = .
-extends = http://dist.aclark.net/build/plone/3.3.x/develop.cfg
-
-[plone]
-#eggs += mr.migrator
-eggs += funnelweb
Please sign in to comment.
Something went wrong with that request. Please try again.