Skip to content

Commit

Permalink
Merge pull request #581 from nanonyme/nanonyme/bytecode
Browse files Browse the repository at this point in the history
Force bytecode directories and files always to exclude
  • Loading branch information
takluyver committed Oct 20, 2022
2 parents db45ff0 + a4d6678 commit 7b13fb2
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 2 deletions.
3 changes: 2 additions & 1 deletion doc/pyproject_toml.rst
Original file line number Diff line number Diff line change
Expand Up @@ -420,7 +420,8 @@ These paths:
- Should match the case of the files they refer to, as case-insensitive matching
is platform dependent

Exclusions have priority over inclusions.
Exclusions have priority over inclusions. Bytecode is excluded by default and cannot
be included.

.. note::

Expand Down
6 changes: 5 additions & 1 deletion flit_core/flit_core/config.py
Original file line number Diff line number Diff line change
Expand Up @@ -147,8 +147,12 @@ def prep_toml_config(d, path):
loaded_cfg.sdist_include_patterns = _check_glob_patterns(
dtool['sdist'].get('include', []), 'include'
)
exclude = [
"**/__pycache__",
"**.pyc",
] + dtool['sdist'].get('exclude', [])
loaded_cfg.sdist_exclude_patterns = _check_glob_patterns(
dtool['sdist'].get('exclude', []), 'exclude'
exclude, 'exclude'
)

data_dir = dtool.get('external-data', {}).get('directory', None)
Expand Down

0 comments on commit 7b13fb2

Please sign in to comment.