Skip to content

v2.1.0: Package restructure, bflib expansion, PyPI fix#5

Merged
nullhack merged 1 commit into
masterfrom
feature/package-restructure
May 3, 2026
Merged

v2.1.0: Package restructure, bflib expansion, PyPI fix#5
nullhack merged 1 commit into
masterfrom
feature/package-restructure

Conversation

@nullhack
Copy link
Copy Markdown
Owner

@nullhack nullhack commented May 3, 2026

Summary

v2.1.0 fixes the broken PyPI package and adds 16 new bflib programs.

Key Changes

  • Package restructure: Single brainfuck.pybrainfuck/ package with __init__.py, __main__.py, core.py
  • bflib moved into package: brainfuck/bflib/ now ships inside the wheel for installed-package compatibility
  • 16 new bflib programs: div, mod, zero, move, swap, not, and, or, eq, if, sqrt, p5, p32, p48, p65, newline (31 total)
  • -f flag documented: Fixes Only small programs allowed. #2 — large programs can be loaded via file instead of shell argument
  • PyPI packaging fixed: setuptools.packages.find, package-data for *.bf files, python -m brainfuck entry point
  • Lint fixes: Auto-formatted with ruff

Breaking Changes

  • Import path unchanged: from brainfuck import BrainFuck still works via __init__.py re-exports
  • python -m brainfuck now works as entry point
  • Library import paths now use __file__-relative resolution for wheel compatibility

Test Results

  • All 36 pytest tests pass
  • Wheel builds and installs correctly
  • bflib imports work from installed package
  • python -m brainfuck works
  • -f FILE flag works for large programs

- Restructure from single brainfuck.py to brainfuck/ package with
  __init__.py, __main__.py, and core.py
- Move bflib/ into brainfuck/bflib/ for installed-package compatibility
- Add setuptools package-data config for bflib/*.bf inclusion in wheel
- Add 16 new bflib programs: div, mod, zero, move, swap, not, and, or,
  eq, if, sqrt, p5, p32, p48, p65, newline (31 total)
- Fix library import path resolution to use __file__-relative paths
- Add python -m brainfuck entry point via __main__.py
- Update pyproject.toml: version 2.1.0, setuptools config, remove agents-smith
- Fix pytest config to discover *_test.py files in features/
- Auto-fix lint formatting in core.py and test files
- Fixes #2: Large programs can now be loaded via -f FILE flag
@nullhack nullhack merged commit 4d5bbd5 into master May 3, 2026
@nullhack nullhack deleted the feature/package-restructure branch May 3, 2026 08:59
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.

Only small programs allowed.

1 participant