En realidad, lo que ocurre es que se intenta construir un wheel por cada
paquete que estás instalando y sus dependencias pero este paso falla por
lo que has comentado. Sin embargo, a juzgar por el log todo se instala
correctamente y en principio deberías poder importar el paquete con
normalidad. De hecho acabo de probarlo y me funciona:
$ pip install simple-monitor-alert
# Mensaje de error al crear wheel, instalación exitosa
$ python
>>> import simple_monitor_alert
>>> simple_monitor_alert.__version__
'0.2.3'
Lo que puedes hacer es sobreescribir el comando bdist_wheel para impedir
su ejecución, mostrar un mensaje o simplemente no hacer nada.
En principio los scripts de post-instalación dejarán de ser un hack
cuando se termine la PEP 426:
https://www.python.org/dev/peps/pep-0426/
Mientras tanto, el consenso de la comunidad es que «lo estás haciendo mal».
Espero que te sirva, un saludo:
Juanlu
On 2016-06-06 03:54, Nekmo wrote:
Buenas a todos.
Tengo un paquete que requiere de pasos adicionales para su instalación
en el sistema, ya que no es una biblioteca sino una aplicación. Entre
otras cosas hace:
- Instalar servicios (init, systemd).
- Actualizar los archivos de configuración, si se necesitase.
- Crear enlaces simbólicos.
- Crear un usuario del sistema si no existiese
- Dar los permisos correctos a los directorios correspondientes.
Todo esto funciona muy bien a día de hoy, y me permite tener un
paquete instalable en cualquier distribución de forma fácil y
amigable. Además, si el paquete es instalado en modo usuario, estos
pasos se saltan mostrando una advertencia al usuario.
El problema llega con Wheel: mis usuarios se quejan porque reciben un
mensaje de error de Wheel (el cual no uso) durante la instalación,
aunque el programa se instale perfectamente.
https://github.com/Nekmo/simple-monitor-alert/issues/24
-
Checking .pth file support in build/bdist.linux-x86_64/wheel/
/usr/bin/python -E -c pass
TEST FAILED: build/bdist.linux-x86_64/wheel/ does NOT support .pth files
error: bad install directory or PYTHONPATH
You are attempting to install a package to a directory that is not
on PYTHONPATH and which Python does not read ".pth" files from. The
installation directory you specified (via --install-dir, --prefix, or
the distutils default setting) was:
build/bdist.linux-x86_64/wheel/
and your PYTHONPATH environment variable currently contains:
''
Here are some of your options for correcting the problem:
* You can choose a different installation directory, i.e., one that is
on PYTHONPATH or supports .pth files
* You can add the installation directory to the PYTHONPATH environment
variable. (It must then also be on PYTHONPATH whenever you run
Python and want to use the package(s) you are installing.)
* You can set up the installation directory to support ".pth" files by
using one of the approaches described here:
https://pythonhosted.org/setuptools/easy_install.html#custom-installation-locations
Please make the appropriate changes for your system and try again.
--
El problema es que, Wheel se promociona como una solución que
justamente impide ejecutar comandos durante la instalación
(¡bieen...!) y no sé si conseguiré solventar mi problema usando Wheel.
Tal vez lo que necesite es ocultar este mensaje de error.
___
Python-es mailing list
Python-es@python.org
https://mail.python.org/mailman/listinfo/python-es
FAQ: http://python-es-faq.wikidot.com/
___
Python-es mailing list
Python-es@python.org
https://mail.python.org/mailman/listinfo/python-es
FAQ: http://python-es-faq.wikidot.com/