mirror of
https://github.com/panda3d/panda3d.git
synced 2025-10-03 10:22:45 -04:00
deploy-ng: use proper patch matching for globs
This commit is contained in:
parent
083e3ecc74
commit
8a9cac8c49
@ -248,11 +248,13 @@ class build_apps(setuptools.Command):
|
|||||||
'libbz2.so.*', 'libz.so.*', 'liblzma.so.*', 'librt.so.*', 'libutil.so.*',
|
'libbz2.so.*', 'libz.so.*', 'liblzma.so.*', 'librt.so.*', 'libutil.so.*',
|
||||||
|
|
||||||
# macOS
|
# macOS
|
||||||
'*foundation.framework*', '*appkit.framework*', '*libstdc++.*.dylib',
|
'/usr/lib/libstdc++.*.dylib',
|
||||||
'*libobjc.*.dylib', '*trustevaluationagent.framework*', '*libz.*.dylib',
|
'/usr/lib/libz.*.dylib',
|
||||||
'*coreservices.framework*', '*applicationservices.framework*',
|
'/usr/lib/libobjc.*.dylib',
|
||||||
'*opengl.framework*', '*carbon.framework*', '*cocoa.framework*',
|
'/usr/lib/libSystem.*.dylib',
|
||||||
'*libsystem.*.dylib', '*libedit.*.dylib'
|
'/usr/lib/libbz2.*.dylib',
|
||||||
|
'/usr/lib/libedit.*.dylib',
|
||||||
|
'/System/Library/**',
|
||||||
]
|
]
|
||||||
self.package_data_dirs = {}
|
self.package_data_dirs = {}
|
||||||
|
|
||||||
@ -325,6 +327,8 @@ class build_apps(setuptools.Command):
|
|||||||
assert num_gui_apps + num_console_apps != 0, 'Must specify at least one app in either gui_apps or console_apps'
|
assert num_gui_apps + num_console_apps != 0, 'Must specify at least one app in either gui_apps or console_apps'
|
||||||
|
|
||||||
self.exclude_dependencies = [p3d.GlobPattern(i) for i in self.exclude_dependencies]
|
self.exclude_dependencies = [p3d.GlobPattern(i) for i in self.exclude_dependencies]
|
||||||
|
for glob in self.exclude_dependencies:
|
||||||
|
glob.case_sensitive = False
|
||||||
|
|
||||||
tmp = self.default_file_handlers.copy()
|
tmp = self.default_file_handlers.copy()
|
||||||
tmp.update(self.file_handlers)
|
tmp.update(self.file_handlers)
|
||||||
@ -768,9 +772,9 @@ class build_apps(setuptools.Command):
|
|||||||
# Copy Game Files
|
# Copy Game Files
|
||||||
self.announce('Copying game files for platform: {}'.format(platform), distutils.log.INFO)
|
self.announce('Copying game files for platform: {}'.format(platform), distutils.log.INFO)
|
||||||
ignore_copy_list = [
|
ignore_copy_list = [
|
||||||
'__pycache__',
|
'**/__pycache__/**',
|
||||||
'*.pyc',
|
'**/*.pyc',
|
||||||
'{}/*'.format(self.build_base),
|
'{}/**'.format(self.build_base),
|
||||||
]
|
]
|
||||||
ignore_copy_list += self.exclude_patterns
|
ignore_copy_list += self.exclude_patterns
|
||||||
ignore_copy_list += freezer_modpaths
|
ignore_copy_list += freezer_modpaths
|
||||||
@ -789,12 +793,12 @@ class build_apps(setuptools.Command):
|
|||||||
for pattern in pattern_list:
|
for pattern in pattern_list:
|
||||||
# If the pattern is absolute, match against the absolute filename.
|
# If the pattern is absolute, match against the absolute filename.
|
||||||
if pattern.pattern[0] == '/':
|
if pattern.pattern[0] == '/':
|
||||||
#print('check ignore: {} {} {}'.format(pattern, src, pattern.matches(abspath)))
|
#print('check ignore: {} {} {}'.format(pattern, src, pattern.matches_file(abspath)))
|
||||||
if pattern.matches(abspath):
|
if pattern.matches_file(abspath):
|
||||||
return True
|
return True
|
||||||
else:
|
else:
|
||||||
#print('check ignore: {} {} {}'.format(pattern, src, pattern.matches(path)))
|
#print('check ignore: {} {} {}'.format(pattern, src, pattern.matches_file(path)))
|
||||||
if pattern.matches(path):
|
if pattern.matches_file(path):
|
||||||
return True
|
return True
|
||||||
return False
|
return False
|
||||||
|
|
||||||
@ -858,7 +862,7 @@ class build_apps(setuptools.Command):
|
|||||||
return
|
return
|
||||||
|
|
||||||
for dep in self.exclude_dependencies:
|
for dep in self.exclude_dependencies:
|
||||||
if dep.matches(name.lower()):
|
if dep.matches_file(name):
|
||||||
return
|
return
|
||||||
|
|
||||||
for dir in search_path:
|
for dir in search_path:
|
||||||
|
@ -5,9 +5,9 @@ setup(
|
|||||||
options = {
|
options = {
|
||||||
'build_apps': {
|
'build_apps': {
|
||||||
'include_patterns': [
|
'include_patterns': [
|
||||||
'*.png',
|
'**/*.png',
|
||||||
'*.jpg',
|
'**/*.jpg',
|
||||||
'*.egg',
|
'**/*.egg',
|
||||||
],
|
],
|
||||||
'gui_apps': {
|
'gui_apps': {
|
||||||
'asteroids': 'main.py',
|
'asteroids': 'main.py',
|
||||||
|
Loading…
x
Reference in New Issue
Block a user