diff options
author | Cristián Maureira-Fredes <cristian.maureira-fredes@qt.io> | 2023-03-06 13:42:27 +0100 |
---|---|---|
committer | Cristián Maureira-Fredes <Cristian.Maureira-Fredes@qt.io> | 2023-03-21 13:49:42 +0100 |
commit | ffb87075e3c4ea4b0a2dd15321af8c1921e33164 (patch) | |
tree | de244668134396b72ca56accbe060298edc4a337 | |
parent | c38b238f8633f1806ee837f839afcb184455ca44 (diff) |
build: remove examples from wheels and installation
To reduce the size and cluttering of wheels and installations
the examples are not including any longer.
The recommended way to get examples now is to download them
directly from the Example Gallery in the documentation page.
The option no-examples was removed.
[ChangeLog][pyside6] Examples are not included in the wheels anymore
and the option no-example was removed.
Change-Id: I94fb24f9ffd6c55e2762e7c2e380b0f0ffe0bf61
Fixes: PYSIDE-2247
Reviewed-by: Adrian Herrmann <adrian.herrmann@qt.io>
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
-rw-r--r-- | build_scripts/options.py | 4 | ||||
-rw-r--r-- | build_scripts/platforms/unix.py | 10 | ||||
-rw-r--r-- | build_scripts/platforms/windows_desktop.py | 10 | ||||
-rw-r--r-- | build_scripts/wheel_files.py | 21 | ||||
-rw-r--r-- | create_wheels.py | 2 | ||||
-rw-r--r-- | sources/shiboken6/doc/examples/samplebinding.rst | 3 |
6 files changed, 6 insertions, 44 deletions
diff --git a/build_scripts/options.py b/build_scripts/options.py index ec9d4783a..5d4c44203 100644 --- a/build_scripts/options.py +++ b/build_scripts/options.py @@ -200,7 +200,6 @@ class CommandMixin(object): ('ignore-git', None, 'Do update subrepositories'), ('skip-docs', None, 'Skip documentation build (deprecated)'), ('build-docs', None, 'Build the API documentation'), - ('no-examples', None, 'Do not build examples'), ('no-jom', None, 'Do not use jom (MSVC)'), ('build-tests', None, 'Build tests'), ('use-xvfb', None, 'Use Xvfb for testing'), @@ -263,7 +262,6 @@ class CommandMixin(object): self.ignore_git = False self.skip_docs = False self.build_docs = False - self.no_examples = False self.no_jom = False self.build_tests = False self.use_xvfb = False @@ -378,8 +376,8 @@ class CommandMixin(object): OPTION['IGNOREGIT'] = self.ignore_git OPTION['SKIP_DOCS'] = self.skip_docs OPTION['BUILD_DOCS'] = self.build_docs - OPTION['NOEXAMPLES'] = self.no_examples OPTION['BUILDTESTS'] = self.build_tests + OPTION['NO_JOM'] = self.no_jom OPTION['XVFB'] = self.use_xvfb OPTION['REUSE_BUILD'] = self.reuse_build diff --git a/build_scripts/platforms/unix.py b/build_scripts/platforms/unix.py index a97a94019..0c26297e2 100644 --- a/build_scripts/platforms/unix.py +++ b/build_scripts/platforms/unix.py @@ -202,16 +202,6 @@ def prepare_packages_posix(pyside_build, _vars, cross_build=False): _filter=["*.pyi", "py.typed"], _vars=_vars) - if not OPTION["NOEXAMPLES"] and not is_android: - def pycache_dir_filter(dir_name, parent_full_path, dir_full_path): - if fnmatch.fnmatch(dir_name, "__pycache__"): - return False - return True - # examples/* -> <setup>/{st_package_name}/examples - copydir(Path(pyside_build.script_dir) / "examples", - "{st_build_dir}/{st_package_name}/examples", - force=False, _vars=_vars, dir_filter_function=pycache_dir_filter) - # copy the jar files if is_android: copydir( diff --git a/build_scripts/platforms/windows_desktop.py b/build_scripts/platforms/windows_desktop.py index d0a44e410..ff748385b 100644 --- a/build_scripts/platforms/windows_desktop.py +++ b/build_scripts/platforms/windows_desktop.py @@ -175,16 +175,6 @@ def prepare_packages_win32(pyside_build, _vars): _filter=pdbs, recursive=False, _vars=_vars) - if not OPTION["NOEXAMPLES"]: - def pycache_dir_filter(dir_name, parent_full_path, dir_full_path): - if fnmatch.fnmatch(dir_name, "__pycache__"): - return False - return True - # examples/* -> <setup>/{st_package_name}/examples - copydir(Path(pyside_build.script_dir) / "examples", - destination_dir / "examples", - force=False, _vars=_vars, dir_filter_function=pycache_dir_filter) - if _vars['ssl_libs_dir']: # <ssl_libs>/* -> <setup>/{st_package_name}/openssl copydir("{ssl_libs_dir}", destination_dir / "openssl", diff --git a/build_scripts/wheel_files.py b/build_scripts/wheel_files.py index 77dcdf523..148bca6df 100644 --- a/build_scripts/wheel_files.py +++ b/build_scripts/wheel_files.py @@ -25,7 +25,6 @@ class ModuleData: include: List[str] = field(default_factory=list) glue: List[str] = field(default_factory=list) metatypes: List[str] = field(default_factory=list) - examples: List[str] = field(default_factory=list) plugins: List[str] = field(default_factory=list) # For special cases when a file/directory doesn't fall into @@ -55,7 +54,6 @@ class ModuleData: self.glue.append(f"qt{_lo}.cpp") if not len(self.metatypes): self.metatypes.append(f"qt6{_lo}_relwithdebinfo_metatypes.json") - self.examples.append(f"{_lo}") # The PySide6 directory that gets packaged by the build_scripts # 'prepare_packages()' has a certain structure that depends on @@ -89,7 +87,6 @@ class ModuleData: self.typesystems = [f"typesystems/{i}" for i in self.typesystems] self.include = [f"include/{i}" for i in self.include] self.glue = [f"glue/{i}" for i in self.glue] - self.examples = [f"examples/{i}" for i in self.examples] def macos_pyside_wrappers_lib(self, s): if s.startswith("Qt"): @@ -193,10 +190,10 @@ def wheel_files_pyside_addons() -> List[ModuleData]: # Functions that hold the information of all the files that needs # to be included for the module to work, including Qt libraries, -# examples, typesystems, glue, etc. +# typesystems, glue, etc. def module_QtCore() -> ModuleData: # QtCore - data = ModuleData("Core", examples=["corelib"]) + data = ModuleData("Core") _typesystems = [ "common.xml", @@ -225,12 +222,6 @@ def module_QtCore() -> ModuleData: data.extra_files.append("Qt/libexec/rcc") data.extra_files.append("Qt/libexec/qt.conf") - data.examples.append("samplebinding") - data.examples.append("utils") - - if sys.platform == "darwin": - data.examples.append("macextras") - # *.py data.extra_dirs.append("support") @@ -273,8 +264,6 @@ def module_QtCore() -> ModuleData: data.translations.append("qt_help_*") data.translations.append("qt_*") - data.extra_files.append("examples/examples.pyproject") - # plugins data.plugins.append("platforms") data.plugins.append("platformthemes") @@ -339,10 +328,6 @@ def module_QtWidgets() -> ModuleData: else: data.extra_files.append("Qt/libexec/uic") - data.examples.append("widgetbinding") - data.examples.append("scriptableapplication") - data.examples.append("external") - return data @@ -476,7 +461,6 @@ def module_QtQml() -> ModuleData: ] data.lib.append("libpyside6qml") - data.examples.append("declarative") data.plugins.append("qmltooling") data.translations.append("qtdeclarative_*") if sys.platform == "win32": @@ -642,7 +626,6 @@ def module_Qt3DCore() -> ModuleData: ] data.plugins.extend(_plugins) - data.examples.append("3d") return data diff --git a/create_wheels.py b/create_wheels.py index 3fc11729e..ec04416c4 100644 --- a/create_wheels.py +++ b/create_wheels.py @@ -57,7 +57,7 @@ def get_manifest(wheel_name: str, data: List[ModuleData]) -> str: if field == "ext": continue for line in getattr(module, field): - if field in ("examples", "extra_dirs", "qml", "plugins"): + if field in ("extra_dirs", "qml", "plugins"): lines.append(f"graft PySide6/{line}") elif field == "qtlib" and sys.platform == "darwin": lines.append(f"graft PySide6/{line}") diff --git a/sources/shiboken6/doc/examples/samplebinding.rst b/sources/shiboken6/doc/examples/samplebinding.rst index 17a5bd38f..dde704ea3 100644 --- a/sources/shiboken6/doc/examples/samplebinding.rst +++ b/sources/shiboken6/doc/examples/samplebinding.rst @@ -237,7 +237,8 @@ Try running it to see if the ice creams are delivered. .. note:: You can find the sources for this example under - :file:`<PYTHON_ENV_ROOT>/site-packages/lib/PySide6/examples/samplebinding`. + `examples/samplebinding` in the `pyside-setup repository + <https://code.qt.io/cgit/pyside/pyside-setup.git/tree/examples/samplebinding>`_. Refer to the following topics for detailed information about using Shiboken: * :doc:`Type System Variables <../typesystem_variables>` |