tintinweb / scapy-ssl_tls

SSL/TLS layers for scapy the interactive packet manipulation tool
GNU General Public License v2.0
418 stars 156 forks source link

setup.py copies scapy-ssl_tls layers definitions to wrong folder when wheel is used #143

Open rbo-ktw opened 5 years ago

rbo-ktw commented 5 years ago

Scapy-ssl_tls/setup.py copies its layers to:

C:\Python27\Lib\site-packages\python27\lib\site-packages\scapy\layers

when wheel package is installed.

get_layer_files_dst() method returns list of tuples (<folder>, [<files>]), where <folder> is an absolute path. According to distutils documentation it should copy these files where we expect, but it does not work because wheel module does not support absolute paths, and they end up being installed relative to site-packages (more info).

To solve this problem, there should be a relative (to sys.prefix) path returned.

tintinweb commented 5 years ago

Hi @rbo-ktw,

would you be able to provide a PR fixing the issue?

thanks, tin

rbo-ktw commented 5 years ago

Hi @tintinweb

I have cloned the scapy-ssl_tls repo, created my private branch to provide a fix, but I can not push it:

remote: Permission to tintinweb/scapy-ssl_tls.git denied to rbo-ktw.
fatal: unable to access 'https://github.com/tintinweb/scapy-ssl_tls.git/': The requested URL returned error: 403

I am totally new to github, so maybe it is my fault. But I think it is due to lack of permission, which can be granted by project owner, isn't it?

tintinweb commented 5 years ago

Hi @rbo-ktw,

fork to your github. checkout a new branch (git checkout -b fix/setup_wheel), commit changes, push to your github account and click the "create pull request" button that appears on your github repo page after pushing a new branch to your repo.

cheers, tin

rbo-ktw commented 5 years ago

Hi @tintinweb

Thanks for your help. Here is PR: #147.