Replies: 1 comment 1 reply
-
Yes, that's right. It is a design decision - I think if you've got more
than 1 module, putting them into a package is usually a good idea (maybe
not always, but there are other packaging tools people can use if Flit
isn't suitable).
The import name matches the project name by default, but you can specify a
different name if you want. E.g. my project pynsist uses nsist as the
import name. But it still has to be one module/package.
This sentence in the docs is meant to say this: "Flit packages a single
importable module or package at a time..." But it's a tricky thing to say
precisely and clearly.
…On Thu, 31 Aug 2023, 05:12 David Zaslavsky, ***@***.***> wrote:
Hello! I'm trying to help improve the packaging workflow of a project that
uses flit, called offpunk <https://git.sr.ht/~lioploum/offpunk>. The
project's structure is, shall we say, a bit *minimalist*: it puts all its
.py files directly at the top level of the Git repository, with no src
directory, no __init__.py, no packages of any sort. When I build a wheel
from this project, the only Python file that gets included in the wheel is
the one that matches the project's name, offpunk.py. So naturally I went
looking for a way to change that, but I'm not finding one. In fact, I get
the impression from the documentation that flit is specifically meant not
to handle that case, although I haven't found it to be clearly stated
anywhere. So my question is:
- Is it accurate that, when building a wheel, flit is only capable of
including a single module or package that matches the project name?
- And if so, was that an intentional design choice? (more for my
curiosity than anything else)
I figured I'd ask here so I can make sure I'm passing on the right
information to the person I've been discussing with who works on the
project.
Thanks for the work you do!
—
Reply to this email directly, view it on GitHub
<#655>, or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AACQB5KNEDMN264E56HOPJ3XX76LFANCNFSM6AAAAAA4FM5NKI>
.
You are receiving this because you are subscribed to this thread.Message
ID: ***@***.***>
|
Beta Was this translation helpful? Give feedback.
1 reply
Answer selected by
diazona
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Hello! I'm trying to help improve the packaging workflow of a project that uses flit, called offpunk. The project's structure is, shall we say, a bit minimalist: it puts all its
.py
files directly at the top level of the Git repository, with nosrc
directory, no__init__.py
, no packages of any sort. When I build a wheel from this project, the only Python file that gets included in the wheel is the one that matches the project's name,offpunk.py
. So naturally I went looking for a way to change that, but I'm not finding one. In fact, I get the impression from the documentation that flit is specifically meant not to handle that case, although I haven't found it to be clearly stated anywhere. So my question is:I figured I'd ask here so I can make sure I'm passing on the right information to the person I've been discussing with who works on the project.
Thanks for the work you do!
Beta Was this translation helpful? Give feedback.
All reactions