Instagram / LibCST

A concrete syntax tree parser and serializer library for Python that preserves many aspects of Python's abstract syntax tree
https://libcst.readthedocs.io/
Other
1.56k stars 192 forks source link

Importable libcst.tests.pyre #1175

Open mcepl opened 4 months ago

mcepl commented 4 months ago

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.