Commit 77125f3a authored by Sunil Mohan Adapa's avatar Sunil Mohan Adapa Committed by Joseph Nuthalapati Don't install directories matching ignore patterns

Signed-off-by: Sunil Mohan Adapa's avatarSunil Mohan Adapa <>
Reviewed-by: Joseph Nuthalapati's avatarJoseph Nuthalapati <>
parent 3be041b2
......@@ -179,7 +179,7 @@ class CustomInstallData(install_data):
def _ignore_data_file(file_name):
"""Ignore common patterns in data files."""
"""Ignore common patterns in data files and directories."""
ignore_patterns = [
r'\.log$', r'\.pid$', r'\.py.bak$', r'\.pyc$', r'\.pytest_cache$',
r'\.sqlite3$', r'\.swp$', r'^#', r'^\.', r'^__pycache__$',
......@@ -214,6 +214,9 @@ def _gather_data_files():
crawl_directory = crawl_directory.rstrip('/')
for path, _, file_names in os.walk(crawl_directory):
target_directory = path[len(crawl_directory):]
if _ignore_data_file(os.path.basename(path)):
for file_name in file_names:
if _ignore_data_file(file_name):
......@@ -267,10 +270,7 @@ setuptools.setup(
tests_require=['pytest', 'pytest-cov', 'pytest-django'],
'': [
'templates/*', 'static/*',
'': ['templates/*', 'static/*', 'locale/*/LC_MESSAGES/*.[pm]o']
exclude_package_data={'': ['*/data/*']},
data_files=_gather_data_files() +
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment