diff --git a/CHANGES.txt b/CHANGES.txt index b41809dffed11f4414fdec898a6799c28b9afb77..f15f06d6315f3c654fcf82dd31de7eb88cf065b0 100644 --- a/CHANGES.txt +++ b/CHANGES.txt @@ -11,6 +11,16 @@ priorities include: Change History ************** +1.0.0b23 (2007-05-??) +===================== + +Feature Changes +--------------- + +- Improved error reporting by showing which packages require other + packages that can't be found or that cause version conflicts. + + 1.0.0b23 (2007-03-19) ===================== @@ -23,22 +33,15 @@ Feature Changes distributions for applications allowing install without network access. +- Log scripts created, as suggested in: + https://bugs.launchpad.net/zc.buildout/+bug/71353 + Bugs Fixed ---------- - It wasn't possible to give options on the command line for sections not defined in a configuration file. -1.0.0b23 (2007-05-??) -===================== - -Feature Changes ---------------- - -- Improved error reporting by showing which packages require other - packages that can't be found or that cause version conflicts. - - 1.0.0b22 (2007-03-15) ===================== diff --git a/src/zc/buildout/buildout.txt b/src/zc/buildout/buildout.txt index d0ad54629afe2573cc0886d435036cfb5144d1fa..96097f4f6c930c931cb1d163f06dec2dd5900d40 100644 --- a/src/zc/buildout/buildout.txt +++ b/src/zc/buildout/buildout.txt @@ -1693,16 +1693,17 @@ If zc.buildout is installed, you can use it to create a new buildout with it's own local copies of zc.buildout and setuptools and with local buildout scripts. - >>> sample_bootstrapped = tmpdir('sample-bootstrapped') - - >>> print system(buildout - ... +' -c'+os.path.join(sample_bootstrapped, 'setup.cfg') - ... +' bootstrap'), - Warning: creating /sample-bootstrapped/setup.cfg - buildout: Creating directory /sample-bootstrapped/bin - buildout: Creating directory /sample-bootstrapped/parts - buildout: Creating directory /sample-bootstrapped/eggs - buildout: Creating directory /sample-bootstrapped/develop-eggs + >>> sample_bootstrapped = tmpdir('sample-bootstrapped') + + >>> print system(buildout + ... +' -c'+os.path.join(sample_bootstrapped, 'setup.cfg') + ... +' bootstrap'), + Warning: creating /sample-bootstrapped/setup.cfg + buildout: Creating directory /sample-bootstrapped/bin + buildout: Creating directory /sample-bootstrapped/parts + buildout: Creating directory /sample-bootstrapped/eggs + buildout: Creating directory /sample-bootstrapped/develop-eggs + zc.buildout.easy_install: Generated script /sample-bootstrapped/bin/buildout. Note that a basic setup.cfg was created for us. diff --git a/src/zc/buildout/downloadcache.txt b/src/zc/buildout/downloadcache.txt index f6148e5d30502572cf639d611e42a52356795f1f..6d279cfbe01864c6769b6ff223ae939642dc8f97 100644 --- a/src/zc/buildout/downloadcache.txt +++ b/src/zc/buildout/downloadcache.txt @@ -64,6 +64,7 @@ server as usual: zc.buildout.easy_install: Got demo 0.2 zc.buildout.easy_install: Getting new distribution for demoneeded zc.buildout.easy_install: Got demoneeded 1.1 + zc.buildout.easy_install: Generated script /sample-buildout/bin/demo. We'll also get the download cache populated. The buildout doesn't put files in the cache directly. It creates an intermediate directory, @@ -91,6 +92,7 @@ If we remove the installed eggs from eggs directory and re-run the buildout: zc.buildout.easy_install: Got demo 0.2 zc.buildout.easy_install: Getting new distribution for demoneeded zc.buildout.easy_install: Got demoneeded 1.1 + zc.buildout.easy_install: Generated script /sample-buildout/bin/demo. We see that the distributions aren't downloaded, because they're downloaded from the cache. @@ -134,3 +136,4 @@ install-from-cache option set to true: zc.buildout.easy_install: Got demo 0.2 zc.buildout.easy_install: Getting new distribution for demoneeded zc.buildout.easy_install: Got demoneeded 1.1 + zc.buildout.easy_install: Generated script /sample-buildout/bin/demo. diff --git a/src/zc/buildout/easy_install.py b/src/zc/buildout/easy_install.py index 1555b1d28d1104e5a0bff4b2581e046a229458b3..0fb068c543b815b5a1d9980266f9ad0eb1484bbc 100644 --- a/src/zc/buildout/easy_install.py +++ b/src/zc/buildout/easy_install.py @@ -829,6 +829,7 @@ def scripts(reqs, working_set, executable, dest, def _script(module_name, attrs, path, dest, executable, arguments, initialization): generated = [] + script = dest if sys.platform == 'win32': # generate exe file and give the script a magic name: open(dest+'.exe', 'wb').write( @@ -850,6 +851,7 @@ def _script(module_name, attrs, path, dest, executable, arguments, except (AttributeError, os.error): pass generated.append(dest) + logger.info("Generated script %s.", script) return generated script_template = '''\ @@ -869,6 +871,7 @@ if __name__ == '__main__': def _pyscript(path, dest, executable): generated = [] + script = dest if sys.platform == 'win32': # generate exe file and give the script a magic name: open(dest+'.exe', 'wb').write( @@ -886,6 +889,7 @@ def _pyscript(path, dest, executable): except (AttributeError, os.error): pass generated.append(dest) + logger.info("Generated interpreter %s.", script) return generated py_script_template = '''\ diff --git a/src/zc/buildout/tests.py b/src/zc/buildout/tests.py index 4b5a1d0bfad3143acab81a358c7491c243dc47a1..b90f1bd62234731a0bee9b7808616a6b90de5c4c 100644 --- a/src/zc/buildout/tests.py +++ b/src/zc/buildout/tests.py @@ -793,6 +793,7 @@ bootstrapping. buildout: Creating directory /sample-bootstrap/parts buildout: Creating directory /sample-bootstrap/eggs buildout: Creating directory /sample-bootstrap/develop-eggs + zc.buildout.easy_install: Generated script /sample-bootstrap/bin/buildout. """ def removing_eggs_from_develop_section_causes_egg_link_to_be_removed(): @@ -1856,6 +1857,7 @@ def bug_105081_Specific_egg_versions_are_ignored_when_newer_eggs_are_around(): zc.buildout.easy_install: Got demo 0.3 zc.buildout.easy_install: Getting new distribution for demoneeded zc.buildout.easy_install: Got demoneeded 1.1 + zc.buildout.easy_install: Generated script /sample-buildout/bin/demo. >>> print system(join('bin', 'demo')), 3 1 @@ -1876,6 +1878,7 @@ def bug_105081_Specific_egg_versions_are_ignored_when_newer_eggs_are_around(): buildout: Installing x zc.buildout.easy_install: Getting new distribution for demo==0.1 zc.buildout.easy_install: Got demo 0.1 + zc.buildout.easy_install: Generated script /sample-buildout/bin/demo. >>> print system(join('bin', 'demo')), 1 1 diff --git a/src/zc/buildout/update.txt b/src/zc/buildout/update.txt index 0baa6277c0f79d26e6fe54b6dcf903b3e5c5026a..f1cc01bdc0ff58b73f8cf11334a4ece1179272bc 100644 --- a/src/zc/buildout/update.txt +++ b/src/zc/buildout/update.txt @@ -72,6 +72,7 @@ new versions found in new releases: zc.buildout version 99.99, setuptools version 99.99; restarting. + zc.buildout.easy_install: Generated script /sample-buildout/bin/buildout. buildout: Develop: /sample-buildout/showversions buildout: Installing show-versions zc.buildout 99.99 @@ -120,6 +121,7 @@ We'll actually "upgrade" to an earlier version. zc.buildout version 1.0.0, setuptools version 0.6; restarting. + zc.buildout.easy_install: Generated script /sample-buildout/bin/buildout. buildout: Develop: /sample-buildout/showversions buildout: Updating show-versions zc.buildout 1.0.0 diff --git a/zc.recipe.egg_/src/zc/recipe/egg/README.txt b/zc.recipe.egg_/src/zc/recipe/egg/README.txt index 02c3ba300a7b81565a367a9eca2b0f78437af214..e547e6ad81ef0c1d15c8e746f205faf822b1af28 100644 --- a/zc.recipe.egg_/src/zc/recipe/egg/README.txt +++ b/zc.recipe.egg_/src/zc/recipe/egg/README.txt @@ -111,6 +111,7 @@ scripts recipe: >>> print system(buildout), buildout: Uninstalling demo buildout: Installing demo + zc.buildout.easy_install: Generated script /sample-buildout/bin/demo. Now we also see the script defined by the dmo script: @@ -169,9 +170,11 @@ Note that we ommitted the entry point name from the recipe specification. We were able to do this because the scripts recipe if the default entry point for the zc.recipe.egg egg. - >>> print system(buildout), - buildout: Uninstalling demo - buildout: Installing demo + >>> print system(buildout), + buildout: Uninstalling demo + buildout: Installing demo + zc.buildout.easy_install: Generated script /sample-buildout/bin/demo. + zc.buildout.easy_install: Generated interpreter /sample-buildout/bin/py-demo. Now we also get a py-demo script for giving us a Python prompt with the path for demo and any eggs it depends on included in sys.path. @@ -228,6 +231,7 @@ and run the buildout in non-newest mode: >>> print system(buildout+' -N'), buildout: Uninstalling demo buildout: Installing demo + zc.buildout.easy_install: Generated script /sample-buildout/bin/demo. Note that we removed the eggs option, and the eggs defaulted to the part name. Because we removed the eggs option, the demo was @@ -237,6 +241,7 @@ We'll also run the buildout in off-line mode: >>> print system(buildout+' -o'), buildout: Updating demo + zc.buildout.easy_install: Generated script /sample-buildout/bin/demo. We didn't get an update for demo: @@ -253,6 +258,7 @@ we'll get an update for demo: buildout: Updating demo zc.buildout.easy_install: Getting new distribution for demo zc.buildout.easy_install: Got demo 0.3 + zc.buildout.easy_install: Generated script /sample-buildout/bin/demo. Then we'll get a new demo egg: @@ -312,6 +318,7 @@ You can also control the name used for scripts: >>> print system(buildout), buildout: Uninstalling demo buildout: Installing demo + zc.buildout.easy_install: Generated script /sample-buildout/bin/foo. >>> ls(sample_buildout, 'bin') - buildout @@ -341,6 +348,7 @@ extra-paths option: >>> print system(buildout), buildout: Uninstalling demo buildout: Installing demo + zc.buildout.easy_install: Generated script /sample-buildout/bin/foo. Let's look at the script that was generated: @@ -389,6 +397,7 @@ to be included in generated scripts: >>> print system(buildout), buildout: Uninstalling demo buildout: Installing demo + zc.buildout.easy_install: Generated script /sample-buildout/bin/foo. >>> cat(sample_buildout, 'bin', 'foo') # doctest: +NORMALIZE_WHITESPACE #!/usr/local/bin/python2.4 @@ -438,6 +447,9 @@ declare entry points using the entry-points option: >>> print system(buildout), buildout: Uninstalling demo buildout: Installing demo + zc.buildout.easy_install: Generated script /sample-buildout/bin/demo. + zc.buildout.easy_install: Generated script /sample-buildout/bin/alt. + zc.buildout.easy_install: Generated script /sample-buildout/bin/other. >>> ls(sample_buildout, 'bin') - alt @@ -482,3 +494,4 @@ be made to contact an index server: >>> print system(buildout), buildout: Uninstalling demo buildout: Installing demo + zc.buildout.easy_install: Generated script /sample-buildout/bin/foo. diff --git a/zc.recipe.egg_/src/zc/recipe/egg/custom.txt b/zc.recipe.egg_/src/zc/recipe/egg/custom.txt index 10c18989a4bb3e5b98f9df69ed1ce11644849c58..cdebb2bba0a528f7585aa344e2f0ad45fe240185 100644 --- a/zc.recipe.egg_/src/zc/recipe/egg/custom.txt +++ b/zc.recipe.egg_/src/zc/recipe/egg/custom.txt @@ -192,6 +192,7 @@ Let's define a script that uses out ext demo: buildout: Develop: /sample-buildout/demo buildout: Updating extdemo buildout: Installing demo + zc.buildout.easy_install: Generated script /sample-buildout/bin/demo. When we run the script, we'll 42 printed: @@ -214,11 +215,13 @@ If we run the buildout in non-newest or offline modes: buildout: Develop: /sample-buildout/demo buildout: Updating extdemo buildout: Updating demo + zc.buildout.easy_install: Generated script /sample-buildout/bin/demo. >>> print system(buildout+' -o'), buildout: Develop: /sample-buildout/demo buildout: Updating extdemo buildout: Updating demo + zc.buildout.easy_install: Generated script /sample-buildout/bin/demo. We won't get an update. @@ -235,6 +238,7 @@ will: buildout: Updating extdemo zip_safe flag not set; analyzing archive contents... buildout: Updating demo + zc.buildout.easy_install: Generated script /sample-buildout/bin/demo. >>> ls(sample_buildout, 'develop-eggs') - demo.egg-link @@ -274,6 +278,7 @@ We can specify a specific version using the egg option: buildout: Installing extdemo zip_safe flag not set; analyzing archive contents... buildout: Installing demo + zc.buildout.easy_install: Generated script /sample-buildout/bin/demo. >>> ls(sample_buildout, 'develop-eggs') - demo.egg-link @@ -383,6 +388,7 @@ set with a value of 2. buildout: Uninstalling extdemo buildout: Installing extdemo buildout: Installing demo + zc.buildout.easy_install: Generated script /sample-buildout/bin/demo. Our develop-eggs now includes an egg link for extdemo: diff --git a/zc.recipe.egg_/src/zc/recipe/egg/selecting-python.txt b/zc.recipe.egg_/src/zc/recipe/egg/selecting-python.txt index 546930ccc847916ebab9062aea4d3ffe896cce86..1a0b7b827241829290b12c31b02df148e52628ab 100644 --- a/zc.recipe.egg_/src/zc/recipe/egg/selecting-python.txt +++ b/zc.recipe.egg_/src/zc/recipe/egg/selecting-python.txt @@ -44,17 +44,19 @@ install the demo package using Python 2.3. Now, if we run the buildout: - >>> import os - >>> os.chdir(sample_buildout) - >>> buildout = os.path.join(sample_buildout, 'bin', 'buildout') - >>> print system(buildout), - buildout: Installing demo - zc.buildout.easy_install: Getting new distribution for demo<0.3 - zc.buildout.easy_install: Got demo 0.2 - zc.buildout.easy_install: Getting new distribution for demoneeded - zc.buildout.easy_install: Getting new distribution for setuptools - zc.buildout.easy_install: Got setuptools 0.6 - zc.buildout.easy_install: Got demoneeded 1.1 + >>> import os + >>> os.chdir(sample_buildout) + >>> buildout = os.path.join(sample_buildout, 'bin', 'buildout') + >>> print system(buildout), + buildout: Installing demo + zc.buildout.easy_install: Getting new distribution for demo<0.3 + zc.buildout.easy_install: Got demo 0.2 + zc.buildout.easy_install: Getting new distribution for demoneeded + zc.buildout.easy_install: Getting new distribution for setuptools + zc.buildout.easy_install: Got setuptools 0.6 + zc.buildout.easy_install: Got demoneeded 1.1 + zc.buildout.easy_install: Generated script /sample-buildout/bin/demo. + zc.buildout.easy_install: Generated interpreter /sample-buildout/bin/py-demo. we'll get the Python 2.3 eggs for demo and demoneeded: