indygreg / indygreg/PyOxidizer

Make 'pyoxidizer init-config-file .' behave more gracefully

Open
#404 2 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

bug
Dominant language
Rust
Stars
6.2k
Forks
256
PR merge metrics
No merged PRs in 30d

Description

Following the tutorial, I did:

```sh
$ pip install pyoxidizer
$ pyoxidizer init-config-file .
$ pyoxidizer run
```

Sadly, instead of a REPL, I get:

```
libpythonXY created
building with Rust 1.52.0
Downloading crates ...
Downloaded base64 v0.13.0
Downloaded dunce v1.0.1
Downloaded jemallocator v0.3.2
Downloaded quoted_printable v0.4.3
Downloaded paste v1.0.5
Downloaded walkdir v2.3.2
Downloaded regex v1.5.4
Downloaded itertools v0.10.0
Downloaded memchr v2.4.0
Downloaded byteorder v1.4.3
Downloaded embed-resource v1.6.2
Downloaded either v1.6.1
Downloaded once_cell v1.7.2
Downloaded regex-syntax v0.6.25
Downloaded python-packaging v0.9.0
Downloaded mailparse v0.13.4
Downloaded python3-sys v0.6.0
Downloaded jemalloc-sys v0.3.2
Downloaded charset v0.1.2
Downloaded tugger-licensing v0.3.0
Downloaded same-file v1.0.6
Downloaded spdx v0.4.0
Downloaded python-packed-resources v0.7.0
Downloaded fs_extra v1.2.0
Downloaded tugger-file-manifest v0.4.0
Downloaded pyembed v0.16.0
Downloaded base64 v0.10.1
Downloaded encoding_rs v0.8.28
Downloaded anyhow v1.0.40
Downloaded memmap v0.7.0
Downloaded aho-corasick v0.7.18
Downloaded cc v1.0.67
Downloaded cpython v0.6.0
error: no bin target named `.`
error[PYOXIDIZER_PYTHON_EXECUTABLE]: adding PythonExecutable to FileManifest

Caused by:
0: building Python executable
1: building executable with Rust project
2: reading cargo output
3: command ["/home/njs/.cache/pyoxidizer/rust/1.52.0-x86_64-unknown-linux-gnu/bin/cargo", "build", "--target", "x86_64-unknown-linux-gnu", "--target-dir", "/tmp/pyoxidizernsLcBS/build/target", "--bin", ".", "--locked", "--no-default-features", "--features", "build-mode-prebuilt-artifacts cpython-link-unresolved-static global-allocator-jemalloc allocator-jemalloc"] exited with code 101
--> ./pyoxidizer.bzl:271:5
|
271 | files.add_python_resource(".", exe)
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ PythonExecutable.to_file_manifest()

error: adding PythonExecutable to FileManifest

Caused by:
0: building Python executable
1: building executable with Rust project
2: reading cargo output
3: command ["/home/njs/.cache/pyoxidizer/rust/1.52.0-x86_64-unknown-linux-gnu/bin/cargo", "build", "--target", "x86_64-unknown-linux-gnu", "--target-dir", "/tmp/pyoxidizernsLcBS/build/target", "--bin", ".", "--locked", "--no-default-features", "--features", "build-mode-prebuilt-artifacts cpython-link-unresolved-static global-allocator-jemalloc allocator-jemalloc"] exited with code 101
```

This is with:

```
PyOxidizer 0.16.2
commit: e91995636f8deed0a7d8e1917f96a7dc17309b63
source: https://github.com/indygreg/PyOxidizer.git
pyembed crate location: version = "0.16.0"
```

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by reproducing the documented `pyoxidizer init-config-file .` followed by `pyoxidizer run` flow and inspect the generated `pyoxidizer.bzl` around line 271. Compare the command's handling of `.` with the reported Cargo error, then use the tutorial workflow to verify that the failure is replaced by the intended graceful behavior.

Written by the indexing model from the issue text.

Assessment

Tech stack
python, rust
Domain
build-system, cli
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.