# HG changeset patch # User Goffi # Date 1570131816 -7200 # Node ID 471d3b7fc282d96849867eb8b91fa49f8e438831 # Parent f7d6ae06c42fb46efe68fe031a790fca26761b47 install: fixed setup.py by using find_packages + MANIFEST.in diff -r f7d6ae06c42f -r 471d3b7fc282 setup.py --- a/setup.py Tue Aug 13 08:56:22 2019 +0200 +++ b/setup.py Thu Oct 03 21:43:36 2019 +0200 @@ -18,21 +18,9 @@ # along with this program. If not, see . import os -import sys -from setuptools import setup - -base = None -NAME = 'sat_templates' -is_wheel = 'bdist_wheel' in sys.argv +from setuptools import setup, find_packages -# https://stackoverflow.com/a/36693250 - -def get_package_data(directory): - paths = [] - for (path, directories, filenames) in os.walk(directory): - for filename in filenames: - paths.append(os.path.join('..', path, filename)) - return paths +NAME = 'sat_templates' with open(os.path.join(NAME, 'VERSION')) as f: @@ -63,16 +51,17 @@ author='Association « Salut à Toi »', author_email='contact@salut-a-toi.org', url='https://salut-a-toi.org', - classifiers=['Development Status :: 3 - Alpha', - 'Programming Language :: Python :: 2.7', - 'Programming Language :: Python :: 2 :: Only', - 'License :: OSI Approved :: GNU Affero General Public License v3 or later (AGPLv3+)', - ], + classifiers=[ + 'Development Status :: 3 - Alpha', + 'Programming Language :: Python :: 2.7', + 'Programming Language :: Python :: 2 :: Only', + 'License :: OSI Approved :: GNU Affero General Public License v3 or later ' + '(AGPLv3+)', + ], install_requires=[], setup_requires=['setuptools_scm'] if is_dev_version else [], use_scm_version=sat_templates_dev_version if is_dev_version else False, - packages=['sat_templates'], - package_data={'sat_templates': get_package_data('sat_templates') }, + packages=find_packages(), zip_safe=False, )