Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use relative path to scapy layers directory #147

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

rbo-ktw
Copy link

@rbo-ktw rbo-ktw commented Oct 22, 2018

Problem:

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 (, []), where 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.

Solution:

Relative (to sys.prefix) path to scapy installation directory is used now.

Problem:

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.

Solution:

Relative (to sys.prefix) path to scapy installation directory is used now.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant