mailarchive of the ptxdist mailing list
 help / color / mirror / Atom feed
* [ptxdist] ptxdist-2012.03.00 python2.6, hashlib.py, flup.py install fails ImportError: No module named _sha256
@ 2014-03-11 22:39 jdwilson
  2014-03-12  8:53 ` Juergen Beisert
  0 siblings, 1 reply; 4+ messages in thread
From: jdwilson @ 2014-03-11 22:39 UTC (permalink / raw)
  To: ptxdist

Hello ptxdist devel group:

I'm new to this group and somewhat new to ptxdist, so I hope this is the 
right list to post this issue.  

I have successfully built a target image that includes python2.6 and 
lighttpd which is part of ptxdist-2012.03.00. The intent was to use flup.py 
to provide fastcgi, wsgi capability. (This works in my dev env, under Ubuntu 
12.04 LTS, python2.7.x).

The issue below shows up when I enable the extra python module flup in 
ptxdist menuconfig, under python extra modules.

My diagnostics may not be 100% correct here, but it appears to me that the 
openssl is not available when being built for the target. (Note the 
references to sysroot-host/lib/python2.6 to where hashlib.py is located).

If the openssl was installed, there would be a ~/ssl directory either under 
/usr/lib/ssl (default per openssl.make) or some other specified file system 
(e.g., /usr/local/lib/ssl)  There is no ~/ssl directory on the target at 
this time.

1) How does one ensure ptxdist builds and installs openssl and then ensure 
that python will use the openssl module?

2) For reference, I found the patch for flup.in, python.in here:
https://bitbucket.org/bwalle/ptxdist/commits/6e48293f380f6c115bd433f8519e7f9
6e8f0f66f

I applied this patch by copying the respective .in, .make files to my 
platform ~/rules directory.

This still did not solve the problem. I'm hoping someone from this group may 
be able to help get around this hashlib.py issue.

Also, would it be advisable to update to ptxdist-2012.07.00 which includes 
the fix for flup?  Would also like to update to python2.7 as well, but not 
sure the build tool supports this yet.

I also tested the target python install by importing hashlib and testing 
md5(), new("md5") both work.  So not sure why this build below does not wor.

Any help or guidance would be much appreciated.
The log is below.
Regards,
JD

_________________________________________________________________________
Packaged contents of /home/jdwilson/embed/phytec/bsp13.2.2/platform-phyFLEX-
i.MX6/packages/python.tmp/opkg into 
/home/jdwilson/embed/phytec/bsp13.2.2/platform-phyFLEX-
i.MX6/packages/python_2.6.6_armel.ipk
done.
finished target python.targetinstall

----------------
target: flup.get
----------------

finished target flup.get

--------------------
target: flup.extract
--------------------

extract: pkg_src=bsp13.2.2/src/flup-1.0.2.tar.gz
extract: pkg_extract_dir=bsp13.2.2/platform-phyFLEX-i.MX6/build-target/flup-
1.0.2
ptxdist: error: series file for 'ptxdist-2012.03.0/patches/flup-1.0.2' is 
missing
pkg_patch_dir:     'ptxdist-2012.03.0/patches/flup-1.0.2'
pkg_patch_series:  '<none>'
pkg_patch_autogen: 'ptxdist-2012.03.0/patches/flup-1.0.2/autogen.sh'

patchin: autogen: running '/usr/local/lib/ptxdist-2012.03.0/patches/flup-
1.0.2/autogen.sh'
patchin: autogen: done

patchin: fixup:
patchin: fixup: done

finished target flup.extract

--------------------
target: flup.prepare
--------------------

prepare stage disabled.
finished target flup.prepare

--------------------
target: flup.compile
--------------------

finished target flup.compile

--------------------
target: flup.install
--------------------

/home/jdwilson/swdev/embed/phytec/bsp13.2.2/platform-phyFLEX-i.MX6/build-
target/flup-1.0.2/ez_setup.py:59: DeprecationWarning: the md5 module is 
deprecated; use hashlib instead
  except ImportError: from md5 import md5
Traceback (most recent call last):
  File "setup.py", line 2, in <module>
    from ez_setup import use_setuptools
  File "/home/jdwilson/swdev/embed/phytec/bsp13.2.2/platform-phyFLEX-
i.MX6/build-target/flup-1.0.2/ez_setup.py", line 59, in <module>
    except ImportError: from md5 import md5
  File "/home/jdwilson/embed/phytec/bsp13.2.2/platform-phyFLEX-
i.MX6/sysroot-host/lib/python2.6/md5.py", line 10, in <module>
    from hashlib import md5
  File "/home/jdwilson/embed/phytec/bsp13.2.2/platform-phyFLEX-
i.MX6/sysroot-host/lib/python2.6/hashlib.py", line 138, in <module>
    sha224 = __get_builtin_constructor('sha224')
  File "/home/jdwilson/embed/phytec/bsp13.2.2/platform-phyFLEX-
i.MX6/sysroot-host/lib/python2.6/hashlib.py", line 66, in 
__get_builtin_constructor
    import _sha256
ImportError: No module named _sha256
make: *** [/home/jdwilson/embed/phytec/bsp13.2.2/platform-phyFLEX-
i.MX6/state/flup.install] Error 1




-- 
ptxdist mailing list
ptxdist@pengutronix.de

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2014-03-14  8:28 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-03-11 22:39 [ptxdist] ptxdist-2012.03.00 python2.6, hashlib.py, flup.py install fails ImportError: No module named _sha256 jdwilson
2014-03-12  8:53 ` Juergen Beisert
2014-03-13 22:45   ` jdwilson
2014-03-14  8:28     ` Juergen Beisert

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox