From 58217442d62882e5afef276ae9f7ad1a8bcba4de Mon Sep 17 00:00:00 2001 From: PJ Eby Date: Sun, 3 Apr 2005 18:52:21 +0000 Subject: Added "AvailableDistributions" class that finds and indexes usable distributions; this replaces the previous "iter_distributions()" API. Added basic platform support to Distribution and AvailableDistributions so that platform-independent distros as well as local platform-compatible distros are acceptable. The actual platform scheme is currently delegated to distutils.util.get_platform(), but needs to be replaced with a better scheme of some kind, especially for OS X. --HG-- branch : setuptools extra : convert_revision : svn%3A6015fed2-1504-0410-9fe1-9d1591cc4771/sandbox/trunk/setuptools%4041004 --- setuptools/command/bdist_egg.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'setuptools/command/bdist_egg.py') diff --git a/setuptools/command/bdist_egg.py b/setuptools/command/bdist_egg.py index 7a30c1cf..e8309a71 100644 --- a/setuptools/command/bdist_egg.py +++ b/setuptools/command/bdist_egg.py @@ -10,7 +10,7 @@ from distutils.dir_util import create_tree, remove_tree, ensure_relative,mkpath from distutils.sysconfig import get_python_version from distutils.errors import * from distutils import log -from pkg_resources import parse_requirements +from pkg_resources import parse_requirements, get_platform class bdist_egg(Command): @@ -75,9 +75,9 @@ class bdist_egg(Command): if self.bdist_dir is None: bdist_base = self.get_finalized_command('bdist').bdist_base self.bdist_dir = os.path.join(bdist_base, 'egg') - self.set_undefined_options('bdist', - ('dist_dir', 'dist_dir'), - ('plat_name', 'plat_name')) + if self.plat_name is None: + self.plat_name = get_platform() + self.set_undefined_options('bdist',('dist_dir', 'dist_dir')) def write_stub(self, resource, pyfile): -- cgit v1.2.3