Skip to content

Commit

Permalink
Use find_namespace_packages to get needed subdirectories to silent lo…
Browse files Browse the repository at this point in the history
…ts of warnings (onnx#4457)

* use find_namespace_packages instead of find_packages

Signed-off-by: Chun-Wei Chen <jacky82226@gmail.com>

* specifiy data

Signed-off-by: Chun-Wei Chen <jacky82226@gmail.com>

* specify needed dirs

Signed-off-by: Chun-Wei Chen <jacky82226@gmail.com>

* fix flake8

Signed-off-by: Chun-Wei Chen <jacky82226@gmail.com>

* remove unnecessary set

Signed-off-by: Chun-Wei Chen <jacky82226@gmail.com>

* fix black

Signed-off-by: Chun-Wei Chen <jacky82226@gmail.com>

Signed-off-by: Chun-Wei Chen <jacky82226@gmail.com>
  • Loading branch information
jcwchen authored and Bjarke Roune committed May 6, 2023
1 parent 361d788 commit 4ffb2bd
Showing 1 changed file with 15 additions and 2 deletions.
17 changes: 15 additions & 2 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -305,8 +305,21 @@ def run(self):
# Packages
################################################################################

# no need to do fancy stuff so far
packages = setuptools.find_packages()
# Add package directories here if you want to package them with the source
include_dirs = [
"onnx.backend.test.cpp*",
"onnx.backend.test.data.*",
"onnx.common",
"onnx.defs.*",
"onnx.examples*",
"onnx.shape_inference",
"onnx.test.cpp",
"onnx.version_converter*",
]

packages = setuptools.find_packages() + setuptools.find_namespace_packages(
include=include_dirs
)

requirements_file = "requirements.txt"
requirements_path = os.path.join(os.getcwd(), requirements_file)
Expand Down

0 comments on commit 4ffb2bd

Please sign in to comment.