Skip to content

Merge wheel changes from gold/2021 #327

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

Merged
merged 1 commit into from
Mar 24, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
19 changes: 19 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,25 @@ For development:
python setup.py develop
```

Install Wheel Package from Pypi
==================================
1. Install dpCtl
```cmd
python -m pip install --index-url https://pypi.anaconda.org/intel/simple -extra-index-url https://pypi.org/simple dpctl
```
Note: dpCtl wheel package is placed on Pypi, but some of its dependencies (like Intel numpy) are in Anaconda Cloud.
That is why install command requires additional intel Pypi channel from Anaconda Cloud.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
That is why install command requires additional intel Pypi channel from Anaconda Cloud.
That is why install command requires additional `intel` Pypi channel from Anaconda Cloud.


2. Set path to Performance Libraries in case of using venv or system Python:
On Linux:
```cmd
export LD_LIBRARY_PATH=<path_to_your_env>/lib
```
On Windows:
```cmd
set PATH=<path_to_your_env>\bin;<path_to_your_env>\Library\bin;%PATH%
```

Using dpCtl
===========
dpCtl relies on DPC++ runtime. With Intel oneAPI installed you could activate it.
Expand Down
30 changes: 20 additions & 10 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -55,29 +55,37 @@
dpctl_sycl_interface_include = os.environ["DPCTL_SYCL_INTERFACE_INCLDIR"]
sycl_lib = os.environ["ONEAPI_ROOT"] + "\compiler\latest\windows\lib"

# Get long description
with open("README.md", "r", encoding="utf-8") as file:
long_description = file.read()


def get_sdl_cflags():
cflags = []
if IS_LIN or IS_MAC:
return [
cflags = [
"-fstack-protector",
"-fPIC",
"-D_FORTIFY_SOURCE=2",
"-Wformat",
"-Wformat-security",
]
elif IS_WIN:
return []
# Add cflags from environment
cflags += os.getenv("CFLAGS", "").split(" ")

return cflags


def get_sdl_ldflags():
ldflags = []
if IS_LIN:
return [
"-Wl,-z,noexecstack,-z,relro,-z,now",
]
elif IS_MAC:
return []
ldflags = ["-Wl,-z,noexecstack,-z,relro,-z,now"]
elif IS_WIN:
return ["/NXCompat", "/DynamicBase"]
ldflags = ["/NXCompat", "/DynamicBase"]
# Add ldflags from environment
ldflags += os.getenv("LDFLAGS", "").split(" ")

return ldflags


def get_other_cxxflags():
Expand Down Expand Up @@ -237,9 +245,11 @@ def _get_cmdclass():

setup(
name="dpctl",
version=versioneer.get_version(),
version=versioneer.get_version().split("+")[0],
cmdclass=_get_cmdclass(),
description="A lightweight Python wrapper for a subset of OpenCL and SYCL.",
long_description=long_description,
long_description_content_type="text/markdown",
license="Apache 2.0",
author="Intel Corporation",
url="https://github.com/IntelPython/dpCtl",
Expand Down