Help running python tests on MIPS

rramesh1 at gmail.com rramesh1 at gmail.com
Sun Jan 11 13:43:55 EST 2015


On Sunday, January 11, 2015 at 1:45:33 AM UTC-8, Steven D'Aprano wrote:
> Ramesh wrote:
> 
> > I am new to python.
> > 
> > I downloaded python 2.7.8 tarball, successfully cross compiled it, to make
> > sure that the subsystems are correctly built, I tried running the python
> > test scripts on the MIPS based target board. I hit the below error while I
> > do so,
> 
> 
> On second thoughts, how are you doing this? If I'm reading the next line
> correctly:
> 
> > # /opt/Python-2.7.8/bin/python2.7
> > /opt/Python-2.7.8/lib/python2.7/test/test___all__.py
> 
> you haven't installed Python, you've just compiled it and are now trying to
> run the test suite manually.
> 
> If you read the README file, you should see instructions that tell you to
> run the following commands:
> 
>     ./configure
>     make
>     make test
>     sudo make install
> 
> 
> I recommend following those instructions if you can.
> 
> 
> -- 
> Steven

Thank you for the response.

I did see the README, here is what I am doing

configure
#Make hostpython & hostpgen
make python
make test
mv python hostpython 
mv Parser/hostpgen hostpgen
# Do a distclean before cross compiling
make distclean

# Configure with cross toolchain options
# gcc, g++, ar & ranlib for MIPS
# prefix pointing to /usr/lib on the target file system (MIPS)
configure 
#Build python for MIPS
make
make install

Actually I hit a problem in install (I got it worked around by doing -i (ignore errors), but later found the issue & fixed by a patch, after which - there were no errors in make install as well).

After the install, I am removing (rm -rf) certain files that I think are of no use as the target has limited flash space. 

==
       /bin/rm -rf ${PYTHON_ROOTFS_DEPLOY_DIR}/lib/python2.7/lib2to3
        /bin/rm -rf ${PYTHON_ROOTFS_DEPLOY_DIR}/lib/python2.7/email
        /bin/rm -rf ${PYTHON_ROOTFS_DEPLOY_DIR}/lib/python2.7/bsddb
        /bin/rm -rf ${PYTHON_ROOTFS_DEPLOY_DIR}/lib/python2.7/xml
        /bin/rm -rf ${PYTHON_ROOTFS_DEPLOY_DIR}/lib/python2.7/pydoc_data
        /bin/rm -rf ${PYTHON_ROOTFS_DEPLOY_DIR}/lib/python2.7/lib-tk
        /bin/rm -rf ${PYTHON_ROOTFS_DEPLOY_DIR}/lib/python2.7/sqlite3
        /bin/rm -rf ${PYTHON_ROOTFS_DEPLOY_DIR}/lib/python2.7/idlelib
        /bin/rm -rf ${PYTHON_ROOTFS_DEPLOY_DIR}/share
        /bin/rm -rf ${PYTHON_ROOTFS_DEPLOY_DIR}/lib/python2.7/config/libpython2.7.a
        /bin/rm -rf ${PYTHON_ROOTFS_DEPLOY_DIR}/lib/python2.7/test/audiodata

==

I set the PYTHONPATH point to /opt/Python-2.7.8/lib/python2.7

Still hit the same error. Am I missing something else?

 



More information about the Python-list mailing list