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

req-compile does not handle stdin paths correctly #3

Closed
nat45928 opened this issue Nov 4, 2019 · 1 comment
Closed

req-compile does not handle stdin paths correctly #3

nat45928 opened this issue Nov 4, 2019 · 1 comment
Assignees

Comments

@nat45928
Copy link
Collaborator

nat45928 commented Nov 4, 2019

When following docs for compiling a group of projects I get the following exception (using req-compile as an example package):

(.venv) C:\repos\req-compile>req-candidates --paths-only | req-compile -v
INFO:req_compile.metadata:Extracting metadata for C:\repos\req-compile
DEBUG:req_compile.metadata:Extracting directly from a source directory
INFO:req_compile.metadata:Attempting to fetch metadata from setup.py
DEBUG:req_compile.metadata:Setting root to C:\Users\NATHAN~1\AppData\Local\Temp\tmpuyi0wfb9_NonExtractor_req-compile
INFO:req_compile.metadata:Parsing setup.py setup.py
INFO:req_compile.metadata:Parsing from setup.cfg
Traceback (most recent call last):
  File "C:\repos\req-compile\.venv\Scripts\req-compile-script.py", line 11, in <module>
    load_entry_point('req-compile', 'console_scripts', 'req-compile')()
  File "c:\repos\req-compile\req_compile\cmdline.py", line 407, in compile_main
    run_compile(args.requirement_files,
  File "c:\repos\req-compile\req_compile\cmdline.py", line 214, in run_compile
    input_reqs = [_create_input_reqs(input_arg) for input_arg in input_args]
  File "c:\repos\req-compile\req_compile\cmdline.py", line 214, in <listcomp>
    input_reqs = [_create_input_reqs(input_arg) for input_arg in input_args]
  File "c:\repos\req-compile\req_compile\cmdline.py", line 179, in _create_input_reqs
    return DistInfo('-', None, list(itertools.chain(*[_create_stdin_input_req(line)
TypeError: 'DistInfo' object is not iterable
@nat45928 nat45928 changed the title req-compile does not handle stdin paths correctly. req-compile does not handle stdin paths correctly Nov 4, 2019
@sputt
Copy link
Collaborator

sputt commented Nov 5, 2019

It is attempting to stuff DistInfo metadata about the path into another DistInfo, when they should just be pkg_resources.Requirements. Each directory also has to be added as a --source repo, which it used to do and I broke it

@sputt sputt self-assigned this Nov 5, 2019
nat45928 added a commit that referenced this issue Nov 5, 2019
Fixes #3 - allow passing paths through stdin
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

2 participants