Skip to content

Conversation

km-64
Copy link
Contributor

@km-64 km-64 commented Sep 26, 2025

It looks like the current setup.cfg console script entrypoint doesn't conform to the setuptools docs https://setuptools.pypa.io/en/latest/userguide/entry_point.html#console-scripts

@jell-o-fishi
Copy link
Member

@km-64 the intention here was to avoid installing the rsocket-py command if the [cli] option was not specified on install. In general the rsocket package does not require any dependencies to be installed. all extra requirements are for additionally specified option on install (eg. [cli], [aiohttp]). Installing the script indeed does not work. Please fix the command line python script to avoid it failing due to missing import of asynclick, and if it doesn't exist there should be a message. something like :

print("This command requires the CLI extra.")
print("Install with: pip install rsocket[cli]")

@jell-o-fishi
Copy link
Member

@km-64 on a side note, and since i have no other way of communicating with you:
I'm wondering why you are going over the entire project, trying to do the tutorials, and doing all these PRs. your github said you are a CS student. Is this some part of assignment, or are you actually using rsocket for something. just interested :)

@km-64
Copy link
Contributor Author

km-64 commented Sep 28, 2025

@km-64 the intention here was to avoid installing the rsocket-py command if the [cli] option was not specified on install. In general the rsocket package does not require any dependencies to be installed. all extra requirements are for additionally specified option on install (eg. [cli], [aiohttp]). Installing the script indeed does not work. Please fix the command line python script to avoid it failing due to missing import of asynclick, and if it doesn't exist there should be a message. something like :

print("This command requires the CLI extra.") print("Install with: pip install rsocket[cli]")

Yeah I was thinking about something like that. It looked like the cli. prefix was used to specify that the console script would only be installed when the [cli] extras were installed, but I couldn't find such a feature in the setuptools docs. I'm not sure what the intention behind doing it that way was. I couldn't get the console script to work with the [cli] extras installed other than running python -m rsocket.cli.command while rsocket-py says something like command not found.

FastAPI actually separates the cli code into a separate package to achieve this behaviour. Maybe we could do something similar?
https://github.com/fastapi/fastapi/blob/450a334253b1426aab08b4dea17b16ba8b4c098c/pyproject.toml#L99

@jell-o-fishi
Copy link
Member

jell-o-fishi commented Sep 28, 2025

FastAPI actually separates the cli code into a separate package to achieve this behaviour. Maybe we could do something similar? https://github.com/fastapi/fastapi/blob/450a334253b1426aab08b4dea17b16ba8b4c098c/pyproject.toml#L99

I think that's overkill. i'll test your pr and merge when i get a chance. thanks

@km-64
Copy link
Contributor Author

km-64 commented Sep 28, 2025

@km-64 on a side note, and since i have no other way of communicating with you:

I'm wondering why you are going over the entire project, trying to do the tutorials, and doing all these PRs. your github said you are a CS student. Is this some part of assignment, or are you actually using rsocket for something. just interested :)

I sent you an email with some contact info to the address I found in your commits

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

Successfully merging this pull request may close these issues.

2 participants