
FYI, I've just completed another round of changes to setuptools in CVS, including performance enhancements and new extensibility features (with documentation). (And the 'sdist' command now incorporates the workaround patch for 'delete="true"' in .svn/entries files.) setup() can now take a 'setup_requires' argument that specifies requirements that must be present before setup() runs; this allows you to depend on projects like buildutils, py2exe, py2app, etc. for setup arguments, commands, etc.. distutils extensions can now also define entry points to define new setup() arguments and new EGG-INFO metadata files, as well as setup commands. With this release, it should be possible to take a distutils extension like "buildutils" and implement all of its distutils hooks just by defining "entry points" in its setup script, to declare setup commands, setup() args, and metadata types. Entry points can declare extras that they depend on, too, so this means that commands can depend on external packages, and setuptools will attempt to download and install those packages in the setup directory if the package isn't already available on sys.path. This is probably the last round of non-bugfix changes before releasing 0.6a1, apart from further documentation enhancements. Before 0.6a1 is released, I'd like to add more tips on non-root installations with EasyInstall, and create an updated API reference for pkg_resources. Anyway, I haven't done a lot of regression testing yet, mostly just new features testing, so these changes may still be a bit rough around the edges. I'd appreciate any feedback. Thanks.

Hi Philip, using your last cvs I get this error: hawk@dimassa:~/stanzino/Projects/PythonModulePackaging/setuptools/setuptools-deb/cvs/python-setuptools-0.6a1$ python ez_setup.py -d ../tmp . Traceback (most recent call last): File "ez_setup.py", line 163, in ? main(sys.argv[1:]) File "ez_setup.py", line 147, in main pkg_resources.require(req) File "/home/hawk/stanzino/Projects/PythonModulePackaging/setuptools/setuptools-deb/cvs/python-setuptools-0.6a1/pkg_resources.py", line 503, in require needed = self.resolve(parse_requirements(requirements)) File "/home/hawk/stanzino/Projects/PythonModulePackaging/setuptools/setuptools-deb/cvs/python-setuptools-0.6a1/pkg_resources.py", line 480, in resolve dist = best[req.key] = env.best_match(req, self, installer) File "/home/hawk/stanzino/Projects/PythonModulePackaging/setuptools/setuptools-deb/cvs/python-setuptools-0.6a1/pkg_resources.py", line 638, in best_match dist = working_set.find(req) File "/home/hawk/stanzino/Projects/PythonModulePackaging/setuptools/setuptools-deb/cvs/python-setuptools-0.6a1/pkg_resources.py", line 381, in find if dist is not None and dist not in req: File "/home/hawk/stanzino/Projects/PythonModulePackaging/setuptools/setuptools-deb/cvs/python-setuptools-0.6a1/pkg_resources.py", line 2040, in __contains__ item = item.parsed_version File "/home/hawk/stanzino/Projects/PythonModulePackaging/setuptools/setuptools-deb/cvs/python-setuptools-0.6a1/pkg_resources.py", line 1874, in __getattr__ return getattr(self._provider, attr) AttributeError: PathMetadata instance has no attribute 'parsed_version' Thank you for your help! Vincenzo Alle 02:17, domenica 07 agosto 2005, Phillip J. Eby ha scritto:
FYI, I've just completed another round of changes to setuptools in CVS, including performance enhancements and new extensibility features (with documentation). (And the 'sdist' command now incorporates the workaround patch for 'delete="true"' in .svn/entries files.)
setup() can now take a 'setup_requires' argument that specifies requirements that must be present before setup() runs; this allows you to depend on projects like buildutils, py2exe, py2app, etc. for setup arguments, commands, etc..
distutils extensions can now also define entry points to define new setup() arguments and new EGG-INFO metadata files, as well as setup commands. With this release, it should be possible to take a distutils extension like "buildutils" and implement all of its distutils hooks just by defining "entry points" in its setup script, to declare setup commands, setup() args, and metadata types. Entry points can declare extras that they depend on, too, so this means that commands can depend on external packages, and setuptools will attempt to download and install those packages in the setup directory if the package isn't already available on sys.path.
This is probably the last round of non-bugfix changes before releasing 0.6a1, apart from further documentation enhancements. Before 0.6a1 is released, I'd like to add more tips on non-root installations with EasyInstall, and create an updated API reference for pkg_resources.
Anyway, I haven't done a lot of regression testing yet, mostly just new features testing, so these changes may still be a bit rough around the edges. I'd appreciate any feedback. Thanks.
_______________________________________________ Distutils-SIG maillist - Distutils-SIG@python.org http://mail.python.org/mailman/listinfo/distutils-sig
___________________________________ Yahoo! Messenger: chiamate gratuite in tutto il mondo http://it.beta.messenger.yahoo.com

At 11:53 AM 8/9/2005 +0200, Vincenzo Di Massa wrote:
Hi Philip, using your last cvs I get this error:
hawk@dimassa:~/stanzino/Projects/PythonModulePackaging/setuptools/setuptools-deb/cvs/python-setuptools-0.6a1$ python ez_setup.py -d ../tmp .
Unfortunately I was not able to duplicate this error, although I got a different error which may be related. I just checked in a fix to pkg_resources for the other error; please let me know if it fixes your problem. By the way, if you didn't do so before, you should remove your setuptools.egg-info directory and "cvs update -d" to ensure that you get the correct contents of that directory.

I just checked out the new version but... hawk@hawk:~/tmp/setuptools/python-setuptools-0.6a1$ python ez_setup.py -d ../tmp graph Traceback (most recent call last): File "ez_setup.py", line 163, in ? main(sys.argv[1:]) File "ez_setup.py", line 147, in main pkg_resources.require(req) File "/mnt/disk2/5/hawk/tmp/setuptools/python-setuptools-0.6a1/pkg_resources.py", line 503, in require needed = self.resolve(parse_requirements(requirements)) File "/mnt/disk2/5/hawk/tmp/setuptools/python-setuptools-0.6a1/pkg_resources.py", line 480, in resolve dist = best[req.key] = env.best_match(req, self, installer) File "/mnt/disk2/5/hawk/tmp/setuptools/python-setuptools-0.6a1/pkg_resources.py", line 638, in best_match dist = working_set.find(req) File "/mnt/disk2/5/hawk/tmp/setuptools/python-setuptools-0.6a1/pkg_resources.py", line 381, in find if dist is not None and dist not in req: File "/mnt/disk2/5/hawk/tmp/setuptools/python-setuptools-0.6a1/pkg_resources.py", line 2040, in __contains__ item = item.parsed_version File "/mnt/disk2/5/hawk/tmp/setuptools/python-setuptools-0.6a1/pkg_resources.py", line 1874, in __getattr__ return getattr(self._provider, attr) AttributeError: PathMetadata instance has no attribute 'parsed_version' This is another machine: so the error is not caused by a python misconfiguration caused by me. I can give you an ssh account on the machine in question if you need. Thank you, Vincenzo. Alle 17:52, martedì 09 agosto 2005, Phillip J. Eby ha scritto:
At 11:53 AM 8/9/2005 +0200, Vincenzo Di Massa wrote:
Hi Philip, using your last cvs I get this error:
hawk@dimassa:~/stanzino/Projects/PythonModulePackaging/setuptools/setuptools-deb/cvs/python-setuptools-0.6a1$ python ez_setup.py -d ../tmp .
Unfortunately I was not able to duplicate this error, although I got a different error which may be related. I just checked in a fix to pkg_resources for the other error; please let me know if it fixes your problem. By the way, if you didn't do so before, you should remove your setuptools.egg-info directory and "cvs update -d" to ensure that you get the correct contents of that directory.
___________________________________ Yahoo! Mail: gratis 1GB per i messaggi e allegati da 10MB http://mail.yahoo.it

At 09:41 PM 8/9/2005 +0200, Vincenzo Di Massa wrote:
I just checked out the new version but...
hawk@hawk:~/tmp/setuptools/python-setuptools-0.6a1$ python ez_setup.py -d ../tmp graph
Okay, I figured out why I can't reproduce this; when working from the CVS version you need to use "setup.py develop" or "setup.py install" or even "setup.py egg_info" or "setup.py test" in order to *build& setuptools before attempting to use it. Otherwise you don't have a PKG-INFO file, and thus don't have a valid egg yet. I'll have to update the documentation to reflect that necessary step.
Traceback (most recent call last): File "ez_setup.py", line 163, in ? main(sys.argv[1:]) File "ez_setup.py", line 147, in main pkg_resources.require(req) File "/mnt/disk2/5/hawk/tmp/setuptools/python-setuptools-0.6a1/pkg_resources.py", line 503, in require needed = self.resolve(parse_requirements(requirements)) File "/mnt/disk2/5/hawk/tmp/setuptools/python-setuptools-0.6a1/pkg_resources.py", line 480, in resolve dist = best[req.key] = env.best_match(req, self, installer) File "/mnt/disk2/5/hawk/tmp/setuptools/python-setuptools-0.6a1/pkg_resources.py", line 638, in best_match dist = working_set.find(req) File "/mnt/disk2/5/hawk/tmp/setuptools/python-setuptools-0.6a1/pkg_resources.py", line 381, in find if dist is not None and dist not in req: File "/mnt/disk2/5/hawk/tmp/setuptools/python-setuptools-0.6a1/pkg_resources.py", line 2040, in __contains__ item = item.parsed_version File "/mnt/disk2/5/hawk/tmp/setuptools/python-setuptools-0.6a1/pkg_resources.py", line 1874, in __getattr__ return getattr(self._provider, attr) AttributeError: PathMetadata instance has no attribute 'parsed_version'

Phillip J. Eby wrote:
At 09:41 PM 8/9/2005 +0200, Vincenzo Di Massa wrote:
I just checked out the new version but...
hawk@hawk:~/tmp/setuptools/python-setuptools-0.6a1$ python ez_setup.py -d ../tmp graph
Okay, I figured out why I can't reproduce this; when working from the CVS version you need to use "setup.py develop" or "setup.py install" or even "setup.py egg_info" or "setup.py test" in order to *build& setuptools before attempting to use it. Otherwise you don't have a PKG-INFO file, and thus don't have a valid egg yet.
I'll have to update the documentation to reflect that necessary step.
Wouldn't it be better to detect that PKG-INFO is missing, and give an error that suggests the package has not been properly build with egg_info? I think as a general rule confusing error messages should be fixed with better error messages, not documentation. -- Ian Bicking / ianb@colorstudy.com / http://blog.ianbicking.org

At 01:03 PM 8/10/2005 -0500, Ian Bicking wrote:
Phillip J. Eby wrote:
At 09:41 PM 8/9/2005 +0200, Vincenzo Di Massa wrote:
I just checked out the new version but...
hawk@hawk:~/tmp/setuptools/python-setuptools-0.6a1$ python ez_setup.py -d ../tmp graph
Okay, I figured out why I can't reproduce this; when working from the CVS version you need to use "setup.py develop" or "setup.py install" or even "setup.py egg_info" or "setup.py test" in order to *build& setuptools before attempting to use it. Otherwise you don't have a PKG-INFO file, and thus don't have a valid egg yet. I'll have to update the documentation to reflect that necessary step.
Wouldn't it be better to detect that PKG-INFO is missing, and give an error that suggests the package has not been properly build with egg_info?
It's actually there, but it's using AttributeError currently; I'll change it to a ValueError so it doesn't get masked.
participants (3)
-
Ian Bicking
-
Phillip J. Eby
-
Vincenzo Di Massa