Skip to content

move the distutils shim module back to a plain module - #11

Closed
nitzmahone wants to merge 1 commit into
python-cffi:mainfrom
nitzmahone:shim_to_module
Closed

move the distutils shim module back to a plain module#11
nitzmahone wants to merge 1 commit into
python-cffi:mainfrom
nitzmahone:shim_to_module

Conversation

@nitzmahone

Copy link
Copy Markdown
Member
  • MANIFEST.in, the source layout, and pytest's default sys.path behavior conspired to mask a busted package, even though we were testing against the built package. pytest adds cwd to the path first, and since the cffi is in the root (grr), even though we're testing against the installed wheel, pytest loaded the subpackage from the source, masking that it was missing from the actual package (due to flat inclusions in MANIFEST.in). This is a longer-term problem that should be addressed by moving to a standard src/ layout, and possibly also by bringing _cffi_backend in as a subpackage, but there are likely many dragons there with wheels that assume the presence of the top-level package.
* MANIFEST.in, the source layout, and pytest's default sys.path behavior conspired to mask a busted package, even though we were testing against the built package. `pytest` adds cwd to the path first, and since the `cffi` is in the root (grr), even though we're testing against the installed wheel, pytest loaded the subpackage from the source, masking that it was missing from the actual package (due to flat inclusions in MANIFEST.in). This is a longer-term problem that should be addressed by moving to a standard `src/` layout, and possibly also by bringing `_cffi_backend` in as a subpackage, but there are likely many dragons there with wheels that assume the presence of the top-level package.
@nitzmahone

Copy link
Copy Markdown
Member Author

included in #12

@nitzmahone nitzmahone closed this Sep 26, 2023
@nitzmahone
nitzmahone deleted the shim_to_module branch September 26, 2023 05:16
colesbury pushed a commit to colesbury/cffi that referenced this pull request Jun 26, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

1 participant