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

Invalid script entry point when rye sync #531

Closed
geoqiao opened this issue Jan 6, 2024 · 4 comments
Closed

Invalid script entry point when rye sync #531

geoqiao opened this issue Jan 6, 2024 · 4 comments

Comments

@geoqiao
Copy link

geoqiao commented Jan 6, 2024

Steps to Reproduce

mkdir test_script
cd test_script/
rye init .
success: Initialized project in /Users/geoqiao/test_script/.
Run rye sync to get started
rye add requests
Added requests>=2.31.0 as regular dependency
rye sync failed with:
ERROR: For req: test-script==0.1.0. Invalid script entry point: <ExportEntry hello = test:None []> - A callable suffix is required. Cf https://packaging.python.org/specifications/entry-points/#use-for-scripts for more information.
image

Expected Result

Successfully rye sync

Actual Result

rye sync failed with:
ERROR: For req: test-script==0.1.0. Invalid script entry point: <ExportEntry hello = test:None []> - A callable suffix is required. Cf https://packaging.python.org/specifications/entry-points/#use-for-scripts for more information.
image

Version Info

rye --version
rye 0.16.0
commit: 0.16.0 (c003223 2023-12-16)
platform: macos (aarch64)
self-python: cpython@3.11
symlink support: true

Stacktrace

No response

@geoqiao
Copy link
Author

geoqiao commented Jan 6, 2024

update:
rye sync works when the project name does not contain ”-” or “_”

like that :
mkdir test
cd test
rye init .
rye add requests
rye sync
it works

It seems to be a problem with the punctuation in the name of the project

@peter-fm
Copy link

Same issue on windows
rye 0.16.0
commit: 0.16.0 (c003223 2023-12-16)
platform: windows (x86_64)
self-python: cpython@3.11
symlink support: true

@PeterBlackledge
Copy link

PeterBlackledge commented Jan 10, 2024

Can also confirm the same issue on Windows.

FWIW:
after running 'rye init .' - delete the section [project-scripts] in pyproject.toml - then 'rye sync' runs successfully, regardless of hyphens in the project name.

@geoqiao
Copy link
Author

geoqiao commented Jan 14, 2024

Can also confirm the same issue on Windows.

FWIW:

after running 'rye init .' - delete the section [project-scripts] in pyproject.toml - then 'rye sync' runs successfully, regardless of hyphens in the project name.

Thanks for your help. It works when delete the section [project-scripts].
And I find it has been fixed in e8404f1

@geoqiao geoqiao closed this as completed Jan 14, 2024
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

3 participants