Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Importable libcst.tests.pyre #1175

Open
mcepl opened this issue Jul 22, 2024 · 0 comments
Open

Importable libcst.tests.pyre #1175

mcepl opened this issue Jul 22, 2024 · 0 comments
Labels
enhancement New feature or request

Comments

@mcepl
Copy link

mcepl commented Jul 22, 2024

While packaging on openSUSE while building the wheel, I get:

[   10s]   /usr/lib/python3.10/site-packages/setuptools/command/build_py.py:215: _Warning: Package 'libcst.tests.pyre' is absent from the `packages` configuration.
[   10s]   !!
[   10s] 
[   10s]           ********************************************************************************
[   10s]           ############################
[   10s]           # Package would be ignored #
[   10s]           ############################
[   10s]           Python recognizes 'libcst.tests.pyre' as an importable package[^1],
[   10s]           but it is absent from setuptools' `packages` configuration.
[   10s] 
[   10s]           This leads to an ambiguous overall configuration. If you want to distribute this
[   10s]           package, please make sure that 'libcst.tests.pyre' is explicitly added
[   10s]           to the `packages` configuration field.
[   10s] 
[   10s]           Alternatively, you can also rely on setuptools' discovery methods
[   10s]           (for example by using `find_namespace_packages(...)`/`find_namespace:`
[   10s]           instead of `find_packages(...)`/`find:`).
[   10s] 
[   10s]           You can read more about "package discovery" on setuptools documentation page:
[   10s] 
[   10s]           - https://setuptools.pypa.io/en/latest/userguide/package_discovery.html
[   10s] 
[   10s]           If you don't want 'libcst.tests.pyre' to be distributed and are
[   10s]           already explicitly excluding 'libcst.tests.pyre' via
[   10s]           `find_namespace_packages(...)/find_namespace` or `find_packages(...)/find`,
[   10s]           you can try to use `exclude_package_data`, or `include-package-data=False` in
[   10s]           combination with a more fine grained `package-data` configuration.
[   10s] 
[   10s]           You can read more about "package data files" on setuptools documentation page:
[   10s] 
[   10s]           - https://setuptools.pypa.io/en/latest/userguide/datafiles.html
[   10s] 
[   10s] 
[   10s]           [^1]: For Python, any directory (with suitable naming) can be imported,
[   10s]                 even if it does not contain any `.py` files.
[   10s]                 On the other hand, currently there is no concept of package data
[   10s]                 directory, all directories are treated like packages.
[   10s]           ********************************************************************************
[   10s] 
[   10s]   !!
[   10s]     check.warn(importable)

Complete build log with all dependencies and steps to reproduce included.

@zsol zsol added the enhancement New feature or request label Jul 30, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants