• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

IntelPython / numba-dpex / 8975428395

06 May 2024 08:34PM UTC coverage: 86.494% (+0.01%) from 86.48%
8975428395

push

github

web-flow
Merge pull request #1450 from IntelPython/fix/manifest

Remove MANIFEST.in

665 of 749 branches covered (88.79%)

Branch coverage included in aggregate %.

0 of 1 new or added line in 1 file covered. (0.0%)

5451 of 6322 relevant lines covered (86.22%)

0.86 hits per line

Source File
Press 'n' to go to next uncovered line, 'b' for previous

0.0
/setup.py
1
# SPDX-FileCopyrightText: 2020 - 2023 Intel Corporation
2
#
3
# SPDX-License-Identifier: Apache-2.0
4

5

6
import re
×
7

8
import versioneer
×
NEW
9
from setuptools import find_namespace_packages, find_packages
×
10
from skbuild import setup
×
11

12
"""Top level setup.py file. Uses scikit-build.
×
13

14
    This will build the numba_dpex project. There are two ways to run this file.
15
    First command line argument is `install` and the other is `develop`. The
16
    argument `install` will build the _dpexrt_runtime target and install all the
17
    python modules into _skbuild build directory, where `develop` will just
18
    build the _dpexrt_runtime target and will not copy any python module into
19
    _skbuild.
20

21
    `install` command:
22
        ~$ python setup.py install
23

24
    `develop` command:
25
        ~$ python setup.py develop
26

27
    To uninstall:
28
        ~$ pip uninstall numba-dpex
29

30
    NOTE: This script doesn't support pypa/build, pypa/installer or other
31
    standards-based tools like pip, yet.
32

33
    TODO: Support `pip install`
34
"""
35

36

37
def to_cmake_format(version: str):
×
38
    """Convert pep440 version string into a cmake compatible string."""
39
    # cmake version just support up to 4 numbers separated by dot.
40
    # https://peps.python.org/pep-0440/
41
    # https://cmake.org/cmake/help/latest/command/project.html
42

43
    match = re.search(r"^\d+(?:\.\d+(?:\.\d+(?:\.\d+)?)?)?", version)
×
44
    if not match:
×
45
        raise Exception("Unsupported version")
×
46

47
    return match.group(0)
×
48

49

50
# Get the project version
51
__version__ = versioneer.get_version()
×
52

53
# Main setup
54
setup(
×
55
    version=__version__,
56
    # https://github.com/pypa/pip/issues/11221
57
    url="https://github.com/IntelPython/numba-dpex",
58
    # Must be passed vis setup.py:
59
    # https://github.com/scikit-build/scikit-build/issues/864
60
    # TODO: switch to pyproject toml after switching to scikit-build-core
61
    packages=find_packages(".")
62
    + find_namespace_packages(".", include=["numba_dpex.examples.*"]),
63
    # Needs for examples.
64
    # TODO: change to false once move examples out of package.
65
    include_package_data=True,
66
    cmake_args=[
67
        "-DNUMBA_DPEX_VERSION:STRING={0:s}".format(
68
            to_cmake_format(str(__version__))
69
        ),
70
    ],
71
)
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc