Instagram / Instagram/LibCST

Importable libcst.tests.pyre

Open
#1,175 0 comments 0 reactions 0 assignees View on GitHub
enhancement
Dominant language
Python
Stars
1.9k
Forks
229
PR merge metrics
No merged PRs in 30d

Description

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](https://github.com/user-attachments/files/16331669/_log.txt) with all dependencies and steps to reproduce included.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.