invernizzi / scapy-http

Support for HTTP in Scapy
Other
301 stars 77 forks source link

setup.py does not respect $DESTDIR #25

Open blshkv opened 7 years ago

blshkv commented 7 years ago

the issue is similar to https://github.com/dib-lab/khmer/issues/331 (just a random link with the same issue).

>>> Install scapy-http-1.8 into /var/tmp/portage/dev-python/scapy-http-1.8/image/ category dev-python
 * python3_4: running distutils-r1_run_phase distutils-r1_python_install
/usr/bin/python3.4 setup.py install --root=/var/tmp/portage/dev-python/scapy-http-1.8/image/_python3.4
running install
running build
running build_py
Installing the HTTP layer extension into Scapy...
error: [Errno 13] Permission denied: '/usr/lib64/python3.4/site-packages/scapy/layers/http.py'
 * ERROR: dev-python/scapy-http-1.8::pentoo failed (install phase):
 *   (no error message)
 * 
 * Call stack:
 *     ebuild.sh, line  115:  Called src_install
 *   environment, line 2648:  Called distutils-r1_src_install
 *   environment, line  832:  Called _distutils-r1_run_foreach_impl 'distutils-r1_python_install'
 *   environment, line  318:  Called python_foreach_impl 'distutils-r1_run_phase' 'distutils-r1_python_install'
 *   environment, line 2204:  Called multibuild_foreach_variant '_python_multibuild_wrapper' 'distutils-r1_run_phase' 'distutils-r1_python_install'
 *   environment, line 1510:  Called _multibuild_run '_python_multibuild_wrapper' 'distutils-r1_run_phase' 'distutils-r1_python_install'
 *   environment, line 1508:  Called _python_multibuild_wrapper 'distutils-r1_run_phase' 'distutils-r1_python_install'
 *   environment, line  542:  Called distutils-r1_run_phase 'distutils-r1_python_install'
 *   environment, line  800:  Called distutils-r1_python_install
 *   environment, line  716:  Called esetup.py 'install' '--root=/var/tmp/portage/dev-python/scapy-http-1.8/image/_python3.4'
 *   environment, line 1055:  Called die
 * The specific snippet of code:
 *       "${@}" || die "${die_args[@]}";
 * 
 * If you need support, post the output of `emerge --info '=dev-python/scapy-http-1.8::pentoo'`,
 * the complete build log and the output of `emerge -pqv '=dev-python/scapy-http-1.8::pentoo'`.
 * The complete build log is located at '/var/tmp/portage/dev-python/scapy-http-1.8/temp/build.log'.
 * The ebuild environment file is located at '/var/tmp/portage/dev-python/scapy-http-1.8/temp/environment'.
 * Working directory: '/var/tmp/portage/dev-python/scapy-http-1.8/work/scapy-http-1.8'
 * S: '/var/tmp/portage/dev-python/scapy-http-1.8/work/scapy-http-1.8'

>>> Failed to emerge dev-python/scapy-http-1.8, Log file:
blshkv commented 7 years ago

It should be probably passed using a "--root" argument, and used as a prefix in target_path variable. Here is a good example how to do it: http://stackoverflow.com/questions/18725137/how-to-obtain-arguments-passed-to-setup-py-from-pip-with-install-option

blshkv commented 7 years ago

here is a similar solution: http://stackoverflow.com/questions/677577/distutils-how-to-pass-a-user-defined-parameter-to-setup-py