ebin123456 / py-amqplib

Automatically exported from code.google.com/p/py-amqplib
GNU Lesser General Public License v2.1
0 stars 0 forks source link

pip install / python setup.py install fails - possible MANIFEST.in file corruption #42

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
Which version of amqplib are you using?

amqplib-1.0.1.tgz

Have you checked to see if there is a newer version in the "Featured
Downloads" section of the front page of this project?

Yes

Which broker are you using (RabbitMQ?) which version?

N/A - problem with installation

Which version of Python?

2.7.2

What steps will reproduce the problem?

1. pip install amqplib

What is the expected output?

Package installs correctly

What do you see instead?

reading manifest template 'MANIFEST.in'
Traceback (most recent call last):
  File "<string>", line 14, in <module>
  File "C:\Users\sculd\build\amqplib\setup.py", line 47, in <module>
    cmdclass = {'build_py':build_py},
  File "C:\Python27\lib\distutils\core.py", line 152, in setup
    dist.run_commands()
  File "C:\Python27\lib\distutils\dist.py", line 953, in run_commands
    self.run_command(cmd)
  File "C:\Python27\lib\distutils\dist.py", line 972, in run_command
    cmd_obj.run()
  File "<string>", line 12, in replacement_run
  File "C:\Python27\lib\site-packages\setuptools\command\egg_info.py", line 252, in find_sources
    mm.run()
  File "C:\Python27\lib\site-packages\setuptools\command\egg_info.py", line 308, in run
    self.read_template()
  File "C:\Python27\lib\site-packages\setuptools\command\sdist.py", line 162, in read_template
    sys.exc_info()[2].tb_next.tb_frame.f_locals['template'].close()
  File "C:\Python27\lib\distutils\text_file.py", line 128, in close
    self.file.close ()
AttributeError: 'NoneType' object has no attribute 'close'

Please provide any additional information below.

I believe that this issue is due to a corrupted MANIFEST.in file.
I have corrected this file to the following and it installed successfully.

MANIFEST.in:

