-
-
Notifications
You must be signed in to change notification settings - Fork 19
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
Make read-deps
script
parameter accept directories
#108
Comments
read-deps
script
parameter understand directoriesread-deps
script
parameter accept directories
I should essentially be using |
Thanks for this report. It's well articulated what you're after and what solution you have in mind. I've not been using I'm slightly reluctant to expand the scope of If we allow the script to accept directories, we have to address several concerns, some of which you've already articulated:
I'm more inclined to consider a simple expansion of scope like simply expanding into I also consider All that considered, I think yes should consider this feature (including the option for |
In the times when essential layout is yet being developed, I often find myself using
uv
to create virtual envs inside projects using it. I find it tedious to type in the commanduv pip install $(python -m pip_run.read-deps __init__.py)
. I'd rather just douv pip install $(python -m pip_run.read-deps .)
, which implies that for every directoryd
theread-deps
script attempts to look for__requires__
insided/__init__.py
.Other things to consider are whether
__main__.py
should be then taking precedence in such dirs or maybe whether we shouldn't combine all__requires__
lists from the whole directory. However, if I wanted to combine I'd simply extend theread-deps
command to accept indefinite amount ofscript
parameters and then invokepython -m pip_run.read-deps *
(or other glob pattern necessary). And maybe if I wanted to get requirements for "module mode" (python -m
), I'd rather expect pip-run to understandpython -m pip_run.read-deps -m .
.If the
script
parameter accepts a dir, we could then default to.
if no arg is provided, which beautifully simplifies my usage intouv pip install $(python -m pip_run.read-deps)
.Is adding a simple logic for expanding a dir into
<dir>/__init__.py
a suitable feature?The text was updated successfully, but these errors were encountered: