Skip to content

Commit

Permalink
Packaging: fix warnings
Browse files Browse the repository at this point in the history
Mainly, in the 'packages' argument of setuptools.setup(), the packages
needed to be enumerated. Use find_namespace_packages() as we have a fair
number of data subdirs that don't need any __init__.py.

Remove __pycache__ from global-exclude in MANIFEST.in because
__pycache__ is a directory, not a regular file.
  • Loading branch information
frougon committed Sep 17, 2023
1 parent b5d51a9 commit 21079e7
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 7 deletions.
2 changes: 1 addition & 1 deletion MANIFEST.in
Original file line number Diff line number Diff line change
Expand Up @@ -17,4 +17,4 @@ recursive-include share *.svg *.png *.desktop Makefile
exclude setup.cfg
prune README.Sphinx-build
prune tmp
global-exclude *.pyc __pycache__ .gitignore .gitattributes
global-exclude *.pyc .gitignore .gitattributes
13 changes: 7 additions & 6 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
# have received a copy of this license along with this file. You can also find
# it at <http://www.wtfpl.net/>.

from setuptools import setup, find_packages
from setuptools import setup, find_namespace_packages
import sys
import os
import subprocess
Expand Down Expand Up @@ -70,14 +70,15 @@ def do_setup():
],
keywords=\
'FlightGear,flightgear,flight,simulator,launcher,FFGo,FGo!',
packages=[pypkg_name],
# This would be a bit easier with the “src-layout”
packages=[pypkg_name] + [ "{}.{}".format(pypkg_name, p) for p in
find_namespace_packages(where=pypkg_name) ],
include_package_data=True,
# Files to exclude from installation
exclude_package_data = { '':
['*/COPYING.txt', '*.po', '*.pot',
'*.xcf', '*/thumbnail-no-Pillow.svg',
'*/Makefile', '*/Makefile.py-functions'] },

['COPYING.txt', '*.po', '*.pot',
'*.xcf', 'thumbnail-no-Pillow.svg',
'Makefile', 'Makefile.py-functions'] },
python_requires='~=3.4',
install_requires=['CondConfigParser'],
extras_require = {'images': ['Pillow'], 'geo': ['geographiclib']},
Expand Down

0 comments on commit 21079e7

Please sign in to comment.