include README TODO CHANGES INSTALL LICENSE
recursive-include docs/*.txt
recursive-include demo/*.py
recursive-include extras/*.py
recursive-include tests/*.py

Original issue reported on code.google.com by dscul...@gmail.com on 29 Sep 2011 at 3:31

GoogleCodeExporter commented 9 years ago
It looks like you're on Windows, must be a difference there.  It think there's 
supposed to be a space between the directory name and the patters in the 
'recursive-include' statements, maybe the slashes are throwing it off, but from 
the examples in the Python docs they don't seem to be necessary Would this work 
for you?

include README TODO CHANGES INSTALL LICENSE
recursive-include docs *.txt
recursive-include demo *.py
recursive-include extras README *.py
recursive-include tests *.py

Original comment by barry.pe...@gmail.com on 29 Sep 2011 at 3:48

GoogleCodeExporter commented 9 years ago
Yes, platform is Windows, sorry for not including that info in report. 
Suggestion in comment 1 works nicely for me with only one warning from a python 
setup.py install which is as follows:

warning: no files found matching 'README' under directory 'extras'

Also with my origional sugestion of a manifest.in it appears that python 
setup.py install just gave warnings about unable to locate any of the files, 
but did not fail the install as the origional manifest.in from the source 
distribution did. With your sugestion in comment 1 it installs cleanly, and 
aside from the README file does not give any warnings. Thank you!

Original comment by dscul...@gmail.com on 29 Sep 2011 at 5:01

GoogleCodeExporter commented 9 years ago
hi, platform is windows too, although python 2.6, distribute 0.6.10, cmd: "pip 
install amqplib", output is: 

pip install amqplib
Downloading/unpacking amqplib
  Running setup.py egg_info for package amqplib
    Traceback (most recent call last):
      File "<string>", line 14, in <module>
      File "C:\Users\felix\workspace\ecs\environment\build\amqplib\setup.py", line 47, in <module>
        cmdclass = {'build_py':build_py},
      File "c:\Python26\Lib\distutils\core.py", line 152, in setup
        dist.run_commands()
      File "c:\Python26\Lib\distutils\dist.py", line 975, in run_commands
        self.run_command(cmd)
      File "c:\Python26\Lib\distutils\dist.py", line 995, in run_command
        cmd_obj.run()
      File "<string>", line 12, in replacement_run
      File "C:\Users\felix\workspace\ecs\environment\lib\site-packages\distribute-0.6.10-py2.6.egg\setuptools\command\egg_info.py", line 254, in find_sources
        mm.run()
      File "C:\Users\felix\workspace\ecs\environment\lib\site-packages\distribute-0.6.10-py2.6.egg\setuptools\command\egg_info.py", line 310, in run
        self.read_template()
      File "C:\Users\felix\workspace\ecs\environment\lib\site-packages\distribute-0.6.10-py2.6.egg\setuptools\command\sdist.py", line 204, in read_template
        _sdist.read_template(self)
      File "c:\Python26\Lib\distutils\command\sdist.py", line 336, in read_template
        self.filelist.process_template_line(line)
      File "c:\Python26\Lib\distutils\filelist.py", line 129, in process_template_line
        (action, patterns, dir, dir_pattern) = self._parse_template_line(line)
      File "c:\Python26\Lib\distutils\filelist.py", line 104, in _parse_template_line
        dir = convert_path(words[1])
      File "c:\Python26\Lib\distutils\util.py", line 191, in convert_path
        raise ValueError, "path '%s' cannot end with '/'" % pathname
    ValueError: path 'docs/' cannot end with '/'
    Complete output from command python setup.py egg_info:
    running egg_info

writing pip-egg-info\amqplib.egg-info\PKG-INFO
writing top-level names to pip-egg-info\amqplib.egg-info\top_level.txt
writing dependency_links to pip-egg-info\amqplib.egg-info\dependency_links.txt
reading manifest file 'pip-egg-info\amqplib.egg-info\SOURCES.txt'
reading manifest template 'MANIFEST.in'

warning: manifest_maker: standard file '-c' not found

Traceback (most recent call last):
  File "<string>", line 14, in <module>
  File "C:\Users\felix\workspace\ecs\environment\build\amqplib\setup.py", line 47, in <module>
    cmdclass = {'build_py':build_py},
  File "c:\Python26\Lib\distutils\core.py", line 152, in setup
    dist.run_commands()
  File "c:\Python26\Lib\distutils\dist.py", line 975, in run_commands
    self.run_command(cmd)
  File "c:\Python26\Lib\distutils\dist.py", line 995, in run_command
    cmd_obj.run()
  File "<string>", line 12, in replacement_run
  File "C:\Users\felix\workspace\ecs\environment\lib\site-packages\distribute-0.6.10-py2.6.egg\setuptools\command\egg_info.py", line 254, in find_sources
    mm.run()
  File "C:\Users\felix\workspace\ecs\environment\lib\site-packages\distribute-0.6.10-py2.6.egg\setuptools\command\egg_info.py", line 310, in run
    self.read_template()
  File "C:\Users\felix\workspace\ecs\environment\lib\site-packages\distribute-0.6.10-py2.6.egg\setuptools\command\sdist.py", line 204, in read_template
    _sdist.read_template(self)
  File "c:\Python26\Lib\distutils\command\sdist.py", line 336, in read_template
    self.filelist.process_template_line(line)
  File "c:\Python26\Lib\distutils\filelist.py", line 129, in process_template_line
    (action, patterns, dir, dir_pattern) = self._parse_template_line(line)
  File "c:\Python26\Lib\distutils\filelist.py", line 104, in _parse_template_line
    dir = convert_path(words[1])
  File "c:\Python26\Lib\distutils\util.py", line 191, in convert_path
    raise ValueError, "path '%s' cannot end with '/'" % pathname
ValueError: path 'docs/' cannot end with '/'

Original comment by wux...@gmail.com on 29 Sep 2011 at 5:08

GoogleCodeExporter commented 9 years ago
Thanks dscul.. glad it works although I don't understand why it doesn't find 
extras/README because there really is one there (although it's really not 
important so I'm thinking it's not worth worrying about too much).

wux..  Does the Manifest.in from Comment 1 work for you?

Original comment by barry.pe...@gmail.com on 29 Sep 2011 at 5:27

GoogleCodeExporter commented 9 years ago
yes, thanks, that did it: output was: > python 
..\..\..\environment\Scripts\easy_install-script.py amqplib-1.0.1
Processing amqplib-1.0.1
Running setup.py -q bdist_egg --dist-dir 
C:\Users\felix\workspace\ecs\src\sandbox\t\amqplib-1.0.1\egg-dist-tmp-vz938l
warning: no files found matching 'README' under directory 'extras'
zip_safe flag not set; analyzing archive contents...
Adding amqplib 1.0.1 to easy-install.pth file

Installed 
c:\users\felix\workspace\ecs\environment\lib\site-packages\amqplib-1.0.1-py2.6.e
gg
Processing dependencies for amqplib==1.0.1
Finished processing dependencies for amqplib==1.0.1

Original comment by wux...@gmail.com on 29 Sep 2011 at 5:58

GoogleCodeExporter commented 9 years ago
Fixed in revision 6d296f64a9a4

Original comment by barry.pe...@gmail.com on 29 Sep 2011 at 6:18

GoogleCodeExporter commented 9 years ago
I uploaded amqplib-1.0.2.tgz to pypi.python.org, so you should be able to try

    pip install amqplib

again

Original comment by barry.pe...@gmail.com on 29 Sep 2011 at 6:24

GoogleCodeExporter commented 9 years ago
installed in a clean environment without problems now, thank you !

Original comment by wux...@gmail.com on 29 Sep 2011 at 7:29