This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author vinay.sajip
Recipients alexis, eric.araujo, tarek, vinay.sajip
Date 2011-06-22.11:22:23
SpamBayes Score 4.4371717e-08
Marked as misclassified No
Message-id <1308741745.2.0.628902356429.issue12386@psf.upfronthosting.co.za>
In-reply-to
Content
This part of install_distinf.run():

    if install_data.get_resources_out() != []:
        resources_path = os.path.join(self.distinfo_dir,
                                      'RESOURCES')
        logger.info('creating %s', resources_path)
        with open(resources_path, 'wb') as f:
            writer = csv.writer(f, delimiter=',',
                                lineterminator='\n',
                                quotechar='"')
            for tuple in install_data.get_resources_out():
                writer.writerow(tuple)

fails at the writerow line:

creating /tmp/venv/lib/python3.3/site-packages/nemo-0.1.dist-info/METADATA
creating /tmp/venv/lib/python3.3/site-packages/nemo-0.1.dist-info/INSTALLER
creating /tmp/venv/lib/python3.3/site-packages/nemo-0.1.dist-info/REQUESTED
creating /tmp/venv/lib/python3.3/site-packages/nemo-0.1.dist-info/RESOURCES
Traceback (most recent call last):
  File "/tmp/venv/bin/pysetup3", line 5, in <module>
    sys.exit(main())
  File "/usr/local/lib/python3.3/packaging/run.py", line 678, in main
    return dispatcher()
  File "/usr/local/lib/python3.3/packaging/run.py", line 667, in __call__
    return func(self, self.args)
  File "/usr/local/lib/python3.3/packaging/run.py", line 204, in wrapper
    return f(*args, **kwargs)
  File "/usr/local/lib/python3.3/packaging/run.py", line 247, in _install
    if install_local_project(target):
  File "/usr/local/lib/python3.3/packaging/install.py", line 125, in install_local_project
    return _run_install_from_dir(path)
  File "/usr/local/lib/python3.3/packaging/install.py", line 160, in _run_install_from_dir
    func(source_dir)
  File "/usr/local/lib/python3.3/packaging/install.py", line 90, in _run_packaging_install
    dist.run_command('install_dist')
  File "/usr/local/lib/python3.3/packaging/dist.py", line 761, in run_command
    cmd_obj.run()
  File "/usr/local/lib/python3.3/packaging/command/install_dist.py", line 526, in run
    self.run_command(cmd_name)
  File "/usr/local/lib/python3.3/packaging/command/cmd.py", line 329, in run_command
    self.distribution.run_command(command)
  File "/usr/local/lib/python3.3/packaging/dist.py", line 761, in run_command
    cmd_obj.run()
  File "/usr/local/lib/python3.3/packaging/command/install_distinfo.py", line 116, in run
    writer.writerow(tuple)
TypeError: 'str' does not support the buffer interface


I think the open(resources_path) should use 'w' rather than 'wb' as the open mode.

Relevant part of setup.cfg:

resources =
    virtualenvwrapper.sh = {scripts}

I know I can put it in the scripts = section, but I'm testing having something in resources, which ought to work ...
History
Date User Action Args
2011-06-22 11:22:25vinay.sajipsetrecipients: + vinay.sajip, tarek, eric.araujo, alexis
2011-06-22 11:22:25vinay.sajipsetmessageid: <1308741745.2.0.628902356429.issue12386@psf.upfronthosting.co.za>
2011-06-22 11:22:24vinay.sajiplinkissue12386 messages
2011-06-22 11:22:23vinay.sajipcreate