sbraz / pymediainfo

A Python wrapper around the MediaInfo library
https://pymediainfo.readthedocs.org/
Other
316 stars 57 forks source link

setuptools as an install dependency? #92

Closed JulienPalard closed 4 years ago

JulienPalard commented 4 years ago

Spotted you're having setuptools as an install dependency, which looks wrong to me, as the install dependency is read by setuptools itself, so if this value is read, setuptools is already here.

And the other way around if setuptools is not here there's no way to discover this install_dependency (as it's given as a paramter of setuptools.setup).

Not pinning it won't hurt a lot though, but it can still bite: if a project requiring pymediainfo is freezing subdependencies, it will pin setuptools on a specific version, which could conflict with pip itself.

I found out by running pip-compile on a project of mine which depends on pymediainfo (Thanks! I appreciate the project!), thanksfully pip-compile don't pin the version in this case, to avoid conflict with pip:

$ echo pymediainfo > foo.in
$ pip-compile foo.in
$ cat foo.txt
#
# This file is autogenerated by pip-compile
# To update, run:
#
#    pip-compile foo.in
#
pymediainfo==4.2.1        # via -r foo.in

# The following packages are considered to be unsafe in a requirements file:
# setuptools

I'd recomand removing it.

sbraz commented 4 years ago

Setuptools is needed here: https://github.com/sbraz/pymediainfo/blob/7eccc4b15a9d6a7e1ec29b1e9d9d3195bbf4d852/pymediainfo/__init__.py#L9

I feel not listing it would be wrong.

JulienPalard commented 4 years ago

Oh, pkg_resource, good old Kryptonite...

JulienPalard commented 4 years ago

It looks completly legitimate, I missed it. And as pip-compile don't pin it, it won't conflict with pip in my setup, so I close this issue.