-
-
Notifications
You must be signed in to change notification settings - Fork 2.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
RFC: Source layout reorg #2911
RFC: Source layout reorg #2911
Conversation
18d98ee
to
62181f0
Compare
@wiredfool Thanks for doing this! I'm OK with breaking changes for the sake of moving forward, with less confusion and less historical baggage. |
Pytest strongly recommend this https://docs.pytest.org/en/latest/goodpractices.html and point to https://blog.ionelmc.ro/2014/05/25/python-packaging/#the-structure for more benefits. Not really an issue for me as I usually use a Mac, but is this going to make things harder to develop on Windows, where it's difficult to set up the compiler? As it is, if you don't need to modify C code, you can edit Python code and tests and it'll happily use the compiled C stuff from the the last release pip installed. |
No objections. I'll just say the obvious though - this will break almost every other PR. |
@hugovk It looks like the first build on windows did succeed, it's just that it failed to move the PIL directory out of the way to force test runs against the installed version because the directory isn't there anymore. Similarly, the tests on linux failed due to the PIL directory having been moved, and coverage not being able to find the PIL directory. I think this matches at least one of the pytest recommended source layouts, certainly better than the old layout. @radarhere Yes, it does break PRs, but it also solves a long running pain point. We're at the lowest inventory of PRs in a long while, and we can do this one after the big ones we're merging in this window. |
This branch works on all the docker images OMM, with the pytest branch merged into this one. |
@radarhere Yeah, actually I appreciate you pointing that because I wasn't thinking about it; but I think it's OK too, because it should be easy for PR authors to update their PRs after this change. |
74b9f14
to
cbf2901
Compare
Shall we move _tkmini.h and tkImaging.c from Tk/ as well? |
Yeah, that would make sense. (moving the whole directory at least) |
We've had a bunch of issues with running tests and whatnot from the project directory because our PIL directory doesn't contain the compiled extensions unless you develop in-place. (which I object to, because it leads to problems with having the correct binaries for multiple python versions.)
This PR places all the source in a src directory below the project directory.
This:
python Tests/test_foo.py
python setup.py develop
still works.In short, it makes
make install
work in a sane manner, without breaking other people's workflow.Unfortunately, it also:
I'd rather do this at a major release than some other time, so time is short to say yes or no to this.