[Plone-conosur] [Usuarios Plone] Habilitar soporte a SSL para Python 2.4 con buildout.python

Ruben Hidalgo ruben.rhidalgo en gmail.com
Dom Jul 21 23:38:35 UTC 2013


Hola camaradas,
Como dice Leonardo (y respetando las útiles soluciones propuestas) para
este caso particular yo sigo la opción de compilar el paquete Python
(modificando el fichero setup.py según la distro linux a usar) e instalando
las dependencias a mano. Luego me construyo un virtual env.
Esto me ha dado resultados 'eficientes' en comparación con otras opciones.
Si se trata de varias máquinas o instancias, replico todo esto mediante un
repositorio ppa o pypi local.
Si conocen un método mejor, agradecido estaría de conocer.

Saludos.


El 21 de julio de 2013 21:00, Leonardo Caballero <
leonardocaballero en gmail.com> escribió:

> Aquí mi solución de acuerdo tu sugerencias:
>
> Requerimientos:
>
> # aptitude install openssl libssl-dev
> # exit
>
> Descargue y descomprima el código fuente de Python
>
> $ wget http://www.python.org/ftp/python/2.4.6/Python-2.4.6.tar.bz2
> $ tar -zxvf Python-2.4.6.tgz ; cd Python-2.4.6/
>
> Luego editas el Modules/Setup.dist de la siguiente forma:
>
> $ nano Modules/Setup.dist
>
> Debe ubicar el siguiente comentario "Socket module helper for SSL support..."
>
> y descomente adecuadamente y adapte las rutas de su sistema
>
> En el caso de Debian Wheezy:
>
> SSL=/usr/lib/ssl
> _ssl _ssl.c \
>     -DUSE_SSL -I/usr/include -I/usr/include/openssl \
>     -L/usr/lib -lssl -lcrypto
>
>
> Guarde los cambios y salga del editor.
>
> Cree el directorio donde instalara el Python a compilar
>
> $ mkdir -p $HOME/pythons/py24
>
> Para iniciar el proceso de compilación ejecute el siguiente comando:
>
> Nota:
>
>   --prefix Es la ruta absoluta donde instalara el Python a compilar
>
> $ ./configure --prefix=$HOME/pythons/py241 && make && make install
>
> Compruebe que su Python compilado soporta SSL y abrir una URL con
> conexiones seguras
>
> $ $HOME/pythons/py24/bin/python
> Python 2.4.6 (#1, Jul 21 2013, 12:36:59)
> [GCC 4.7.2] on linux3
> Type "help", "copyright", "credits" or "license" for more information.
> >>> import _ssl
> >>>
> >>> import urllib
> >>> f = urllib.urlopen('https://pypi.python.org/pypi')
> >>>
>
> De esta forma me esta funcionando
>
> Pronto lo documentare como una receta acá
> https://plone-spanish-docs.readthedocs.org/
>
> Muchas gracias Mikel :-)
>
>
> 2013/7/16 Mikel Larreategi <mlarreategi en codesyntax.com>
>
>> 2013/7/16 Leonardo Caballero <leonardocaballero en gmail.com>
>>
>>> Hola Plonistas
>>>
>>> Estoy usando buildout.python [0] para compilar Python 2.4 para unos
>>> proyectos que están aun con Plone 3.3.x :/
>>>
>>> El problema es que buildout.python me genera mi interprete mas no me da
>>> soporte a SSL y cuando requiero descargar un paquete Egg desde un sitio con
>>> https
>>>
>>> changing mode of
>>> /home/macagua/pythons/parts/opt/lib/python2.4/lib-dynload/ to 755
>>> running install_scripts
>>> copying build/scripts-2.4/pydoc -> /home/macagua/pythons/parts/opt/bin
>>> copying build/scripts-2.4/idle -> /home/macagua/pythons/parts/opt/bin
>>> copying build/scripts-2.4/smtpd.py -> /home/macagua/pythons/parts/opt/bin
>>> changing mode of /home/macagua/pythons/parts/opt/bin/pydoc to 755
>>> changing mode of /home/macagua/pythons/parts/opt/bin/idle to 755
>>> changing mode of /home/macagua/pythons/parts/opt/bin/smtpd.py to 755
>>> if test -f /home/macagua/pythons/parts/opt/bin/python -o -h
>>> /home/macagua/pythons/parts/opt/bin/python; \
>>>     then rm -f /home/macagua/pythons/parts/opt/bin/python; \
>>>     else true; \
>>>     fi
>>> (cd /home/macagua/pythons/parts/opt/bin; ln python2.4 python)
>>> /usr/bin/install -c -m 644 ./Misc/python.man \
>>>         /home/macagua/pythons/parts/opt/man/man1/python.1
>>> Installing virtualenv172.
>>> Searching cache at /home/macagua/.buildout/downloads/
>>> Using cache file
>>> /home/macagua/.buildout/downloads/9b6c8541e881368cf1f4b9a04d6b14e7
>>> virtualenv172: Extracting package to
>>> /home/macagua/pythons/parts/virtualenv172
>>> Installing python-2.4-virtualenv.
>>> Installing python-2.4.
>>> python-2.4: Running '
>>> /home/macagua/pythons/bin/virtualenv-2.4 /home/macagua/pythons/python-2.4
>>> /home/macagua/pythons/python-2.4/bin/easy_install -U collective.dist'
>>> New python executable in /home/macagua/pythons/python-2.4/bin/python2.4
>>> Also creating executable in /home/macagua/pythons/python-2.4/bin/python
>>> Installing
>>> distribute.................................................................................................................................................................................................done.
>>> Installing pip................done.
>>> Searching for collective.dist
>>> Reading http://pypi.python.org/simple/collective.dist/
>>> Download error on http://pypi.python.org/simple/collective.dist/:
>>> unknown url type: https -- Some packages may not be found!
>>> Reading http://pypi.python.org/simple/collective.dist/
>>> Download error on http://pypi.python.org/simple/collective.dist/:
>>> unknown url type: https -- Some packages may not be found!
>>> Couldn't find index page for 'collective.dist' (maybe misspelled?)
>>> Scanning index of all packages (this may take a while)
>>> Reading http://pypi.python.org/simple/
>>> Download error on http://pypi.python.org/simple/: unknown url type:
>>> https -- Some packages may not be found!
>>> No local packages or download links found for collective.dist
>>> error: Could not find suitable distribution for
>>> Requirement.parse('collective.dist')
>>> python-2.4: Non zero exit code (1) while running command.
>>> While:
>>>   Installing python-2.4.
>>>
>>> Error: Non zero exit code (1) while running command.
>>>
>>> Ya tengo instalando los paquetes openssl libssl-dev
>>>
>>> Alguna idea?
>>>
>>>
>> Hola:
>>
>> Yo he tenido esta misma semana el mismo problema, soy incapaz de tener un
>> python2.4 son soporte SSL utilizando el buildout.python.
>>
>> Lo que hice fue descargarme directamente el tar de python 2.4,
>> descomprimirlo, editar el archivo Modules/Setup y descomentar ahí las
>> líneas correspondientes a SSL indicando un path correcto. Después ejecuté
>> configure --prefix=~/py24 && make && make install (como en los viejos
>> tiempos), para tener un python2.4 con soporte SSL preparado.
>>
>>
>> Saludos,
>>
>>
>> Mikel
>>
>>
>>
>> --
>> Mikel Larreategi
>> mlarreategi en codesyntax.com
>>
>> CodeSyntax
>> Azitaingo Industrialdea 3 K
>> E-20600 Eibar
>> Tel: (+34) 943 82 17 80
>>
>
>
>
> --
> Atentamente
>
> T.S.U. Leonardo Caballero
> Linux Counter ID = https://linuxcounter.net/user/369081.html
> Key fingerprint = 9FD2 DC71 38E7 A1D1 57F5  1D29 04DE 43BC 8A27 424A
>
> /me Corriendo Debian Wheezy y Canaina GNU/Linux 3
> /me Cree "El Conocimiento Humano le Pertenece al Mundo"
>
> _______________________________________________
> Plone-ConoSur mailing list
> Plone-ConoSur en lists.plone.org
> https://lists.plone.org/mailman/listinfo/plone-plone-conosur
>
>
------------ próxima parte ------------
Se ha borrado un adjunto en formato HTML...
URL: <http://lists.plone.org/pipermail/plone-plone-conosur/attachments/20130722/6ff2efdc/attachment-0001.html>


Más información sobre la lista de distribución Plone-ConoSur