Skip to content

Commit

Permalink
Use default src include if all modules given
Browse files Browse the repository at this point in the history
If doing an sdist with the explicit modules dict, this has the
implication of pypdfium2.egg-info moving from src/ to the project root.

Not sure if this is desired, so better stick with the previous state.
The individual module code passage is used only with wheels, not with
sdist, and wheels do not seem to have .egg-info.
  • Loading branch information
mara004 committed Oct 1, 2023
1 parent 4ae0661 commit 6a3b4e4
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion setupsrc/pypdfium2_setup/setup_base.py
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,12 @@ def has_ext_modules(self):

# NOTE handle python_requires dynamically so we could adjust it depending on which modules are included
def get_setup_kws(modnames):
moddirs = {n: f"src/{n}" for n in [ModulesSpec_Dict[n] for n in modnames]}

if modnames == ModulesAll:
moddirs = {"": "src"}
else:
moddirs = {n: f"src/{n}" for n in [ModulesSpec_Dict[n] for n in modnames]}

return dict(
version = VerNamespace["V_PYPDFIUM2"],
package_dir = moddirs,
Expand Down

0 comments on commit 6a3b4e4

Please sign in to comment.