Qix-/better-exceptions

ModuleNotFoundError: No module named 'better_exceptions.integrations'

sumanthratna opened this issue · 3 comments

Hi @Qix-, sorry to bother you again.

The Django middleware integration still doesn't work because of an error I didn't catch earlier.

Reproduction

Local Editable Install

  1. git clone --depth 1 https://github.com/Qix-/better-exceptions.git
  2. cd better-exceptions
  3. python3 -m pip install -e .
  4. python3 -c "import better_exceptions.integrations" raises no error!

VCS Install

  1. python3 -m pip install git+https://github.com/Qix-/better-exceptions.git
  2. python3 -c "import better_exceptions.integrations" raises a ModuleNotFoundError

PyPI Install

  1. python3 -m pip install better-exceptions==0.3.1
  2. python3 -c "import better_exceptions.integrations" raises a ModuleNotFoundError

so my guess is that somewhere in setup.py, package subdirectories are not copied into the wheel (and the source .tar.gz file on PyPI contains the integrations directory while the .whl doesn't)

I think using setuptools.find_packages() will fix this (or we could hard-code the packages kwarg). I can try creating a PR but I want to make sure this won't break anything with the PTH file

Environment

  • reproduced with Python 3.8.6 (pip version 20.2.1) and Python 3.9.1 (pip version 20.2.3)
  • macOS Big Sur version 11.0.1 (20B29)
Qix- commented

Ah yeah this is my fault, I forgot about this.

Python package management is a huge pain :/

Qix- commented

Okay released as 0.3.2, let me know if that fixes it :)

Yup, 97c0b20 fixed the issue. Thanks again!