Code Monkey home page Code Monkey logo

myppy's People

Contributors

benjixx avatar matysek avatar rfk avatar ssorgatem avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

myppy's Issues

Assembler errors when building openssl.

I tried this on a RHEL 5.5 and Ubuntu 12.04 beta. The idea of a portable python on Linux is great, hopefully you can make it work.

When I try to create a new environment on Ubuntu, I get the following errors:

x86cpuid.s: Assembler messages:
x86cpuid.s:8: Error: invalid instruction suffix for push' x86cpuid.s:9: Error: invalid instruction suffix forpush'
x86cpuid.s:10: Error: invalid instruction suffix for push' x86cpuid.s:11: Error: invalid instruction suffix forpush'
x86cpuid.s:13: Error: invalid instruction suffix for pushf' x86cpuid.s:14: Error: invalid instruction suffix forpop'
x86cpuid.s:17: Error: invalid instruction suffix for push' x86cpuid.s:18: Error: invalid instruction suffix forpopf'
x86cpuid.s:19: Error: invalid instruction suffix for pushf' x86cpuid.s:20: Error: invalid instruction suffix forpop'
x86cpuid.s:99: Error: invalid instruction suffix for pop' x86cpuid.s:100: Error: invalid instruction suffix forpop'
x86cpuid.s:101: Error: invalid instruction suffix for pop' x86cpuid.s:102: Error: invalid instruction suffix forpop'
x86cpuid.s:114: Error: invalid instruction suffix for pop' x86cpuid.s:116: Error: relocated field and relocation type differ in signedness x86cpuid.s:130: Error: invalid instruction suffix forpop'
x86cpuid.s:132: Error: relocated field and relocation type differ in signedness
x86cpuid.s:138: Error: invalid instruction suffix for pushf' x86cpuid.s:139: Error: invalid instruction suffix forpop'
x86cpuid.s:143: Error: invalid instruction suffix for push' x86cpuid.s:144: Error: invalid instruction suffix forpush'
x86cpuid.s:161: Error: invalid instruction suffix for pushf' x86cpuid.s:162: Error: invalid instruction suffix forpop'
x86cpuid.s:192: Error: invalid instruction suffix for pop' x86cpuid.s:194: Error: relocated field and relocation type differ in signedness x86cpuid.s:221: Error: invalid instruction suffix forpush'
x86cpuid.s:230: Error: invalid instruction suffix for pop' x86cpuid.s:238: Error: invalid instruction suffix forpush'
x86cpuid.s:257: Error: invalid instruction suffix for pop' make[1]: *** [x86cpuid.o] Error 1 make[1]: Leaving directory/home/amal/work/ppy/build/openssl-1.0.0d.tar.gz/openssl-1.0.0d/crypto'
make: *** [build_crypto] Error 1
make: Leaving directory `/home/amal/work/ppy/build/openssl-1.0.0d.tar.gz/openssl-1.0.0d'
Traceback (most recent call last):
File "./build/scripts-2.7/myppy", line 6, in
res = myppy.main(sys.argv)
File "/home/amal/work/myppy/build/lib.linux-x86_64-2.7/myppy/init.py", line 164, in main
res = cmd.run(target,args) or 0
File "/home/amal/work/myppy/build/lib.linux-x86_64-2.7/myppy/init.py", line 179, in run
target.init()
File "/home/amal/work/myppy/build/lib.linux-x86_64-2.7/myppy/envs/base.py", line 113, in init
self.install(dep,initialising=True,explicit=False)
File "/home/amal/work/myppy/build/lib.linux-x86_64-2.7/myppy/envs/base.py", line 198, in install
self.install(dep,initialising=initialising,explicit=False)
File "/home/amal/work/myppy/build/lib.linux-x86_64-2.7/myppy/envs/base.py", line 206, in install
r.build()
File "/home/amal/work/myppy/build/lib.linux-x86_64-2.7/myppy/recipes/base.py", line 86, in build
self._make()
File "/home/amal/work/myppy/build/lib.linux-x86_64-2.7/myppy/recipes/base.py", line 105, in _make
self._generic_make()
File "/home/amal/work/myppy/build/lib.linux-x86_64-2.7/myppy/recipes/linux.py", line 81, in _generic_make
self.target.do(cmd,env=env)
File "/home/amal/work/myppy/build/lib.linux-x86_64-2.7/myppy/envs/base.py", line 139, in do
subprocess.check_call(cmdline,env=env,stdin=stdin,
*kwds)
File "/usr/lib/python2.7/subprocess.py", line 511, in check_call
raise CalledProcessError(retcode, cmd)
subprocess.CalledProcessError: Command '('make', 'CC=apgcc', 'CXX=apg++', '-C', u'/home/amal/work/ppy/build/openssl-1.0.0d.tar.gz/openssl-1.0.0d/.')' returned non-zero exit status 2

I searched the net and I made the following change to the openssl recipe:

CONFIGURE_ARGS = ["linux-elf","shared"]

CONFIGURE_ARGS = ["linux-x86_64","shared"]

the assembler errors went away, but I get the following errors:

    APPNAME=openssl OBJECTS="openssl.o verify.o asn1pars.o req.o dgst.o dh.o dhparam.o enc.o passwd.o gendh.o errstr.o ca.o pkcs7.o crl2p7.o crl.o rsa.o rsautl.o dsa.o dsaparam.o ec.o ecparam.o x509.o genrsa.o gendsa.o genpkey.o s_server.o s_client.o speed.o s_time.o apps.o s_cb.o s_socket.o app_rand.o version.o sess_id.o ciphers.o nseq.o pkcs12.o pkcs8.o pkey.o pkeyparam.o pkeyutl.o spkac.o smime.o cms.o rand.o engine.o ocsp.o prime.o ts.o" \
    LIBDEPS=" $LIBRARIES -ldl" \
    link_app.${shlib_target}

make[2]: Entering directory /home/amal/work/ppy/build/openssl-1.0.0d.tar.gz/openssl-1.0.0d/apps' ca.o: In functionca_main':
ca.c:(.text+0x1a26): undefined reference to __ctype_toupper@GLIBC_2.0' enc.o: In functionshow_ciphers':
enc.c:(.text+0xb): undefined reference to __ctype_b@GLIBC_2.0' s_server.o: In functions_server_main':
s_server.c:(.text+0x2a53): undefined reference to __ctype_b@GLIBC_2.0' s_client.o: In functions_client_main':
s_client.c:(.text+0x1012): undefined reference to __ctype_b@GLIBC_2.0' rand.o: In functionrand_main':
rand.c:(.text+0x1c0): undefined reference to __ctype_b@GLIBC_2.0' ../libcrypto.so: undefined reference to**ctype_tolower'
../libcrypto.so: undefined reference to __ctype_b' collect2: ld returned 1 exit status make[2]: *** [link_app.gnu] Error 1 make[2]: Leaving directory/home/amal/work/ppy/build/openssl-1.0.0d.tar.gz/openssl-1.0.0d/apps'
make[1]: * [openssl] Error 2
make[1]: Leaving directory /home/amal/work/ppy/build/openssl-1.0.0d.tar.gz/openssl-1.0.0d/apps' make: *** [build_apps] Error 1 make: Leaving directory/home/amal/work/ppy/build/openssl-1.0.0d.tar.gz/openssl-1.0.0d'
Traceback (most recent call last):
File "./build/scripts-2.7/myppy", line 6, in
res = myppy.main(sys.argv)
File "/home/amal/work/myppy/build/lib.linux-x86_64-2.7/myppy/__init
.py", line 164, in main
res = cmd.run(target,args) or 0
File "/home/amal/work/myppy/build/lib.linux-x86_64-2.7/myppy/init.py", line 179, in run
target.init()
File "/home/amal/work/myppy/build/lib.linux-x86_64-2.7/myppy/envs/base.py", line 113, in init
self.install(dep,initialising=True,explicit=False)
File "/home/amal/work/myppy/build/lib.linux-x86_64-2.7/myppy/envs/base.py", line 198, in install
self.install(dep,initialising=initialising,explicit=False)
File "/home/amal/work/myppy/build/lib.linux-x86_64-2.7/myppy/envs/base.py", line 206, in install
r.build()
File "/home/amal/work/myppy/build/lib.linux-x86_64-2.7/myppy/recipes/base.py", line 86, in build
self._make()
File "/home/amal/work/myppy/build/lib.linux-x86_64-2.7/myppy/recipes/base.py", line 105, in _make
self._generic_make()
File "/home/amal/work/myppy/build/lib.linux-x86_64-2.7/myppy/recipes/linux.py", line 81, in _generic_make
self.target.do(cmd,env=env)
File "/home/amal/work/myppy/build/lib.linux-x86_64-2.7/myppy/envs/base.py", line 139, in do
subprocess.check_call(cmdline,env=env,stdin=stdin,
*kwds)
File "/usr/lib/python2.7/subprocess.py", line 511, in check_call
raise CalledProcessError(retcode, cmd)
subprocess.CalledProcessError: Command '('make', 'CC=apgcc', 'CXX=apg++', '-C', u'/home/amal/work/ppy/build/openssl-1.0.0d.tar.gz/openssl-1.0.0d/.')' returned non-zero exit status 2

On RHEL 5.5, I got a similar error building openssl but linker told me that I need to recompile with -fPIC options.

Any help would be appreciated.

Thanks,
-- Amal

Some implementation hints and questions

Hi. It seems I can’t add inline comments to README.rst, as github renders it to HTML instead of showing the source, so here are comments. I am a Python core developer in charge of distutils, BTW.

Myppy is a set of tools for building and managing a portable python environment.
The end result is something similar in spirit to portable python_ but can
be built for a variety of different platforms.

You should also compare it to virtualenv.

Currently targeted build environments are linux-i686 and OSX.

Why only i686?

Scripts installed by easy_install and pip embed the absolute path to the
interpreter in the shebang line; they should be replaced by a loader stub
that finds python at runtime.

This is controllable with the --executable option of the build_scripts command.

distutils and sysconfig embed the absolute library paths as they were at
build time, meaning you can't properly build C-extensions if you move the
environment around. They should be patched in a simlar way to virtualenv.

This may be changed in Python itself, as we want to support virtualenv-like functionality in the interpreter for 3.3.

Why, everything that something like portable python_ is good for, but on
Linux or OSX instead of Windows! Use it as a convenient portable scripting or
testing environment, or to run multiple python versions side-by-side.

Is it also useful to put a Python on a USB stick and use it anywhere?

/usr/bin/gcc-4.0 not found on Lion

environment: MacOS X 10.7.2; default python 2.7.1, myppy-0.1.0 (cloned as of commit be8b7d9)

Hi I'm running myppy for the first time. I made a new directory and ran:

  myppy build_dir init

and got the following error:

  make: /usr/bin/gcc-4.0: No such file or directory

I do have gcc 4.2 installed but it is located in /usr/bin/gcc.
The following symbolic linking workaround seemed to help a little:

   sudo ln -s /usr/bin/gcc /usr/bin/gcc-4.0

No ppc support on Lion

environment: MacOS X 10.7.2; default python 2.7.1, myppy-0.1.0 (cloned as of commit be8b7d9)

Sorry to bother you once again. I got the following error (http://pastebin.com/EQws8kWt) when I tried the following command.

  myppy build_dir init

I believe this is because Lion no longer supports ppc.
Is there a command line argument I can pass to target only x86 / x86_64?

Thanks

new recipes for myppy

Hi,

thank you very much for this great tools. I was searching for portable python for linux and myppy was the only one I could found.

I created a new recipes to install a few python packages with .so libraries. It includes recipes for python modules:

PIL
MySQL-python
psycopg2
PyXML
M2crypto
simplejson
setproctitle

You can find the patch at:
http://dl.dropbox.com/u/16651681/myppy-0.1.0-new_recipes-mysql_postgres_bindings.patch

Not sure if it conforms to your coding standards, but at least it works for me.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.