Dear Phillip, Hello. I am a phd student from Unviersity College Dublin,Ireland. I have a problem when I tried to install python with setuptools egg files in cygwin. I did as the webpage(http://cheeseshop.python.org/pypi/setuptools) says. However the system said: -------------------------------------------------------------------- $sh setuptools-0.6c5-py2.4.egg [[: not found setuptools-0.6c5-py2.4egg is not the correct name for this egg file. Please rename it back to setuptools-0.6c5-py2.4 egg and try again. --------------------------------------------------------------------- I also tried the other version which is setuptools-0.6c5-py2.4.egg and it didn't work either. Is this because I am using 'cygwin' not 'linux'? Thank you and any feedback will be much appreciated. Regards. Hui
On Wed, 2007-03-28 at 13:46 +0100, Hui Zhang wrote:
Dear Phillip,
Hello. I am a phd student from Unviersity College Dublin,Ireland. I have a problem when I tried to install python with setuptools egg files in cygwin. I did as the webpage(http://cheeseshop.python.org/pypi/setuptools) says. However the system said: -------------------------------------------------------------------- $sh setuptools-0.6c5-py2.4.egg [[: not found setuptools-0.6c5-py2.4egg is not the correct name for this egg file. Please rename it back to setuptools-0.6c5-py2.4 egg and try again.
---------------------------------------------------------------------
This version of the egg actually requires bash and is not quite compatible with sh. This is fixed in SVN, but for now run it with bash instead. -- Matt Good
Hey Matt, Thanks so much for your reply. It works now! I am stuck on another probelm now. I tried to install python-devel in cygwin, but it seems that python-devel can not find where the python is and claims that a python is needed. -------------------------------------------------------- $ rpm -Uvh python-devel-2.3.4-1.m68kmint.rpm error: Failed dependencies: python = 2.3.4 is needed by python-devel-2.3.4-1 --------------------------------------------------------- But acutally python 2.3.4 has been automatically installed at the same time when cygwin is installed. Have you met this problem before? I am looking forward to hearing from you. Many thanks again!! Regards. Hui ----- Original Message ----- From: Matt Good <matt@matt-good.net> Date: Wednesday, March 28, 2007 3:22 pm Subject: Re: [Distutils] help please To: Hui Zhang <Hui.Zhang@ucd.ie> Cc: distutils-sig@python.org
On Wed, 2007-03-28 at 13:46 +0100, Hui Zhang wrote:
Dear Phillip,
Hello. I am a phd student from Unviersity College Dublin,Ireland. I have a problem when I tried to install python with setuptools egg files in cygwin. I did as the webpage(http://cheeseshop.python.org/pypi/setuptools) says. However the system said: -----------------------------------------------------------------
$sh setuptools-0.6c5-py2.4.egg [[: not found setuptools-0.6c5-py2.4egg is not the correct name for this egg file.> Please rename it back to setuptools-0.6c5-py2.4 egg and try again.
-----------------------------------------------------------------
This version of the egg actually requires bash and is not quite compatible with sh. This is fixed in SVN, but for now run it with bashinstead.
-- Matt Good
At 04:13 PM 3/28/2007 +0100, Hui Zhang wrote:
Hey Matt,
Thanks so much for your reply. It works now! I am stuck on another probelm now. I tried to install python-devel in cygwin, but it seems that python-devel can not find where the python is and claims that a python is needed. -------------------------------------------------------- $ rpm -Uvh python-devel-2.3.4-1.m68kmint.rpm error: Failed dependencies: python = 2.3.4 is needed by python-devel-2.3.4-1 --------------------------------------------------------- But acutally python 2.3.4 has been automatically installed at the same time when cygwin is installed.
You don't need to use RPM - run the Cygwin setup program again and make sure you have Python set to include the source package, not just the binary. That will ensure you have all the header files. I don't believe Cygwin *has* a python-devel package. In general, unless you really know what you're doing, you should always install or upgrade Cygwin packages using the setup program, or by installing them from source code. Don't mix RPMs into the picture.
Hi folks, 'am using setup tools to build and package a TG 1.0.1 app. After deployment, I'm seeing a few entries in SOURCES.txt despite specifying related wildcards in the exclusion list. Following are some related snippets: setup.py:---------------- ... # #from turbogears.finddata import find_package_data # # Disabled above import line, and added find_package_data # below to avoid installing TG on the build box... # import sys from fnmatch import fnmatchcase from distutils.util import convert_path # Provided as an attribute, so you can append to these instead # of replicating them: standard_exclude = ('*.py', '*.pyc', '*~', '.*', '*.bak', 'checkout.status', 'original.status') standard_exclude_directories = ('.*', 'CVS', 'CC', '_darcs', './ build', './dist', 'EGG-INFO', '*.egg-info', '.CC', 'cache', '*.egg-info/.CC', '*.egg-info/.CC', '*.egg-info/.CC/*') def find_package_data( where='.', package='', exclude=standard_exclude, exclude_directories=standard_exclude_directories, only_in_packages=True, show_ignored=False): ... setup( name="myapp", version=version, ... -------------------------------------- However, after successful build/deply, I'm seeing the following entries in the deployed SOURCES.txt file (myapp/myapp.egg-info/SOURCES.txt): ... myapp.egg-info/.CC/checkout.status myapp.egg-info/.CC/original.status myapp.egg-info/.CC/cache/SOURCES.txt@@/main/1 ... --------------------------------------- It appears the exlusion list applies to all app folders excpet myapp.egg-info/. Any idea how I can specify that even in the case of myapp.egg-info/.CC/ it should include any diles or dirs... Thanks much, /venkat Full find_package_data: ----------------------- def find_package_data( where='.', package='', exclude=standard_exclude, exclude_directories=standard_exclude_directories, only_in_packages=True, show_ignored=True): """ Return a dictionary suitable for use in ``package_data`` in a distutils ``setup.py`` file. The dictionary looks like:: {'package': [files]} Where ``files`` is a list of all the files in that package that don't match anything in ``exclude``. If ``only_in_packages`` is true, then top-level directories that are not packages won't be included (but directories under packages will). Directories matching any pattern in ``exclude_directories`` will be ignored; by default directories with leading ``.``, ``CVS``, and ``_darcs`` will be ignored. If ``show_ignored`` is true, then all the files that aren't included in package data are shown on stderr (for debugging purposes). Note patterns use wildcards, or can be exact paths (including leading ``./``), and all searching is case-insensitive. """ out = {} stack = [(convert_path(where), '', package, only_in_packages)] while stack: where, prefix, package, only_in_packages = stack.pop(0) for name in os.listdir(where): fn = os.path.join(where, name) if os.path.isdir(fn): bad_name = False for pattern in exclude_directories: if (fnmatchcase(name, pattern) or fn.lower() == pattern.lower()): bad_name = True if show_ignored: print >> sys.stderr, ( "Directory %s ignored by pattern %s" % (fn, pattern)) pass break if bad_name: continue if os.path.isfile(os.path.join(fn, '__init__.py')): if not package: new_package = name else: new_package = package + '.' + name stack.append((fn, '', new_package, False)) else: stack.append((fn, prefix + name + '/', package, only_in_packages)) elif package or not only_in_packages: # is a file bad_name = False for pattern in exclude: if (fnmatchcase(name, pattern) or fn.lower() == pattern.lower()): bad_name = True if show_ignored: print >> sys.stderr, ( "File %s ignored by pattern %s" % (fn, pattern)) pass break if bad_name: continue out.setdefault(package, []).append(prefix+name) return out ____________________________________________________________________________________ Need Mail bonding? Go to the Yahoo! Mail Q&A for great tips from Yahoo! Answers users. http://answers.yahoo.com/dir/?link=list&sid=396546091
participants (4)
-
Hui Zhang
-
Matt Good
-
Phillip J. Eby
-
Venkat Bommakanti