← All tasks
pythonsendgrid/python-http-client #131Not a task: already works

setup.py includes tests directory in package data

envgap__sendgrid__python-http-client-131

01 / FAILURE SIGNATURE

As reported upstream

No identifying execution failure has been captured.
Not a benchmark task.
  • The project already builds and runs before the fix, so there is nothing to repair.

02 / ENVIRONMENT RECIPE

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

03 / ORIGINAL ISSUE TEXT

sendgrid/python-http-client #131 · read the original issue
#### Issue Summary



setup.py includes all packages (containing an __init__.py) using find_packages(). This is a problem because it will include the `tests` directory as a top level importable module in the local app, breaking our own tests that happen to live in a directory with the same name.



#### Steps to Reproduce



1. `pip install python-http-client`

2. `ls /usr/local/lib/python3.7/site-packages/` and observe `tests` is there as a top level importable package

3. `import tests` from local app will import python-http-client's tests, not the app's tests



Either __init__.py should be excluded from the package data, or (rather) the entire tests directory.



#### Technical details:



* python-http-client 3.2.0+

* Python Version: 3.7

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
[]