Skip to content
This repository was archived by the owner on Jun 3, 2025. It is now read-only.
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
3 changes: 2 additions & 1 deletion Makefile
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
.PHONY: build docs test

BUILDDIR := $(PWD)
BUILD_ARGS := # set nightly to build nightly release
CHECKDIRS := examples tests src utils notebooks setup.py
PYCHECKGLOBS := 'examples/**/*.py' 'scripts/**/*.py' 'src/**/*.py' 'tests/**/*.py' 'utils/**/*.py' setup.py
DOCDIR := docs
Expand Down Expand Up @@ -43,7 +44,7 @@ docs:

# creates wheel file
build:
python3 setup.py sdist bdist_wheel
python3 setup.py sdist bdist_wheel $(BUILD_ARGS)

# clean package
clean:
Expand Down
23 changes: 19 additions & 4 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,8 @@
# limitations under the License.

import os
import sys
from datetime import date
from distutils import log
from fnmatch import fnmatch
from typing import Dict, List, Tuple
Expand All @@ -21,11 +23,24 @@
from setuptools.command.install import install


_PACKAGE_NAME = "deepsparse"
_VERSION = "0.1.0"
_NIGHTLY = "nightly" in sys.argv

if _NIGHTLY:
_PACKAGE_NAME += "-nightly"
_VERSION += "." + date.today().strftime("%Y%m%d")
# remove nightly param so it does not break bdist_wheel
sys.argv.remove("nightly")


# File regexes for binaries to include in package_data
binary_regexes = ["*/*.so", "*/*.so.*", "*.bin", "*/*.bin"]


_deps = ["numpy>=1.16.3", "onnx>=1.5.0,<1.8.0", "requests>=2.0.0", "sparsezoo>=0.1.0"]
_deps = ["numpy>=1.16.3", "onnx>=1.5.0,<1.8.0", "requests>=2.0.0"]

_nm_deps = [f"{'sparsezoo-nightly' if _NIGHTLY else 'sparsezoo'}~={_VERSION}"]

_dev_deps = [
"black>=20.8b1",
Expand Down Expand Up @@ -69,7 +84,7 @@ def _setup_package_data() -> Dict:


def _setup_install_requires() -> List:
return _deps
return _nm_deps + _deps


def _setup_extras() -> Dict:
Expand All @@ -85,8 +100,8 @@ def _setup_long_description() -> Tuple[str, str]:


setup(
name="deepsparse",
version="0.1.0",
name=_PACKAGE_NAME,
version=_VERSION,
author="Neuralmagic, Inc.",
author_email="support@neuralmagic.com",
description="CPU runtime that delivers unprecedented performance for sparse models",
Expand Down