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

pip-compile cant take a directory. #207

Closed
SanketDG opened this issue Sep 26, 2015 · 6 comments
Closed

pip-compile cant take a directory. #207

SanketDG opened this issue Sep 26, 2015 · 6 comments
Labels
PR wanted Feature is discussed or bug is confirmed, PR needed

Comments

@SanketDG
Copy link
Member

When I input pip-compile with a directory,

❯ pip-compile requirements 
Traceback (most recent call last):
  File "/home/sanket/.virtualenvs/djangohub/bin/pip-compile", line 11, in <module>
    sys.exit(cli())
  File "/home/sanket/.virtualenvs/djangohub/local/lib/python2.7/site-packages/click/core.py", line 700, in __call__
    return self.main(*args, **kwargs)
  File "/home/sanket/.virtualenvs/djangohub/local/lib/python2.7/site-packages/click/core.py", line 680, in main
    rv = self.invoke(ctx)
  File "/home/sanket/.virtualenvs/djangohub/local/lib/python2.7/site-packages/click/core.py", line 873, in invoke
    return ctx.invoke(self.callback, **ctx.params)
  File "/home/sanket/.virtualenvs/djangohub/local/lib/python2.7/site-packages/click/core.py", line 508, in invoke
    return callback(*args, **kwargs)
  File "/home/sanket/.virtualenvs/djangohub/local/lib/python2.7/site-packages/piptools/scripts/compile.py", line 73, in cli
    for line in parse_requirements(src_file, finder=repository.finder, session=repository.session):
  File "/home/sanket/.virtualenvs/djangohub/local/lib/python2.7/site-packages/pip/req/req_file.py", line 75, in parse_requirements
    filename, comes_from=comes_from, session=session
  File "/home/sanket/.virtualenvs/djangohub/local/lib/python2.7/site-packages/pip/download.py", line 416, in get_file_content
    'Could not open requirements file: %s' % str(exc)
pip.exceptions.InstallationError: Could not open requirements file: [Errno 21] Is a directory: 'requirements'

It would be great if pip-compile would find all the *.in files and compile them when a directory is given as a parameter.

@davidovich davidovich added the PR wanted Feature is discussed or bug is confirmed, PR needed label Feb 18, 2017
@tysonclugg
Copy link
Contributor

I'm not sure of the use case for this over compiling from a master requirements.in specified like this:

-r requirements/foo.in
-r requirements/bar.in

Given the lack of activity for nearly 3 years, and the suggested alternative, I'm closing this for now.

@merwok
Copy link

merwok commented May 2, 2018

I have independent requirements files for runtime (requires), test deps, CI (i.e. tox), deployment deps. I need a four-line shell script wrapper to compile them all to their respective target.

@rpkilby
Copy link

rpkilby commented May 2, 2018

@merwok - that sounds like a different feature. This issue was requesting that a directory of *.in files be compiled into a single target requirements file, not one-to-one respective targets for each input.

@merwok
Copy link

merwok commented May 2, 2018

You are right! #532 is that other feature.

@SanketDG
Copy link
Member Author

Haha, this was almost three years back. I apologize for my naivety back then. I have since then realized you can just use the suggested alternative. :)

@atugushev
Copy link
Member

FYI, there is a pip-compile-multi project for this particular case.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
PR wanted Feature is discussed or bug is confirmed, PR needed
Projects
None yet
Development

No branches or pull requests

6 participants