mailarchive of the ptxdist mailing list
 help / color / mirror / Atom feed
From: jdwilson <jdwilson.rfc@gmail.com>
To: ptxdist@pengutronix.de
Subject: [ptxdist] ptxdist-2012.03.00 python2.6, hashlib.py, flup.py install fails ImportError: No module named _sha256
Date: Tue, 11 Mar 2014 22:39:42 +0000 (UTC)	[thread overview]
Message-ID: <loom.20140311T225812-290@post.gmane.org> (raw)

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

             reply	other threads:[~2014-03-11 22:45 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-03-11 22:39 jdwilson [this message]
2014-03-12  8:53 ` Juergen Beisert
2014-03-13 22:45   ` jdwilson
2014-03-14  8:28     ` Juergen Beisert

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=loom.20140311T225812-290@post.gmane.org \
    --to=jdwilson.rfc@gmail.com \
    --cc=ptxdist@pengutronix.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox