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

Pipenv does not support installing from local source packages #817

Closed
chrish42 opened this issue Oct 2, 2017 · 2 comments · Fixed by #818
Closed

Pipenv does not support installing from local source packages #817

chrish42 opened this issue Oct 2, 2017 · 2 comments · Fixed by #818

Comments

@chrish42
Copy link

chrish42 commented Oct 2, 2017

I created a virtualenv with pipenv, and installed some required packages from PyPI with it, which works well. However, I also have in my project a Python source distribution tarball (created by running python setup.py sdist in another project), that I'd like to install in the virtualenv. When running pipenv install mytarball.tar.gz, the source tarball is successfully installed in the virtualenv, but then I get an error at the end of the process:

Adding tarball-1.5.2.tar.gz to Pipfile's [packages]…
Locking [dev-packages] dependencies…
Locking [packages] dependencies…
Traceback (most recent call last):
  File "/Users/christianhudon/miniconda3/bin/pipenv", line 11, in <module>
    sys.exit(cli())
  File "/Users/christianhudon/miniconda3/lib/python3.6/site-packages/pipenv/vendor/click/core.py", line 722, in __call__
    return self.main(*args, **kwargs)
  File "/Users/christianhudon/miniconda3/lib/python3.6/site-packages/pipenv/vendor/click/core.py", line 697, in main
    rv = self.invoke(ctx)
  File "/Users/christianhudon/miniconda3/lib/python3.6/site-packages/pipenv/vendor/click/core.py", line 1066, in invoke
    return _process_result(sub_ctx.command.invoke(sub_ctx))
  File "/Users/christianhudon/miniconda3/lib/python3.6/site-packages/pipenv/vendor/click/core.py", line 895, in invoke
    return ctx.invoke(self.callback, **ctx.params)
  File "/Users/christianhudon/miniconda3/lib/python3.6/site-packages/pipenv/vendor/click/core.py", line 535, in invoke
    return callback(*args, **kwargs)
  File "/Users/christianhudon/miniconda3/lib/python3.6/site-packages/pipenv/cli.py", line 1852, in install
    do_lock(system=system, pre=pre)
  File "/Users/christianhudon/miniconda3/lib/python3.6/site-packages/pipenv/cli.py", line 1083, in do_lock
    pre=pre
  File "/Users/christianhudon/miniconda3/lib/python3.6/site-packages/pipenv/utils.py", line 421, in resolve_deps
    resolved_tree.update(resolver.resolve(max_rounds=PIPENV_MAX_ROUNDS))
  File "/Users/christianhudon/miniconda3/lib/python3.6/site-packages/pipenv/patched/piptools/resolver.py", line 88, in resolve
    self.their_constraints))
  File "/Users/christianhudon/miniconda3/lib/python3.6/site-packages/pipenv/patched/piptools/resolver.py", line 125, in check_constraints
    raise UnsupportedConstraint(msg, constraint)
piptools.exceptions.UnsupportedConstraint: pip-compile does not support URLs as packages, unless they are editable. Perhaps add -e option? (constraint was: file:///Users/christianhudon/test/tarball-1.5.2.tar.gz (from -r /var/folders/t0/_kvmbqhs4n92fg18mvdyd12w0000gq/T/pipenv-9i1ndzrb-requirement.txt (line 1)))
@techalchemy
Copy link
Member

I think this is related to #806 and can be fixed with a similar approach to #807

techalchemy added a commit to techalchemy/pipenv that referenced this issue Oct 2, 2017
* Fixes pypa#817
* Packages werent being identified as local files
* Therefore they were not being given a path
* We were trying to resolve them with pypi
techalchemy added a commit to techalchemy/pipenv that referenced this issue Oct 10, 2017
nateprewitt added a commit that referenced this issue Oct 12, 2017
Introduces a test for PR #818 and issue #817 local sdists
techalchemy added a commit to techalchemy/pipenv that referenced this issue Oct 23, 2017
* Issues - pypa#949, pypa#939, pypa#936 and to a lesser extent pypa#817 pypa#540 and more
* Fixed: Local file path installation (resolves in pipfile as relative
path)
* Pass file:// URI to Requirements library for resolving

TODO:
* Ignore non-explicit directory paths lacking os.sep or ./
* Add tests
techalchemy added a commit to techalchemy/pipenv that referenced this issue Nov 14, 2017
* Issues - pypa#949, pypa#939, pypa#936 and to a lesser extent pypa#817 pypa#540 and more
* Fixed: Local file path installation (resolves in pipfile as relative
path)
* Pass file:// URI to Requirements library for resolving

TODO:
* Ignore non-explicit directory paths lacking os.sep or ./
* Add tests
techalchemy added a commit to techalchemy/pipenv that referenced this issue Nov 14, 2017
@techalchemy
Copy link
Member

This is now properly fixed in #958

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.

2 participants