fix source/doc/examples with qstkdrepo changes. (#857)
Some checks failed
Check tox tests / Check packaging 📦 (push) Waiting to run
CodeQL / Analyze (python) (push) Waiting to run
Publish Python 🐍 distributions 📦 to PyPI / Build and publish Python 🐍 distributions 📦 to PyPI (push) Waiting to run
Test on GH actions environment / test (binary, windows-latest, 3.12, 6.6.3) (push) Has been cancelled
Test on GH actions environment / test (standard, ubuntu-latest, 3.12, 6.5.3) (push) Has been cancelled
Test on GH actions environment / test (standard, ubuntu-latest, 3.12, 6.6.3) (push) Has been cancelled
Test on GH actions environment / test (standard, ubuntu-latest, 3.12, 6.8.0) (push) Has been cancelled
Test on GH actions environment / test (standard, ubuntu-latest, 3.12, 6.8.1) (push) Has been cancelled
Test on GH actions environment / test (standard, windows-latest, 3.12, 6.5.3) (push) Has been cancelled
Test on GH actions environment / test (standard, windows-latest, 3.12, 6.6.3) (push) Has been cancelled
Test on GH actions environment / test (standard, windows-latest, 3.12, 6.7.3) (push) Has been cancelled

* fix source/doc/examples with qstkdrepo changes.

This handles all_os/qt/qt6_xyz_src_doc_examples changing
to all_os/qt/qt6/xyz/[unix|windows]_line_endings_src
for both list and install commands.

* configure pylint max-line-length to match others.

* Revert "configure pylint max-line-length to match others."

This reverts commit 8ebba90c36.
This commit is contained in:
tsteven4
2024-12-20 18:03:13 -07:00
committed by GitHub
parent 3f2f59d488
commit f914397685
2 changed files with 21 additions and 4 deletions

View File

@@ -623,7 +623,7 @@ class SrcDocExamplesArchives(QtArchives):
)
def _arch_ext(self) -> str:
return "_src_doc_examples"
return "_" + QtRepoProperty.sde_ext(self.version)
def _base_module_name(self) -> str:
"""

View File

@@ -20,6 +20,7 @@
# CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
import itertools
import operator
import os
import posixpath
import re
import secrets as random
@@ -275,7 +276,7 @@ class ArchiveId:
)
def to_folder(self, version: Version, qt_version_no_dots: str, extension: Optional[str] = None) -> str:
if version >= Version("6.8.0"):
if (version >= Version("6.8.0")) and not ((self.host == "all_os") and (self.target == "qt")):
return "{category}{major}_{ver}/{category}{major}_{ver}{ext}".format(
category=self.category,
major=qt_version_no_dots[0],
@@ -569,6 +570,16 @@ class QtRepoProperty:
return ["qtpdf", "qtwebengine"]
return []
@staticmethod
def sde_ext(version: Version) -> str:
if version >= Version("6.8.0"):
if os.linesep == "\r\n":
return "windows_line_endings_src"
else:
return "unix_line_endings_src"
else:
return "src_doc_examples"
class MetadataFactory:
"""Retrieve metadata of Qt variations, versions, and descriptions from Qt site."""
@@ -973,7 +984,9 @@ class MetadataFactory:
"qt",
), "Internal misuse of fetch_modules_sde"
qt_ver_str = self._get_qt_version_str(version)
modules_meta = self._fetch_module_metadata(self.archive_id.to_folder(version, qt_ver_str, "src_doc_examples"))
modules_meta = self._fetch_module_metadata(
self.archive_id.to_folder(version, qt_ver_str, QtRepoProperty.sde_ext(version))
)
# pattern: Match all names "qt.qt5.12345.doc.(\w+)
pattern = re.compile(r"^qt\.(qt" + str(version.major) + r"\.)?" + qt_ver_str + r"\." + cmd_type + r"\.(.+)$")
@@ -993,7 +1006,11 @@ class MetadataFactory:
return self.fetch_archives(version, cmd_type, [], is_sde=True)
def fetch_archives(self, version: Version, arch: str, modules: List[str], is_sde: bool = False) -> List[str]:
extension = "src_doc_examples" if is_sde else QtRepoProperty.extension_for_arch(arch, version >= Version("6.0.0"))
extension = (
QtRepoProperty.sde_ext(version)
if is_sde
else QtRepoProperty.extension_for_arch(arch, version >= Version("6.0.0"))
)
qt_version_str = self._get_qt_version_str(version)
nonempty = MetadataFactory._has_nonempty_downloads