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

piptools dropped support for --no-index option #243

Closed
radiophysicist opened this issue Mar 15, 2021 · 5 comments
Closed

piptools dropped support for --no-index option #243

radiophysicist opened this issue Mar 15, 2021 · 5 comments

Comments

@radiophysicist
Copy link

Hello,

Recently piptools dropped support for --no-index option (from 6.0.0), so now one could get the following error:

~/.virtualenvs/goldrush/bin/pip-compile-multi
Locking requirements/base.in to requirements/base.txt. References: []
ERROR executing /home/shade/.virtualenvs/goldrush/bin/python3.9 -m piptools compile --no-header --verbose --rebuild --upgrade --no-index --output-file requirements/base.txt requirements/base.in
Exit code: 2

Usage: __main__.py compile [OPTIONS] [SRC_FILES]...
Try '__main__.py compile -h' for help.

Error: no such option: --no-index

Traceback (most recent call last):
  File "/home/shade/.virtualenvs/goldrush/lib/python3.9/site-packages/pipcompilemulti/cli_v1.py", line 26, in cli
    recompile()
  File "/home/shade/.virtualenvs/goldrush/lib/python3.9/site-packages/pipcompilemulti/actions.py", line 30, in recompile
    compile_topologically(env_confs, deduplicator)
  File "/home/shade/.virtualenvs/goldrush/lib/python3.9/site-packages/pipcompilemulti/actions.py", line 39, in compile_topologically
    if env.maybe_create_lockfile():
  File "/home/shade/.virtualenvs/goldrush/lib/python3.9/site-packages/pipcompilemulti/environment.py", line 51, in maybe_create_lockfile
    self.create_lockfile()
  File "/home/shade/.virtualenvs/goldrush/lib/python3.9/site-packages/pipcompilemulti/environment.py", line 82, in create_lockfile
    raise RuntimeError("Failed to pip-compile {0}".format(self.infile))
RuntimeError: Failed to pip-compile requirements/base.in
@radiophysicist
Copy link
Author

Also noticed that you use unlocked version of requirements in the setup.py:
https://github.com/peterdemin/pip-compile-multi/blob/master/setup.py#L46

@doncraig
Copy link

Seeing the same issue

@alopezz
Copy link

alopezz commented Mar 17, 2021

I also encountered this, and I've submitted a PR that should fix it.

Also noticed that you use unlocked version of requirements in the setup.py:
https://github.com/peterdemin/pip-compile-multi/blob/master/setup.py#L46

I assume that is probably intended, locked versions usually don't go in setup.py as that can create problems when installing the package as a dependency; the purpose of locked versions is to have reproducible environments.

@peterdemin
Copy link
Owner

Thanks for reporting, I'll put a fix ASAP

@peterdemin
Copy link
Owner

Fixed in 2.4.0

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 a pull request may close this issue.

4 participants