ethereum / pyethapp

MIT License
1.28k stars 604 forks source link

MacPorts compatibility issue #278

Open amamaenko opened 6 years ago

amamaenko commented 6 years ago

Checklist

Here is the list of steps that are different so far as I got, when installing MacOS with MacPorts

Steps

1) first install the C++ libraries that we would need later:

sudo port install automake libtool pkgconfig libffi gmp openssl

Note that the MacPorts has pkgconfig library name rather than pkg-config in Brew or linuxes.

2) Next step is to build one of pyethapp dependencies - the scrypt module using a trick. The reason for this trick is described at: https://cryptography.io/en/latest/installation/#building-cryptography-on-os-x, and a solution is described at: https://github.com/ethereum/pyethapp/issues/209 Basically, the pyethapp setup relies on system packages for openssl, so, instead of modifying its setup scripts, we're going to simply preinstall the dependency manually: env LDFLAGS="-L/opt/local/lib" CFLAGS="-I/opt/local/include" pip install scrypt

3) Installing from an egg/wheel doesn't work, so clone the pytheapp module and run the "Development" setup cd pyethapp USE_PYETHEREUM_DEVELOP=1 python setup.py develop

4) THE TRICKIEST: Fix the devp2p module. In the devp2p/crypto.py fix the openssl import path. Make sure to include the MacPorts' library into the lib path. Correct lib path below:

_openssl_lib_paths = ['/usr/local/Cellar/openssl/', '/opt/local/bin/']

System/environment

Expected behaviour

Instead of step 3, the install should go fine

Observed behaviour

required ciphers {'aes-128-ctr'} not available in openssl library'

Steps to reproduce

After the above installation start:

python[3] -m pyethapp.app