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

Binary app error: Could not find a version that satisfies the requirement #1436

Open
PhilipVinc opened this issue Apr 27, 2024 · 1 comment

Comments

@PhilipVinc
Copy link

Hello,

I tried to setup a project using hatch/pyapp, but after building the project with pyapp (which completes successfully) I keep getting the following error.

ERROR: Could not find a version that satisfies the requirement test_app==0.0.1 (from versions: none)
ERROR: No matching distribution found for test_app ==0.0.1

The steps I followed where to create a project with hatch init test_app then edit the pyproject.toml by adding those two lines

[project.scripts]
test_app = "test_app:main"

[tool.hatch.build.targets.binary]
test_app = ["test_app"]

and then build the app with hatch build --target binary.

I am on macOS.

Is this somehow known? Do you have some ideas on what I could try to do to fix it?

@PhilipVinc
Copy link
Author

After considerate effort googling in GitHub, I found out that with the following script I am able to generate some build-in images that work...

#!/usr/bin/env bash
current_version=$(hatch version)
hatch build
PYAPP_UV_ENABLED="1" PYAPP_PROJECT_PATH="$(ls ${PWD}/dist/test_app-${current_version}-py3-none-any.whl)" PYAPP_DISTRIBUTION_EMBED="1" hatch build -t binary

Nevertheless, I'm unsure of how this happens to work while the other does not.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant