Open liudonghua123 opened 2 years ago
Was having this issue; think the fix is to replace "."
with a name
def make_exe()
# ...
exe = dist.to_python_executable(
name="actual_name_here", # <---
packaging_policy=policy,
config=python_config,
)
# ...
return exe
Hi this doesn't solve the issue on the slightest. Here's how I reproduced the error: rustc --version //rustc 1.65.0 (897e37553 2022-11-02) cargo install pyoxidizer pyoxidizer --version // PyOxidizer 0.23.0 pyoxidizer init-config-file pyapp cd pyapp pyoxidizer run // RESULT:
resolving 1 targets resolving target install resolving target exe target Python distribution for x86_64-pc-windows-msvc resolves to: https://github.com/indygreg/python-build-standalone/releases/download/20221106/cpython-3.10.8%2B20221106-x86_64-pc-windows-msvc-shared-pgo-full.tar.zst (sha256=ab40f9584be896c697c5fca351ab82d7b55f01b8eb0494f0a15a67562e49161a) reusing target Python distribution for host execution adding Python executable pyapp to . ensuring Rust toolchain 1.61.0 is available fetching https://static.rust-lang.org/dist/channel-rust-1.61.0.toml.sha256 Sending fatal alert BadCertificate error[PYOXIDIZER_PYTHON_EXECUTABLE]: adding PythonExecutable to FileManifest
Caused by:
0: building Python executable
1: resolving Rust toolchain
2: fetching manifest
3: error sending request for url (https://static.rust-lang.org/dist/channel-rust-1.61.0.toml.sha256): error trying to connect: invalid peer certificate contents: invalid peer certificate: UnknownIssuer
4: error trying to connect: invalid peer certificate contents: invalid peer certificate: UnknownIssuer
5: invalid peer certificate contents: invalid peer certificate: UnknownIssuer
--> .\pyoxidizer.bzl:283:5
|
283 | files.add_python_resource(".", exe)
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ PythonExecutable.to_file_manifest()
This is not resolved? Omg
I hit this issue after downgrading from 0.24.0 (because of #673)
This is what I do:
$ stat app2
stat: cannot statx 'app2': No such file or directory
$ pyoxidizer -V
PyOxidizer 0.23.0
$ pyoxidizer init-config-file app2 >/dev/null
$ cd app2
$ grep 'name.*app2' -B1 pyoxidizer.bzl
exe = dist.to_python_executable(
name="app2",
$ pyoxidizer build --release --target-triple x86_64-unknown-linux-musl
[...]
linking customized Python library...
error[PYOXIDIZER_PYTHON_EXECUTABLE]: adding PythonExecutable to FileManifest
Caused by:
0: building Python executable
1: building executable with Rust project
2: obtaining embedded python context
3: No such file or directory (os error 2)
--> ./pyoxidizer.bzl:283:5
|
283 | files.add_python_resource(".", exe)
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ PythonExecutable.to_file_manifest()
musl
doesn't seem to matter here. Neither does release
. It always seems to fail.
My OS is Ubuntu 22.04. uname -a
shows:
Linux [redacted] 6.5.0-27-generic #28~22.04.1-Ubuntu SMP PREEMPT_DYNAMIC Fri Mar 15 10:51:06 UTC 2 x86_64 x86_64 x86_64 GNU/Linux
I have also setup archlinux
using Vagrant to factor out environmental problems.
Vagrantfile w/ libvirt
:
Vagrant.configure("2") do |config|
config.vm.box = "archlinux/archlinux"
config.vm.provider :libvirt do |domain|
domain.memory = 4096
domain.cpus = 4
domain.machine_virtual_size = 80
end
end
Commands extracted from history:
# ... partition/fs extension commands omitted for brevity
sudo pacman -Sy gcc rustup libxcrypt libxcrypt-compat
rustup install stable
rustup default stable
cargo install pyoxidizer@0.23.0
export PATH=$PATH:/home/vagrant/.cargo/bin/
pyoxidizer init-config-file app2
cd app2
pyoxidizer build --release --target-triple x86_64-unknown-linux-musl
I tried to create a startup example project via
pyoxidizer init-config-file .
and runpyoxidizer run
, then I goterror[PYOXIDIZER_PYTHON_EXECUTABLE]: adding PythonExecutable to FileManifest, error: adding PythonExecutable to FileManifest
errors.