this post was submitted on 02 Jul 2026
5 points (85.7% liked)

Python

7963 readers
1 users here now

Welcome to the Python community on the programming.dev Lemmy instance!

๐Ÿ“… Events

PastNovember 2023

October 2023

July 2023

August 2023

September 2023

๐Ÿ Python project:
๐Ÿ’“ Python Community:
โœจ Python Ecosystem:
๐ŸŒŒ Fediverse
Communities
Projects
Feeds

founded 3 years ago
MODERATORS
 

So I have a Python package following the project structure outlined by the Python Packaging User Guide (Without the tests/ directory). Let's call it Package A.

This package can be used alongside another package, Package B, however no proper compatibility exists in Package A to support Package B's rendering system.

I want to make a compatibility package, Package AB, to make Package B's systems work with Package A. It shares the same dependencies as Package A, however it has Package B as a dependency.

How should I setup my project structure for Package AB? Should it be its own project directory? Should it be nested inside Package A's src directory?

Additionally, I have Sphinx /w Hatch setup with Package A for documentation. Depending on the setup chosen above, how should I setup documentation for Package AB?

Some things to note:

  • Package AB would use classes and methods from Package A and Package B
  • Package B's license (MIT) is compatible with Package A (GPLv3). Package AB would be licensed under the same as Package A

If more details are required, let me know.

top 2 comments
sorted by: hot top controversial new old
[โ€“] one_old_coder@piefed.social 1 points 2 days ago (1 children)

Stupid questions:

  • What is this "rendering system"? Is it optional or mandatory?
  • Why not put the compatibility layer/class/thing inside Package A?
[โ€“] AstroLightz@lemmy.world 1 points 2 days ago

What is this "rendering system"?

Basically, it's a TUI library for getting user input. It has different types of prompts, like text and multiple choice.

Is it optional or mandatory?

For use with Package A: Optional. However with Package AB: Mandatory, as this compatibility package would essentially replace certain functions in Package B.

Why not put the compatibility layer/class/thing inside Package A?

I don't want Package A having Package B as a dependency when it's not being used. I only want Package B as a dependency when using Package A with Package B (AB).