-
Notifications
You must be signed in to change notification settings - Fork 137
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
WIP: allow src dir #260
WIP: allow src dir #260
Conversation
Added some tests. |
Ok. I see that some code coverage targets aren't getting hit. |
My god, we could settle pypa/packaging.python.org#320 finally. |
If I understood correctly, @takluyver concern was not the implementation itself, but the possibility of confusing the users by offering too many options before the discussion is settled. (For further info, pypa/packaging.python.org#320 and especially pypa/packaging.python.org#320) |
@theacodes, I don't think this changes anything since @takluyver stated that he doesn't want users to have additional knobs when using flit. |
No extra nobs. It works without changing existing functionality and without adding any new options. |
Regarding confusing users. It is inevitable, given the benefits of using |
@okken Any luck on getting the test coverage up to snuff? |
@okken Haven't you mentioned somewhere that flit already works with src directories? Could you link it here? |
Flit does not work with src directories. However, I don’t think it needs to. It would be cool if it had this option. But I’ve convinced myself that the major reasons to use src are solvable by running tests from the tests directory. I’ve not written it up, but I discussed it here: https://testandcode.com/80 |
A lot of major Python projects have switched to the And a few major Python projects have adopted a non-conventional So while this PR improve the situation, it would be better if we add an optional Opinionated is fine but not in this case. |
@glyph, re "> @okken Any luck on getting the test coverage up to snuff?" I did this PR as a proof of concept. @takluyver If this PR was updated to increase the code coverage, would consider merging it? |
I've previously stated "Flit does not work with src directories. However, I don’t think it needs to." |
@takluyver (any word on @okken's question re: coverage?) |
I've extended the testing to cover all the changes I made. |
yes. coverage is back up to the target |
The test reason for using src has workarounds other than using src. |
I realize I might've sounded skeptical in my previous comment (#260 (comment)), so clarifying -- I do think this is an improvement that would be good to have in flit. This is essentially a superset of the functionality that I'd want in flit so I'm very much on board for this. |
Sorry I've been silent for so long, and thanks for being patient. I'm going to try to get to Flit 2.0 in the next week or so. |
Flit 2.0rc2 is now out (rc1 went a bit wrong). See the release notes, and please give it a test drive by installing with Until a final release is out, you'll need to manually adjust pyproject.toml to allow pre-release versions of flit_core for the build backend: [build-system]
requires = ["flit_core >=2.0rc2,<3"]
build-backend = "flit_core.buildapi" |
Hi. How can I create a new package with src layout with flit? I couldn't find the way in the docs. I'm using flit 2.3.0. Edit: I think I get it now. We can just create the layout by ourselves and flit will find the files accordingly. Is that it? |
RE " How can I create a new package with src layout with flit?"
Just have a src dir with your code in it and run "flit init".
- Brian
…On Thu, Aug 20, 2020 at 11:49 PM Julin S ***@***.***> wrote:
Hi. How can I create a new package with src layout with flit?
I couldn't find the way in the docs.
I'm using flit 2.3.0.
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#260 (comment)>, or
unsubscribe
<https://github.com/notifications/unsubscribe-auth/AAL64ZAY5IN5I3I6BG5ASSDSBYKHTANCNFSM4HIAD2HA>
.
|
Is there a part in docs which mentions package creation with src layout? If not, can it be added? I could find brief descriptions of it under release history but not much. |
I'd really like to use flit for projects with src directories.
The flit project already has 2 types of projects.
foo.py
__init__.py
), likefoo/__init__.py
This would add a 3rd and 4th.
src/foo.py
src/foo/__init__.py
It has minimal impact on the rest of the code, only touching 2 functions.
All existing tests still pass.