Re: [Distutils] error using easy_install

2013-06-16 Thread Ethan Furman

On 06/15/2013 10:13 AM, Tres Seaver wrote:

On 06/15/2013 02:29 AM, Ethan Furman wrote:


Any ideas?  Is this the right place to post?


This is the right place.  Your 'package_data' declaration is getting munged::


[snip]


Looking at the 'build_py' step, this line is problematic:

package_dir={'enum':''},

When I change it to:

package_dir={'enum':'.'},

then the install succeeds.  I would probably just make an 'enum' subdir,
move the files into it, and be done with it ('setup.py' isn't logically
part of the package:  it is in the wrapper).


I went with the latter solution, which worked fine.  Thanks!

--
~Ethan~
___
Distutils-SIG maillist  -  Distutils-SIG@python.org
http://mail.python.org/mailman/listinfo/distutils-sig


[Distutils] error using easy_install

2013-06-15 Thread Ethan Furman

My setup.py:

-- 8 --
from distutils.core import setup

long_desc = open('enum.rst').read()

setup( name='stoneleaf.enum',
   version='1.0.1',
   url='https://pypi.python.org/pypi/stoneleaf.enum',
   packages=['enum'],
   package_dir={'enum':''},
   package_data={'enum':['enum.rst', 'enum.pdf', 'test/test_enum.py',
 'test/py2_test_enum.py', 'test/py3_test_enum.py']},
   license='BSD License',
   description='Python 3.4 Enum backported to 3.3, 3.2, 3.1, 2.7, 2.6, 2.5, 
and 2.4',
   long_description=long_desc,
   provides=['enum'],
   author='Ethan Furman',
   author_email='et...@stoneleaf.us',
   classifiers=[
'Development Status :: 5 - Production/Stable',
'Intended Audience :: Developers',
'License :: OSI Approved :: BSD License',
'Programming Language :: Python',
'Topic :: Software Development' ],
 )
-- 8 --

Error trying to install it with easy_install after uploading it to PyPI:

ethan@hydra:~$ sudo easy_install stoneleaf.enum
Searching for stoneleaf.enum
Reading http://pypi.python.org/simple/stoneleaf.enum/
Best match: stoneleaf.enum 1.0.1
Downloading 
http://pypi.python.org/packages/source/s/stoneleaf.enum/stoneleaf.enum-1.0.1.zip#md5=c41abd7ad04f11e8b545cfca7758a4f2

Processing stoneleaf.enum-1.0.1.zip
Writing /tmp/easy_install-LY_zzX/stoneleaf.enum-1.0.1/setup.cfg
Running stoneleaf.enum-1.0.1/setup.py -q bdist_egg --dist-dir 
/tmp/easy_install-LY_zzX/stoneleaf.enum-1.0.1/egg-dist-tmp-IpvhLD

error: Setup script exited with error: can't copy 'num.rst': doesn't exist or 
not a regular file


There is no 'num.rst' file in the package -- it should be 'enum.rst'.

Any ideas?  Is this the right place to post?

--
~Ethan~
___
Distutils-SIG maillist  -  Distutils-SIG@python.org
http://mail.python.org/mailman/listinfo/distutils-sig


Re: [Distutils] error using easy_install

2013-06-15 Thread Tres Seaver
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

On 06/15/2013 02:29 AM, Ethan Furman wrote:
 My setup.py:
 
 -- 8 -- 
 from distutils.core import setup
 
 long_desc = open('enum.rst').read()
 
 setup( name='stoneleaf.enum', version='1.0.1', 
 url='https://pypi.python.org/pypi/stoneleaf.enum', packages=['enum'], 
 package_dir={'enum':''}, package_data={'enum':['enum.rst', 'enum.pdf',
 'test/test_enum.py', 'test/py2_test_enum.py',
 'test/py3_test_enum.py']}, license='BSD License', description='Python
 3.4 Enum backported to 3.3, 3.2, 3.1, 2.7, 2.6, 2.5, and 2.4', 
 long_description=long_desc, provides=['enum'], author='Ethan Furman', 
 author_email='et...@stoneleaf.us', classifiers=[ 'Development Status
 :: 5 - Production/Stable', 'Intended Audience :: Developers', 'License
 :: OSI Approved :: BSD License', 'Programming Language :: Python', 
 'Topic :: Software Development' ], ) -- 8
 --
 
 Error trying to install it with easy_install after uploading it to
 PyPI:
 
 ethan@hydra:~$ sudo easy_install stoneleaf.enum Searching for
 stoneleaf.enum Reading http://pypi.python.org/simple/stoneleaf.enum/ 
 Best match: stoneleaf.enum 1.0.1 Downloading 
 http://pypi.python.org/packages/source/s/stoneleaf.enum/stoneleaf.enum-1.0.1.zip#md5=c41abd7ad04f11e8b545cfca7758a4f2

 
Processing stoneleaf.enum-1.0.1.zip
 Writing /tmp/easy_install-LY_zzX/stoneleaf.enum-1.0.1/setup.cfg 
 Running stoneleaf.enum-1.0.1/setup.py -q bdist_egg --dist-dir 
 /tmp/easy_install-LY_zzX/stoneleaf.enum-1.0.1/egg-dist-tmp-IpvhLD 
 error: Setup script exited with error: can't copy 'num.rst': doesn't
 exist or not a regular file
 
 
 There is no 'num.rst' file in the package -- it should be 'enum.rst'.
 
 Any ideas?  Is this the right place to post?

