From 75d1b23b55dbae20fa6d7f428f550feb1f7cfdc8 Mon Sep 17 00:00:00 2001 From: Nicholas Bollweg Date: Sat, 2 Jan 2021 11:31:15 -0500 Subject: [PATCH 1/2] use setuptools find_packages, exclude tests, docs and examples from distributions --- setup.py | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/setup.py b/setup.py index 96279432ba..c65b72c8ab 100644 --- a/setup.py +++ b/setup.py @@ -1,7 +1,10 @@ import pathlib -from setuptools import setup +from setuptools import ( + find_packages, + setup, +) from setupbase import ( - get_version, find_packages + get_version, ) here = pathlib.Path('.') @@ -17,7 +20,7 @@ long_description = README, long_description_content_type='text/markdown', version = VERSION, - packages = find_packages('.'), + packages = find_packages('.', exclude=['tests*', 'docs*', 'examples*']), include_package_data = True, author = 'Jupyter Development Team', author_email = 'jupyter@googlegroups.com', From b500ceffbee2a4a6428971a21099249a34330af0 Mon Sep 17 00:00:00 2001 From: Nicholas Bollweg Date: Sat, 2 Jan 2021 11:43:37 -0500 Subject: [PATCH 2/2] also remove underlying deprecated wrapper --- setupbase.py | 13 ------------- 1 file changed, 13 deletions(-) diff --git a/setupbase.py b/setupbase.py index 42454ec8d9..45eb06c438 100644 --- a/setupbase.py +++ b/setupbase.py @@ -95,19 +95,6 @@ def ensure_python(specs): raise ValueError('Python version %s unsupported' % part) -def find_packages(top): - """ - Find all of the packages. - """ - import warnings - warnings.warn( - 'Deprecated, please use setuptools.find_packages', - category=DeprecationWarning - ) - from setuptools import find_packages as fp - return fp(top) - - def update_package_data(distribution): """update build_py options to get package_data changes""" build_py = distribution.get_command_obj('build_py')