Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Patch 4.4.1 (correct this time) #239

Merged
merged 2 commits into from
Dec 3, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -7,3 +7,6 @@ __pycache__
# Do not keep tests and coverage results
.pytest_cache
.coverage

# To avoid cluttering when switching branch with 'rust-rewrite' branch.
/rust
2 changes: 1 addition & 1 deletion portablemc/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
"""

LAUNCHER_NAME = "portablemc"
LAUNCHER_VERSION = "4.4.0"
LAUNCHER_VERSION = "4.4.1"
LAUNCHER_AUTHORS = ["Théo Rozier <contact@theorozier.fr>", "Contributors"]
LAUNCHER_COPYRIGHT = "PortableMC Copyright (C) 2021-2024 Théo Rozier"
LAUNCHER_URL = "https://github.com/mindstorm38/portablemc"
20 changes: 10 additions & 10 deletions portablemc/standard.py
Original file line number Diff line number Diff line change
Expand Up @@ -643,6 +643,16 @@ def _resolve_libraries(self, watcher: Watcher) -> None:
if minecraft_arch_bits is not None:
spec.classifier = spec.classifier.replace("${arch}", str(minecraft_arch_bits))

# Changed in 4.3.1, rules are checked after natives
rules = library.get("rules")
if rules is not None:

if not isinstance(rules, list):
raise ValueError(f"metadata: /libraries/{library_idx}/rules must be a list")

if not interpret_rule(rules, self._features, f"metadata: /libraries/{library_idx}/rules"):
continue

# Create a wildcard copy of the spec without version, because we don't
# want to match against version, regardless of its version, a library
# should not be added twice.
Expand All @@ -656,16 +666,6 @@ def _resolve_libraries(self, watcher: Watcher) -> None:
continue
unique_specs.add(spec_wild)

# Changed in 4.3.1, rules are checked after natives
rules = library.get("rules")
if rules is not None:

if not isinstance(rules, list):
raise ValueError(f"metadata: /libraries/{library_idx}/rules must be a list")

if not interpret_rule(rules, self._features, f"metadata: /libraries/{library_idx}/rules"):
continue

lib_entry: Optional[DownloadEntry] = None

# Avoids ready downloading if a fix is being used, in such case we'll use
Expand Down
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ build-backend = "poetry.core.masonry.api"

[tool.poetry]
name = "portablemc"
version = "4.4.0"
version = "4.4.1"
description = "PortableMC is a module that provides both an API for development of your custom launcher and an executable script to run PortableMC CLI."
authors = ["Théo Rozier <contact@theorozier.fr>"]
license = "GPL-3.0-only"
Expand Down
Loading