Skip to content
Open
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
4 changes: 4 additions & 0 deletions src/serious_python/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
## 4.5.2

* **Packaging:** `pip install` no longer hangs when an index answers `401` — an authenticating mirror or proxy. pip prompted for credentials on a stdin nothing could answer, and wrote the prompt without a newline so callers never displayed it; the install blocked with `Looking in indexes: ...` as its last output, which `flet build` showed as a frozen `Packaging Python app...`. pip now runs with `--no-input` and bounded `--timeout`/`--retries`. See flet-dev/flet#5989, flet-dev/flet#5013 and flet-dev/flet#5507.

## 4.5.1

* **iOS/macOS:** the bundled `Python`, `dart_bridge` and stdlib extension XCFrameworks are now signed on both layers — each slice's inner `.framework` as well as the outer `.xcframework`. 4.5.0 signed only the outer bundle. Note this did **not** change `isSecureTimestamp`, which still reports false — that field appears not to be reachable by signing; `signed`, which `ITMS-91065` names, is true. See `serious_python_darwin` 4.5.1.
Expand Down
24 changes: 16 additions & 8 deletions src/serious_python/bin/package_command.dart
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,8 @@ import 'package:glob/glob.dart';
import 'package:glob/list_local_fs.dart';
import 'package:http/http.dart' as http;
import 'package:path/path.dart' as path;
import 'package:shelf/shelf.dart';
import 'package:serious_python/src/python_versions.dart';
import 'package:shelf/shelf.dart';
import 'package:shelf/shelf_io.dart' as shelf_io;

import 'macos_utils.dart' as macos_utils;
Expand Down Expand Up @@ -344,10 +344,8 @@ class PackageCommand extends Command {
// site-packages root
String sitePackagesRoot =
path.join(currentPath, "build", "site-packages");
if (Platform.environment
.containsKey(sitePackagesEnvironmentVariable)) {
final envValue =
Platform.environment[sitePackagesEnvironmentVariable];
if (Platform.environment.containsKey(sitePackagesEnvironmentVariable)) {
final envValue = Platform.environment[sitePackagesEnvironmentVariable];
if (envValue != null && envValue.isNotEmpty) {
sitePackagesRoot = envValue;
}
Expand Down Expand Up @@ -382,7 +380,8 @@ class PackageCommand extends Command {
// minor (per python-build's manifest `android_abis`); installing
// for an unpublished ABI would be wasted work.
if (platform == "Android" &&
!pythonReleases[_pythonShortVersion]!.androidAbis
!pythonReleases[_pythonShortVersion]!
.androidAbis
.contains(arch.key)) {
continue;
}
Expand Down Expand Up @@ -441,7 +440,15 @@ class PackageCommand extends Command {
stdout.writeln(
"Installing $requirements with pip command to $sitePackagesDir");

List<String> pipArgs = ["--disable-pip-version-check"];
List<String> pipArgs = [
"--disable-pip-version-check",
"--timeout",
"30",
"--retries",
"3",
// Prevent pip from prompting and hanging for input.
"--no-input",
];

if (isMobile || isWeb) {
pipArgs.addAll(["--only-binary", ":all:"]);
Expand Down Expand Up @@ -676,7 +683,8 @@ class PackageCommand extends Command {
Future<void> _stageDarwinSpm(String platform, String projectPath) async {
final darwinDir = await _resolveDarwinDir(projectPath);
if (darwinDir == null) {
stdout.writeln("SPM staging skipped: could not resolve serious_python_darwin "
stdout.writeln(
"SPM staging skipped: could not resolve serious_python_darwin "
"(set $darwinDirEnvironmentVariable or ensure "
".dart_tool/package_config.json is present).");
return;
Expand Down
Loading