cookiecutter-pytest-plugin
cookiecutter-pytest-plugin copied to clipboard
Use src layout
Thank you for the very handy template! Just a curiosity I guess, I created my package, pytest-blah, and there's a source file in the root (pytest_blah.py) along with setup.py etc. When I run python setup.py develop the root containing these files is added to my path, so I can do things like import setup or import pytest_blah directly (I've tried this from outside the root so it's not just a current directory thing).
Have I done something wrong or is that how it's supposed to be? Seems weird to have things like setup.py importable when the package is installed. I ended up making a pytest_blah directory, moving everything from pytest_blah.py into pytest_blah/init.py and putting all the other source files in there and it works as I expect.
EDIT: short example of what I mean: https://gist.github.com/danmur/0489969229281165424b0044f4236b92
Yeah, using a src-layout, i.e. everything below src/
is best practice nowadays.
See #38
Fixed by #61