Skip to content
This repository has been archived by the owner on Nov 14, 2020. It is now read-only.

Make pyobjc-* pipenv dependencies only install in macOS #55

Merged
merged 2 commits into from
Oct 17, 2019
Merged

Conversation

micahflee
Copy link
Contributor

Resolves #51

Copy link
Contributor

@simonft simonft left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Heh, this is exactly the diff I was trying to create which led me to file #51. I was expecting you to run into pypa/pipenv#3063 but I guess not?

This doesn't actually fix the issue of not being able to run pipenv lock (that still won't work on linux) but it should allow someone to use pipenv to install dependencies on linux.

@micahflee
Copy link
Contributor Author

So it looks like you should be able to create a lock file in linux by running:

pipenv lock —pre —clear

However I'm hitting this problem when I try it:

$ pipenv lock --pre --clear
Locking [dev-packages] dependencies…
✘ Locking Failed! 
Traceback (most recent call last):
  File "/home/user/.local/lib/python3.7/site-packages/pipenv/resolver.py", line 126, in <module>
    main()
  File "/home/user/.local/lib/python3.7/site-packages/pipenv/resolver.py", line 119, in main
    parsed.requirements_dir, parsed.packages)
  File "/home/user/.local/lib/python3.7/site-packages/pipenv/resolver.py", line 72, in _main
    from pipenv.core import project
  File "/home/user/.local/lib/python3.7/site-packages/pipenv/core.py", line 22, in <module>
    from .project import Project, SourceNotFound
  File "/home/user/.local/lib/python3.7/site-packages/pipenv/project.py", line 21, in <module>
    from .environment import Environment
  File "/home/user/.local/lib/python3.7/site-packages/pipenv/environment.py", line 9, in <module>
    import pkg_resources
ModuleNotFoundError: No module named 'pkg_resources'
File "/home/user/.local/lib/python3.7/site-packages/pipenv/resolver.py", line 126, in <module>
    main()
  File "/home/user/.local/lib/python3.7/site-packages/pipenv/resolver.py", line 119, in main
    parsed.requirements_dir, parsed.packages)
  File "/home/user/.local/lib/python3.7/site-packages/pipenv/resolver.py", line 72, in _main
    from pipenv.core import project
  File "/home/user/.local/lib/python3.7/site-packages/pipenv/core.py", line 22, in <module>
    from .project import Project, SourceNotFound
  File "/home/user/.local/lib/python3.7/site-packages/pipenv/project.py", line 21, in <module>
    from .environment import Environment
  File "/home/user/.local/lib/python3.7/site-packages/pipenv/environment.py", line 9, in <module>
    import pkg_resources
ModuleNotFoundError: No module named 'pkg_resources'

Does it work for you?

In any case, I'm not too worried about it. I'm fine with generating the Pipfile.lock on my Mac when it's necessary. If we can't get it working, I'll just merge this :).

@simonft
Copy link
Contributor

simonft commented Oct 16, 2019

No, creating the lock file still returns the same error.

> pipenv lock --pre --clear
Locking [dev-packages] dependencies…
Locking [packages] dependencies…
/python3/dist-packages/pipenv/patched/piptools/repositories/pypi.py", line 174, in get_dependencies
    legacy_results = self.get_legacy_dependencies(ireq)
  File "/usr/lib/python3/dist-packages/pipenv/patched/piptools/repositories/pypi.py", line 222, in get_legacy_dependencies
    result = reqset._prepare_file(self.finder, ireq, ignore_requires_python=True)
  File "/usr/lib/python3/dist-packages/pipenv/patched/notpip/req/req_set.py", line 644, in _prepare_file
    abstract_dist.prep_for_dist()
  File "/usr/lib/python3/dist-packages/pipenv/patched/notpip/req/req_set.py", line 134, in prep_for_dist
    self.req_to_install.run_egg_info()
  File "/usr/lib/python3/dist-packages/pipenv/vendor/pip9/req/req_install.py", line 439, in run_egg_info
    command_desc='python setup.py egg_info')
  File "/usr/lib/python3/dist-packages/pipenv/vendor/pip9/utils/__init__.py", line 707, in call_subprocess
    % (command_desc, proc.returncode, cwd))
pip9.exceptions.InstallationError: Command "python setup.py egg_info" failed with error code 1 in /tmp/tmpz18479xpbuild/pyobjc-framework-cocoa/

I'm happy to just ask you or someone else to regenerate the lock file when I need it though.

@micahflee micahflee merged commit bab4412 into master Oct 17, 2019
@micahflee micahflee deleted the 51_pipenv branch October 18, 2019 19:32
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Pipenv lock fails on linux
2 participants