You are not logged in.

#1 2011-01-20 23:00:39

clu
Member
Registered: 2008-07-05
Posts: 40

[Solved] [python2] "from setuptools import setup,find_packages"

Running

 from setuptools import setup,find_packages

as a normal user in python2 is causing a permissions error. Anybody have a solution for this? The main issue is that this prevents a python package from building using makepkg as a normal user.

Here's the full trace:

Python 2.7.1 (r271:86832, Jan  6 2011, 11:51:37) 
[GCC 4.5.2] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> from setuptools import setup,find_packages
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/usr/lib/python2.7/site-packages/setuptools/__init__.py", line 2, in <module>
    from setuptools.extension import Extension, Library
  File "/usr/lib/python2.7/site-packages/setuptools/extension.py", line 2, in <module>
    from setuptools.dist import _get_unpatched
  File "/usr/lib/python2.7/site-packages/setuptools/dist.py", line 6, in <module>
    from setuptools.command.install import install
  File "/usr/lib/python2.7/site-packages/setuptools/command/__init__.py", line 8, in <module>
    from setuptools.command import install_scripts
  File "/usr/lib/python2.7/site-packages/setuptools/command/install_scripts.py", line 3, in <module>
    from pkg_resources import Distribution, PathMetadata, ensure_directory
  File "/usr/lib/python2.7/site-packages/pkg_resources.py", line 2691, in <module>
    add_activation_listener(lambda dist: dist.activate())
  File "/usr/lib/python2.7/site-packages/pkg_resources.py", line 668, in subscribe
    callback(dist)
  File "/usr/lib/python2.7/site-packages/pkg_resources.py", line 2691, in <lambda>
    add_activation_listener(lambda dist: dist.activate())
  File "/usr/lib/python2.7/site-packages/pkg_resources.py", line 2192, in activate
    self.insert_on(path)
  File "/usr/lib/python2.7/site-packages/pkg_resources.py", line 2299, in insert_on
    self.check_version_conflict()
  File "/usr/lib/python2.7/site-packages/pkg_resources.py", line 2338, in check_version_conflict
    for modname in self._get_metadata('top_level.txt'):
  File "/usr/lib/python2.7/site-packages/pkg_resources.py", line 2186, in _get_metadata
    for line in self.get_metadata_lines(name):
  File "/usr/lib/python2.7/site-packages/pkg_resources.py", line 1174, in get_metadata_lines
    return yield_lines(self.get_metadata(name))
  File "/usr/lib/python2.7/site-packages/pkg_resources.py", line 1166, in get_metadata
    return self._get(self._fn(self.egg_info,name))
  File "/usr/lib/python2.7/site-packages/pkg_resources.py", line 1281, in _get
    stream = open(path, 'rb')
IOError: [Errno 13] Permission denied: '/usr/lib/python2.7/site-packages/h5py-1.3.0-py2.7.egg-info/top_level.txt'
>>> 

Last edited by clu (2011-01-20 23:10:46)


Kick out the jams! -- AUR

Offline

#2 2011-01-20 23:03:10

wonder
Developer
From: Bucharest, Romania
Registered: 2006-07-05
Posts: 5,941
Website

Re: [Solved] [python2] "from setuptools import setup,find_packages"

usr/lib/python2.7/site-packages/h5py-1.3.0-py2.7.egg-info/top_level.txt

try to fix this file permission. is it our package? pacman -Qo /path/to/file


Give what you have. To someone, it may be better than you dare to think.

Offline

#3 2011-01-20 23:10:17

clu
Member
Registered: 2008-07-05
Posts: 40

Re: [Solved] [python2] "from setuptools import setup,find_packages"

I just went through the other top_level.txt files and noticed the permissions on this were incorrect.

No, the package is from AUR (https://aur.archlinux.org/packages.php?ID=19334). I'll make a fix and add a comment there.

Thanks!


Kick out the jams! -- AUR

Offline

Board footer

Powered by FluxBB