From a827f338d531a270db61d49780c0a43199363afe Mon Sep 17 00:00:00 2001 From: Thomas Waldmann Date: Mon, 8 Apr 2019 22:07:51 +0200 Subject: [PATCH 1/2] improve manifest / package data management, fixes #373 setuptools-scm manages the MANIFEST automatically considering all committed files, we only need to define exceptions from that rule. setup.py: remove package_data, not needed if we use: - include_package_data=True - exclude_package_data (if needed) --- MANIFEST.in | 24 +++++++++--------------- setup.py | 24 ++---------------------- 2 files changed, 11 insertions(+), 37 deletions(-) diff --git a/MANIFEST.in b/MANIFEST.in index 33609f9..cecec12 100644 --- a/MANIFEST.in +++ b/MANIFEST.in @@ -1,15 +1,9 @@ -include README.rst CHANGES.rst LICENSE AUTHORS -include setup.cfg setup.py -include conftest.py -recursive-include docs * -recursive-exclude docs *.pyc -recursive-exclude docs *.pyo -recursive-include nsupdate/locale *.po -recursive-include nsupdate/locale *.mo -recursive-include nsupdate/static * -recursive-include nsupdate/templates * -recursive-include nsupdate/login/templates * -recursive-include nsupdate/main/templates * -recursive-include nsupdate/accounts/templates * -prune docs/_build - +# stuff we need to include into the sdist is handled automatically by +# setuptools_scm - it includes all git-committed files. +# but we want to include some non-committed files/dirs needed in +# the sdist and exclude some committed files/dirs not needed in the sdist: +exclude .gitattributes .gitignore .travis.yml +exclude manage.py requirements.txt +prune .tx +prune logo +prune scripts/travis diff --git a/setup.py b/setup.py index 17689e5..6aba432 100644 --- a/setup.py +++ b/setup.py @@ -20,28 +20,8 @@ setup( keywords="dyndns ddns dynamic dns django", packages=find_packages('src', exclude=['_tests', ]), package_dir={'': 'src'}, - package_data={ - 'nsupdate': [ - 'templates/*.html', - 'templates/includes/*.html', - 'static/*.html', - 'static/*.png', - 'static/css/*.css', - 'locale/*/LC_MESSAGES/*', - ], - 'nsupdate.accounts': [ - 'templates/accounts/*.html', - 'templates/registration/*.html', - 'templates/registration/*.txt', - ], - 'nsupdate.login': [ - 'templates/*.html', - ], - 'nsupdate.main': [ - 'templates/main/*.html', - 'templates/main/includes/*.html', - ], - }, + # See also the MANIFEST.in file. + # We want to install all the files in the package directories: include_package_data=True, zip_safe=False, platforms='any', From e8eaf58295a4e86162a7cc19f7f71d20971026fd Mon Sep 17 00:00:00 2001 From: Thomas Waldmann Date: Mon, 8 Apr 2019 22:08:37 +0200 Subject: [PATCH 2/2] fix pathes in transifex config for src/ based layout --- .tx/config | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.tx/config b/.tx/config index a33d51f..56aa3f9 100644 --- a/.tx/config +++ b/.tx/config @@ -2,7 +2,7 @@ host = https://www.transifex.com [nsupdateinfo.djangopo] -file_filter = nsupdate/locale//LC_MESSAGES/django.po -source_file = nsupdate/locale/en/LC_MESSAGES/django.po +file_filter = src/nsupdate/locale//LC_MESSAGES/django.po +source_file = src/nsupdate/locale/en/LC_MESSAGES/django.po source_lang = en