setup.py shouldn't try to pip install anything
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
python-redfish |
Fix Released
|
High
|
Uggla |
Bug Description
The setup.py script tries to import future and if it fails it then attempts to pip install that library [0] that seems to be a hack and needs to be removed because it causes a lot of pain on system that is trying to package the library. For example, when packing for RDO this problems appears:
DEBUG: configure yum
DEBUG: configure yum priorities
DEBUG: configure yum rhnplugin
DEBUG: touching file: /var/lib/
Finish: chroot init
INFO: Running in chroot: ['cd /tmp/pkgsrc && python setup.py sdist']
Start: chroot ['cd /tmp/pkgsrc && python setup.py sdist']
DEBUG: child environment: None
DEBUG: Executing command: ['/bin/sh', '-c', 'cd /tmp/pkgsrc && python setup.py sdist'] with env {'LANG': 'en_IE.UTF-8', 'PATH': '/usr/bin:
DEBUG: Unsharing. Flags: 134217728
Traceback (most recent call last):
File "setup.py", line 29, in <module>
check_
File "/usr/lib64/
retcode = call(*popenargs, **kwargs)
File "/usr/lib64/
return Popen(*popenargs, **kwargs).wait()
File "/usr/lib64/
errread, errwrite)
File "/usr/lib64/
raise child_exception
OSError: [Errno 2] No such file or directory
DEBUG: Child return code was: 1
Finish: chroot ['cd /tmp/pkgsrc && python setup.py sdist']
DEBUG: kill orphans
...
Another problem this would raise is that, in order to execute anything in setup.py (say just do python setup.py sdist) will require a privileged user otherwise we won't have permission to install the library via pip, for example:
$ python setup.py sdist
Collecting future
Installing collected packages: future
Exception:
Traceback (most recent call last):
File "/usr/lib/
status = self.run(options, args)
File "/usr/lib/
strip_
File "/usr/lib/
**kwargs
File "/usr/lib/
strip_
File "/usr/lib/
strip_
File "/usr/lib/
clobber(source, lib_dir, True)
File "/usr/lib/
ensure_
File "/usr/lib/
os.
File "/usr/lib64/
mkdir(name, mode)
OSError: [Errno 13] Permission denied: '/usr/lib/
You are using pip version 8.1.2, however version 9.0.1 is available.
You should consider upgrading via the 'pip install --upgrade pip' command.
Traceback (most recent call last):
File "setup.py", line 29, in <module>
check_
File "/usr/lib64/
raise CalledProcessEr
subprocess.
description: | updated |
Changed in python-redfish: | |
milestone: | none → 0.4 |
Changed in python-redfish: | |
status: | Fix Committed → Fix Released |
Thanks for submitting this bug.
Yes I did that and that's a dirty hack. :)
I'll try to fix it ASAP.