changeset 221:471d3b7fc282

install: fixed setup.py by using find_packages + MANIFEST.in
author Goffi <goffi@goffi.org>
date Thu, 03 Oct 2019 21:43:36 +0200
parents f7d6ae06c42f
children 2d18cd81eb4b
files setup.py
diffstat 1 files changed, 10 insertions(+), 21 deletions(-) [+]
line wrap: on
line diff
--- 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 <http://www.gnu.org/licenses/>.
 
 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,
 )