deploy-ng: Rename some options

* include_paths -> include_patterns
  * exclude_paths -> exclude_patterns
  * deploy_platforms -> platforms
This commit is contained in:
Mitchell Stokes 2017-11-26 15:33:00 -08:00
parent 33fd302a8e
commit 905b15df01
3 changed files with 17 additions and 17 deletions

View File

@ -46,11 +46,11 @@ class build_apps(distutils.core.Command):
self.console_apps = {}
self.copy_paths = []
self.rename_paths = {}
self.include_paths = []
self.exclude_paths = []
self.include_patterns = []
self.exclude_patterns = []
self.include_modules = {}
self.exclude_modules = {}
self.deploy_platforms = []
self.platforms = []
self.plugins = []
self.requirements_path = './requirements.txt'
self.pypi_extra_indexes = []
@ -111,8 +111,8 @@ class build_apps(distutils.core.Command):
self.rename_paths = _parse_dict(self.rename_paths)
self.copy_paths = _parse_list(self.copy_paths)
self.include_paths = _parse_list(self.include_paths)
self.exclude_paths = _parse_list(self.exclude_paths)
self.include_patterns = _parse_list(self.include_patterns)
self.exclude_patterns = _parse_list(self.exclude_patterns)
self.include_modules = _parse_list(self.include_modules)
self.exclude_modules = _parse_list(self.exclude_modules)
self.plugins = _parse_list(self.plugins)
@ -123,18 +123,18 @@ class build_apps(distutils.core.Command):
else:
src, _ = path
assert os.path.exists(src), 'Copy path source does not exist: {}'.format(src)
assert self.deploy_platforms, 'At least one deploy platform must be defined'
assert self.platforms, 'At least one deploy platform must be defined'
assert os.path.exists(self.requirements_path), 'Requirements.txt path does not exist: {}'.format(self.requirements_path)
def run(self):
if not self.deploy_platforms:
if not self.platforms:
platforms = [p3d.PandaSystem.get_platform()]
use_wheels = False
elif isinstance(self.deploy_platforms, basestring):
platforms = [self.deploy_platforms]
elif isinstance(self.platforms, basestring):
platforms = [self.platforms]
use_wheels = True
else:
platforms = self.deploy_platforms
platforms = self.platforms
use_wheels = True
self.announce('Building platforms: {0}'.format(','.join(platforms)), distutils.log.INFO)
@ -349,10 +349,10 @@ class build_apps(distutils.core.Command):
'*.pyc',
'*.py',
]
ignore_copy_list += self.exclude_paths
ignore_copy_list += self.exclude_patterns
ignore_copy_list = [p3d.GlobPattern(i) for i in ignore_copy_list]
include_copy_list = [p3d.GlobPattern(i) for i in self.include_paths]
include_copy_list = [p3d.GlobPattern(i) for i in self.include_patterns]
def check_pattern(src, pattern_list):
# Normalize file paths across platforms
@ -673,10 +673,10 @@ class bdist_apps(distutils.core.Command):
def run(self):
build_cmd = self.get_finalized_command('build_apps')
if not build_cmd.deploy_platforms:
if not build_cmd.platforms:
platforms = [p3d.PandaSystem.get_platform()]
else:
platforms = build_cmd.deploy_platforms
platforms = build_cmd.platforms
build_base = build_cmd.build_base
self.run_command('build_apps')

View File

@ -4,7 +4,7 @@ setup(
name="asteroids",
options = {
'build_apps': {
'include_paths': [
'include_patterns': [
'*.png',
'*.jpg',
'*.egg',
@ -16,7 +16,7 @@ setup(
'pandagl',
'p3openal_audio',
],
'deploy_platforms': [
'platforms': [
'manylinux1_x86_64',
'macosx_10_6_x86_64',
'win32',

View File

@ -22,7 +22,7 @@ setup(
'pkg_resources._vendor.packaging.requirements',
] + pytest.freeze_includes(),
},
'deploy_platforms': [
'platforms': [
'manylinux1_x86_64',
'macosx_10_6_x86_64',
'win32',