Skip to content

Commit

Permalink
Use find_namespace_packages (#2357)
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
matrss authored May 16, 2024
1 parent 531cb75 commit 523c40d
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -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')

Expand Down Expand Up @@ -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,
Expand Down

0 comments on commit 523c40d

Please sign in to comment.