This is the right place.  Your 'package_data' declaration is getting munged::

  /tmp/stone/stoneleaf.enum-1.0.1/build/bdist.linux-i686/egg/setuptools
/command/build_py.py(80)build_package_data()
 - self.copy_file(os.path.join(src_dir, filename), target)
 (Pdb) l
  75lastdir = None
  76for package, src_dir, build_dir, filenames in self.data_files:
  77for filename in filenames:
  78target = os.path.join(build_dir, filename)
  79self.mkpath(os.path.dirname(target))
  80  -self.copy_file(os.path.join(src_dir, filename),
target)
  81
  82
  83def analyze_manifest(self):
  84self.manifest_files = mf = {}
  85if not self.distribution.include_package_data:
 (Pdb) pp self.data_files
 [('enum',
   '',
   'build/lib/enum',
   ['num.rst',
'num.pdf',
'est/test_enum.py',
'est/py2_test_enum.py',
'est/py3_test_enum.py'])]

Looking at the 'build_py' step, this line is problematic:

   package_dir={'enum':''},

When I change it to:

   package_dir={'enum':'.'},

then the install succeeds.  I would probably just make an 'enum' subdir,
move the files into it, and be done with it ('setup.py' isn't logically
part of the package:  it is in the wrapper).



Tres.
- -- 
===
Tres Seaver  +1 540-429-0999  tsea...@palladion.com
Palladion Software   Excellence by Designhttp://palladion.com
-BEGIN PGP SIGNATURE-
Version: GnuPG v1.4.11 (GNU/Linux)
Comment: Using GnuPG with undefined - http://www.enigmail.net/

iEYEARECAAYFAlG8oNUACgkQ+gerLs4ltQ4axQCgh1YAyvqC/ZRJs1V6U4jQ66as
9VQAnRmJqhFINjzjCx2eftJfALKj/vsc
=o/a+
-END PGP SIGNATURE-

___
Distutils-SIG maillist  -  Distutils-SIG@python.org
http://mail.python.org/mailman/listinfo/distutils-sig


[Distutils] Error using easy_install

2008-11-24 Thread tjk1

Hello,

I am trying to install easy_install and setuptools so I can install PyOpenGL.

I am using Windows XP Pro SP 2. I use Python 2.4.3 in the C:\Python24  
directory.


I downloaded and installed setuptools-0.6c9.win32-py2.4.exe without errors.

I have added C:\Python24\Scripts to my Path.

I have installed ctypes, numpy, PIL, SimpleParse, PyGame, and win32all.

When I try to use easy_install I get this error from pkg_resources.py,  
line 1913:


ImportError: No module named command.easy_install

I have read this trouble-shooting advice:
If EasyInstall/setuptools appears to install correctly, and you can  
run the easy_install command but it fails with an ImportError, the  
most likely cause is that you installed to a location other than  
site-packages, without taking any of the steps described in the Custom  
Installation Locations section below. Please see that section and  
follow the steps to make sure that your custom location will work  
correctly. Then re-install.


But I am not installing to a custom location that I am aware of.  
setuptools is found in my C:\Python24\lib\site-packages\ directory.


I can't find any other information on the web other than the  
troubleshooting advice on Peak (quoted above).


Can someone help me fix my setuptools?

-Tim
___
Distutils-SIG maillist  -  Distutils-SIG@python.org
http://mail.python.org/mailman/listinfo/distutils-sig


Re: [Distutils] Error using easy_install

2008-11-24 Thread Phillip J. Eby

At 06:47 PM 11/24/2008 -0600, [EMAIL PROTECTED] wrote:

Hello,

I am trying to install easy_install and setuptools so I can install PyOpenGL.

I am using Windows XP Pro SP 2. I use Python 2.4.3 in the C:\Python24
directory.

I downloaded and installed setuptools-0.6c9.win32-py2.4.exe without errors.

I have added C:\Python24\Scripts to my Path.

I have installed ctypes, numpy, PIL, SimpleParse, PyGame, and win32all.

When I try to use easy_install I get this error from pkg_resources.py,
line 1913:

ImportError: No module named command.easy_install

I have read this trouble-shooting advice:
If EasyInstall/setuptools appears to install correctly, and you can
run the easy_install command but it fails with an ImportError, the
most likely cause is that you installed to a location other than
site-packages, without taking any of the steps described in the Custom
Installation Locations section below. Please see that section and
follow the steps to make sure that your custom location will work
correctly. Then re-install.

But I am not installing to a custom location that I am aware of.
setuptools is found in my C:\Python24\lib\site-packages\ directory.


I would check to make sure that you don't have any other location 
where setuptools is installed, after first uninstalling (using the 
Windows control panel add/remove programs).  Search your system for 
any pkg_resources.py files or setuptools directories after 
uninstalling.  If you find any, be sure to delete them before re-installing.


___
Distutils-SIG maillist  -  Distutils-SIG@python.org
http://mail.python.org/mailman/listinfo/distutils-sig