Skip to content

Include font_management in wheel py-modules#237

Open
datalifenyc wants to merge 1 commit into
originalankur:mainfrom
datalifenyc:fix/wheel-missing-font-management
Open

Include font_management in wheel py-modules#237
datalifenyc wants to merge 1 commit into
originalankur:mainfrom
datalifenyc:fix/wheel-missing-font-management

Conversation

@datalifenyc

Copy link
Copy Markdown

Problem

Installing maptoposter as a package (e.g. pip install git+https://github.com/originalankur/maptoposter.git) produces a wheel that contains only create_map_poster.py. Importing it then fails immediately:

$ python -m create_map_poster --help
Traceback (most recent call last):
  ...
  File ".../site-packages/create_map_poster.py", line 24, in <module>
    from font_management import (
ModuleNotFoundError: No module named 'font_management'

font_management.py lives at the repo root next to create_map_poster.py, but [tool.setuptools] py-modules lists only create_map_poster, so the wheel never includes it. Running from a source checkout hides the bug (the sibling file resolves via cwd), which is why the CLI works in-repo but the installed package is broken.

Fix

Add font_management to py-modules so both top-level modules ship in the wheel.

Verified locally on Windows/Python 3.13: pip install from this branch → python -m create_map_poster --city "Galway" --country "Ireland" ... renders a poster; installing from current main reproduces the ModuleNotFoundError.

🤖 Generated with Claude Code

pip-installing from git builds a wheel containing only create_map_poster;
importing it then fails with ModuleNotFoundError: No module named
'font_management', since font_management.py is never packaged.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant