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

Fix for issue 777, restoring versioned library symbolic links in installed package on Linux #778

Merged
merged 1 commit into from
Feb 14, 2022

Conversation

oleksandr-pavlyk
Copy link
Collaborator

@oleksandr-pavlyk oleksandr-pavlyk commented Feb 12, 2022

Closes #777

When scikit-build assembles dpctl, it runs cmake with _skbuild/*/cmake-build being
as its build directory, _skbuild/*/cmake-install being its install directory. It then
runs setuptools.setup to execute build_py steps using _skbuild/*/setuptools as its
build_base. Since sycl interface library is registered in package_data, it is copied
from cmake-install folder (where symbolic links are intact) to setuptools (where
unpatched setuptools.command.build_py command follows them creating
hard copies).

Then, when running install_lib step, files from _skbuild/*/setuptools/lib/dpctl are
copied into site-packages/dpctl using copy_tree function, which also follows
symbolic links this creating hard copies).

This PR transfers logic from pre-scikit-build setup.py to fix hard links as post
setuptools.command.install.run() step).

A test is added to tests/test_service.py to verify that on Linux some of library files
are symbolic links.

@github-actions
Copy link

@coveralls
Copy link
Collaborator

coveralls commented Feb 12, 2022

Coverage Status

Coverage decreased (-0.01%) to 81.619% when pulling b20d217 on bugfix/gh-777 into 902fa01 on master.

When scikit-build assembles dpctl, it runs cmake with "_skbuild/*/cmake-build" being
its build directory, "_skbuild/*/cmake-install" being its install directory. It then
runs setuptools.setup to execute build_py steps using "_skbuild/*/setuptools" as its
build_base. Since sycl interface library is registered in package-data, it is copied
from cmake-install (where is has symbolic links) to setuptools (where unpatched
setuptools.command.build_py command follows them turning them into hard files).

Then, when running install_lib step, files from _"skbuild/*/setuptools/lib/dpctl" are
copied into site-packages/dpctl using copy_tree, which also follows symbolic links,
hence turning them into hard links).

This PR transfers logic from pre-scikit-build setup.py to fix hard links as post
setuptools.command.install.run() step).

A test is added to tests/test_service.py to verify that on Linux some of library files
are symbolic links.
setup.py Show resolved Hide resolved
@oleksandr-pavlyk oleksandr-pavlyk enabled auto-merge (squash) February 14, 2022 16:56
@oleksandr-pavlyk oleksandr-pavlyk merged commit f7acaea into master Feb 14, 2022
@diptorupd diptorupd deleted the bugfix/gh-777 branch February 14, 2022 17:02
@github-actions
Copy link

Deleted rendered PR docs from intelpython.github.com/dpctl, latest should be updated shortly. 🤞

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.

Creating links for libDPCTLSyclInterface.so in building via python setup.py install
4 participants