exclude of setuptools.find_packages is no use
See original GitHub issueI set packages in setup.py and doing python3 setup.py sdist bdist_wheel to get whl and tar.gz,
setuptools.setup(
...
packages=setuptools.find_packages(exclude=("ictos_common.tests")),
...
then into dist and tar zxf *.tar.gz and find the tests is still here .
so I read the source of setuptools and find something wrong .
class PackageFinder:
"""
Generate a list of all Python packages found within a directory
"""
@classmethod
def find(cls, where='.', exclude=(), include=('*',)):
return list(cls._find_packages_iter(
convert_path(where),
# something wrong
# cls._build_filter('ez_setup', '*__pycache__', *exclude),
cls._build_filter('ez_setup', '*__pycache__', exclude),
# something wrong
cls._build_filter(*include)))
modified like this and tests is gone . so maybe this is a bug .
Issue Analytics
- State:
- Created 3 years ago
- Comments:5 (2 by maintainers)
Top Results From Across the Web
Why find_packages(exclude=xxx) does not work when doing ...
I solved the problem by removing the *.egg-info/ directory : it seems that this directory memorized some older settings...
Read more >Cannot exclude directory · Issue #99 · pypa/wheel - GitHub
I'm unable to exclude a directory 'test', using either MANIFEST.in or setup.py. ... In setup.py: packages=find_packages(exclude=['test', ]),. In each case, sdist ...
Read more >Package Discovery and Namespace Packages - Setuptools
find: ( ; find_packages() ) takes a source directory and two lists of package name patterns to exclude and include, and then returns...
Read more >'exclude' packages option in files section of setup.cfg
With 'setuptools.find_packages', we can specify the package names to exclude.
Read more >How to use the setuptools.find_packages function in ... - Snyk
To help you get started, we've selected a few setuptools.find_packages examples, based on popular ways it is used in public projects.
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
It is my question,Thank you very much for your reply .
I see the problem now. You made a typo in constructing tuple literal, e.g. it is
('aaa',)
not('aaa')
. I hope that helps.