← All tasks
pythonaio-libs/yarl #646Not a task: not reproduced

Binary distributions such as wheels include C sources

envgap__aio-libs__yarl-646

01 / FAILURE SIGNATURE

As reported upstream

No identifying execution failure has been captured.
Not a benchmark task.
  • In a clean container the reported failure did not reproduce, or the known fix did not make the project run.

02 / ENVIRONMENT RECIPE

Base commit
90577d8077e3466c01722a817085669c605e169d
Manifest
setup.py
Reproduce
Awaiting issue-specific recipe
Run under trace
Awaiting a meaningful runtime command

03 / ORIGINAL ISSUE TEXT

aio-libs/yarl #646 · read the original issue
### Describe the bug



Binary distributions such as wheels include C sources (`_quoting_c.c`), but these sources don’t provide value in binary distributions and their size is significant.



See also https://github.com/aio-libs/frozenlist/issues/250.



### To Reproduce



```

$ python3 -m venv _e

$ . _e/bin/activate

(_e) $ pip install yarl

(_e) $ ls -l _e/lib64/python*/site-packages/yarl/

```



### Expected behavior



These should ideally be present in the sdist but not in the bdist, where they don’t really provide any value.



### Logs/tracebacks



```python-traceback

$ python3 -m venv _e

$ . _e/bin/activate

(_e) $ pip install yarl

(_e) $ ls -l _e/lib64/python*/site-packages/yarl/

total 1368

-rw-rw-r--. 1 ben ben    154 Dec  7 23:42 __init__.py

-rw-rw-r--. 1 ben ben   3703 Dec  7 23:42 __init__.pyi

drwxrwxr-x. 1 ben ben    190 Dec  7 23:42 __pycache__

-rw-rw-r--. 1 ben ben     13 Dec  7 23:42 py.typed

-rw-rw-r--. 1 ben ben 455467 Dec  7 23:42 _quoting_c.c

-rwxrwxr-x. 1 ben ben 861488 Dec  7 23:42 _quoting_c.cpython-310-aarch64-linux-gnu.so

-rw-rw-r--. 1 ben ben    447 Dec  7 23:42 _quoting_c.pyi

-rw-rw-r--. 1 ben ben  11498 Dec  7 23:42 _quoting_c.pyx

-rw-rw-r--. 1 ben ben    519 Dec  7 23:42 _quoting.py

-rw-rw-r--. 1 ben ben   6386 Dec  7 23:42 _quoting_py.py

-rw-rw-r--. 1 ben ben  36031 Dec  7 23:42 _url.py

```





### Python Version



```console

$ python --version

Python 3.10.0

```





### multidict Version



```console

$ python -m pip show multidict

Name: multidict

Version: 5.2.0

[…]

```





### yarl Version



```console

$ python -m pip show yarl

Name: yarl

Version: 1.7.2

[…]

```





### OS



Fedora Linux 35—but this issue is platform-independent



### Additional context



A suggested fix is to add to `setup(…)` in `setup.py`:



```python

    exclude_package_data={"": ["*.c"]},

```



which will exclude these sources from binary distributions without affecting source distributions.



It’s possible to exclude some of the Cython files as well, but in `frozenlist` the preference was to keep them in the bdist for debugging purposes.



PR to follow.



### Code of Conduct



- [X] I agree to follow the aio-libs Code of Conduct
Continue on GitHub ↗

04 / LABELS

Labels from the report text only; not yet run

No supported category has been assigned.

Label rules and the text that matched
[]