tartley / colorama

Simple cross-platform colored terminal text in Python
BSD 3-Clause "New" or "Revised" License
3.56k stars 253 forks source link

Move package to a top-level "src" directory #293

Closed jdufresne closed 2 years ago

jdufresne commented 3 years ago

This helps ensure that tox tests the colorama installed to the virtualenv and not otherwise working due to the current working directory.

The tests directory was moved out of the source directory to the top level. Test files don't need to be included in the installed package. They exists for developers, not end users. They still ship with the sdist so downstream packages can run the tests when re-packaging Colorama.

The demos directory has been updated to work with the new directory structure. Its use is now documented in README.rst.

Fixes #278

tartley commented 3 years ago

Thanks heaps for submitting this. I agree that this should happen. Apologies I've been AWOL for ages, but I aim to merge some things and make a release soon, and my gut feeling is that this should be included.

tartley commented 3 years ago

Also, something in Travis failed for python2.7 and pypy. We'll need to figure that out before this can merge. Hugs!

tartley commented 3 years ago

Some people really DO want tests included in sdists: https://github.com/tartley/colorama/pull/183

tartley commented 3 years ago

On reflection, I think I still have enough questions about this change that I'm not going to hold up the imminent release for it. But I'm still keen to get this merged when we can, and will make another release for it when ready.

jdufresne commented 3 years ago

The pytest CI failure is resolved by #325. I've rebased this on that work.

jdufresne commented 3 years ago

The pytest CI failure is resolved by #325. I've rebased this on that work.

That didn't quite work out, so I've grouped the pytest fix in as part of this PR.

tartley commented 2 years ago

This has developed conflicts but I'd like to get it merged, will have a look when I'm back from vacation in July.