5
submitted 1 month ago* (last edited 1 month ago) by AstroLightz@lemmy.world to c/python@programming.dev

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.

you are viewing a single comment's thread
view the rest of the comments
[-] one_old_coder@piefed.social 1 points 1 month ago

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 1 month 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).

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

Python

7996 readers
9 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