From 523c40d60615147e96f44adee04b3fcd0295ae4e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Matthias=20Ri=C3=9Fe?= <9308656+matrss@users.noreply.github.com> Date: Thu, 16 May 2024 13:12:47 +0200 Subject: [PATCH] Use find_namespace_packages (#2357) This fixes warnings about sub-directories of mslib/ that were previously not part of the packages because they don't contain __init__.py, but that were still recognized and added as packages due to a deprecated behavior of setuptools. The change from exclude to include is due to the excludes not being exhaustive. Multiple consecutive builds would add the entirety of build/ into the package with the excludes. Since we know that mslib and its sub-packages are the only ones that should be distributed we can just be explicit about that. --- setup.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/setup.py b/setup.py index 29e3a0653..c0f80484b 100644 --- a/setup.py +++ b/setup.py @@ -29,7 +29,7 @@ # it to generate your project's PyPI page. import os from past.builtins import execfile -from setuptools import setup, find_packages +from setuptools import setup, find_namespace_packages long_description = open('README.md').read() execfile('mslib/version.py') @@ -57,7 +57,7 @@ license="Apache-2.0", url="https://github.com/Open-MSS/MSS", platforms="any", - packages=find_packages(exclude=['tests*', 'tutorials*']), + packages=find_namespace_packages(include=["mslib", "mslib.*"]), namespace_packages=[], include_package_data=True, zip_safe=False,