pipenv icon indicating copy to clipboard operation
pipenv copied to clipboard

Pyobjc package introduces more dependency packages, `pyobjc-framework-*`, when running `pipenv install`

Open AndreiH opened this issue 7 years ago • 5 comments

Added Platform dependencies in Pipfile: pyobjc = {version = "", platform_system = "== 'Darwin'"} pyobjc-core = {version = "", platform_system = "== 'Darwin'"}

When using pipenv install the packages specified in Pipfile may add in Pipfile.lock other packages that they may depend on. For example in Pipfile we have only specified mozrunner, but mozrunner also depends on mozprofile, and it is automatically installed and put in Pipenv.lock as a dependency to mozrunner, even tough mozprofile is not specified in Pipfile.

So, pyobjc and pyobjc-core, does the same, they bring other dependencies with them : pyobjc-framework-systemconfiguration pyobjc-framework-coreaudiokit pyobjc-framework-securityinterface pyobjc-framework-security pyobjc-framework-coreaudio pyobjc-framework-coreservices pyobjc-framework-coredata pyobjc-framework-cfnetwork pyobjc-framework-addressbook

So, because they are Platform dependency, which means we want to install them only on OSX, Pipenv does not know to add platform_system = "== 'Darwin'" to other packages that are automatically added to Pipfile.lock because of pyobjc and pyobjc-core. And we forcefully add them manually in Pipfile to let pipenv know that they only should be installed on OSX.

Because of this, when running pipenv install on other OS than OSX, we have errors in the pipenv install command output.

AndreiH avatar Oct 18 '18 12:10 AndreiH

Yeah, this is a known problem, we are not propogating markers to child dependencies correctly. I believe there is another issue on this already, but can’t find it at the moment.

uranusjr avatar Oct 18 '18 15:10 uranusjr

Note that we actually decided that intentionally in the past, though I am not sure we had a good reason. We need to nail down the desired behavior here and then float it over to kenneth, probably in a PEEP

techalchemy avatar Oct 20 '18 01:10 techalchemy

Maybe it’s related to Pipenv cannot currently merge different specifications of the same dependency with different markers. That would need to be resolved first before this is possible.

uranusjr avatar Oct 24 '18 02:10 uranusjr

I've faced the same problem. Removing watchdog doesn't resolve the problem because pyobjc-framework-FSEvents still got installed, but pipenv can't identify its parent:

...
pycountry==19.8.18
pycurl==7.43.0.5
pylama==7.7.1
  - mccabe [required: >=0.5.2, installed: 0.6.1]
  - pycodestyle [required: >=2.3.1, installed: 2.5.0]
  - pydocstyle [required: >=2.0.0, installed: 5.0.2]
    - snowballstemmer [required: Any, installed: 2.0.0]
  - pyflakes [required: >=1.5.0, installed: 2.1.1]
pyobjc-framework-FSEvents==6.1
  - pyobjc-core [required: >=6.1, installed: 6.1]
  - pyobjc-framework-Cocoa [required: >=6.1, installed: 6.1]
    - pyobjc-core [required: >=6.1, installed: 6.1]
pysftp==0.2.9
...

Pipfile does not specify the package as requirement. So, the solution is explicitly list those pyobj package as requirement and mark them as platform specific. At least it works for me:

pyobjc-core = { version = "*", platform_system = "== 'Darwin'" }
pyobjc-framework-cocoa = { version = "*", platform_system = "== 'Darwin'" }
pyobjc-framework-quartz = { version = "*", platform_system = "== 'Darwin'" }
pyobjc-framework-fsevents = { version = "*", platform_system = "== 'Darwin'" }

anton-kazlouski avatar Feb 07 '20 10:02 anton-kazlouski

Can this be rechecked on pipenv==2022.8.24?

matteius avatar Aug 26 '22 03:08 matteius