Replies: 2 comments 2 replies
-
No, it's not possible out of the box. Maybe, you could implement a way to only include/exclude the gui one in the wheel conditionally, like through an in-tree PEP 517 back-end and But if you do foresee a CLI-only app being useful, then maybe the PyPI users would feel the same. In this case, I'd recommend splitting that into two dists, one depending on the other. Don't reinvent the wheel. (pun intended) |
Beta Was this translation helpful? Give feedback.
-
Looking into the docu of pip I also couldn't find an option to make pip use of an alternative toml file instead of As more as I think about it I become warm with the idea to skip the 1-distro-with-2-import-packages-approach and just make two distro-packages. Maybe I can keep two distro-packages in one git repo?
Technically it seems possible but isn't it wired/hacky? Ever seen a project structure like this? |
Beta Was this translation helpful? Give feedback.
-
I have a Distribution Package named
bit_demo
containing the two Import Packagesbitcli
andbitgui
.When I install it via
python3 -m pip install bit_demo
I do have the two import packages in my system.Would it be possible to install
bit_demo
but only withbitcli
?Can I install a distribution package excluding some of its import packages?
For example
Background of my question
I think about the distro maintainers (e.g. Debian, Arch) who need to create a deb file of my upstream repo.
There need to be two packages in the distro. When users only want to use the CLI interface without GUI (e.g. on a headless server) they would do
apt install bitcli
. But when they need it with GUI they would doapt install bitgui
(andbitlic
comes in as dependency).Technically
bitcli
can live alone. Butbitgui
is useless alone because it use a lot ofbitcli
code. Because of that I don't think it would be a good idea to create two separate git repositories. I would prefer to keep them together as one repo/distribution package.Beta Was this translation helpful? Give feedback.
All reactions