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

Remove outdated distribute dependency #17360

Merged
merged 1 commit into from Feb 20, 2020
Merged

Remove outdated distribute dependency #17360

merged 1 commit into from Feb 20, 2020

Conversation

jaylinski
Copy link
Contributor

@jaylinski jaylinski commented Feb 10, 2020

Description

As stated on PyPi (https://pypi.org/project/distribute/),
distribute is a legacy package and compatibility layer
that installs Setuptools 0.7+.

Since Setuptools (v41) gets already installed, this wrapper
is not needed anymore.

Related to #12804.

Original commit that introduced distribute 7 years ago: 885a60e

Motivation and Context

The distribute version used in Kodi is from 2011 (https://pypi.org/project/distribute/0.6.21/), was last updated in 2013 and doesn't even support the current Python version (3.8).

This PR also fixes a depends-build error I experience on Ubuntu 18.04:

Setuptools installation detected at /opt/xbmc-deps/x86_64-linux-gnu-native/lib/python3.7/site-packages/setuptools-41.0.1.post20200209-py3.7.egg
Not patching, --root or --prefix is installing Distribute in another location
running install
Traceback (most recent call last):
  File "setup.py", line 211, in <module>
    scripts = scripts,
  File "/opt/xbmc-deps/x86_64-linux-gnu-native/lib/python3.7/distutils/core.py", line 148, in setup
    dist.run_commands()
  File "/opt/xbmc-deps/x86_64-linux-gnu-native/lib/python3.7/distutils/dist.py", line 966, in run_commands
    self.run_command(cmd)
  File "/opt/xbmc-deps/x86_64-linux-gnu-native/lib/python3.7/distutils/dist.py", line 985, in run_command
    cmd_obj.run()
  File "build/src/setuptools/command/install.py", line 73, in run
    self.do_egg_install()
  File "build/src/setuptools/command/install.py", line 82, in do_egg_install
    easy_install = self.distribution.get_command_class('easy_install')
  File "build/src/setuptools/dist.py", line 362, in get_command_class
    self.cmdclass[command] = cmdclass = ep.load()
  File "build/src/pkg_resources.py", line 1992, in load
    entry = __import__(self.module_name, globals(),globals(), ['__name__'])
  File "build/src/setuptools/command/easy_install.py", line 25, in <module>
    from setuptools.package_index import PackageIndex
  File "build/src/setuptools/package_index.py", line 157, in <module>
    sys.version[:3], require('distribute')[0].version
  File "build/src/pkg_resources.py", line 686, in require
    needed = self.resolve(parse_requirements(requirements))
  File "build/src/pkg_resources.py", line 584, in resolve
    raise DistributionNotFound(req)
pkg_resources.DistributionNotFound: distribute
Makefile:22: recipe for target '.installed-x86_64-linux-native' failed
make[2]: *** [.installed-x86_64-linux-native] Error 1
make[2]: Leaving directory '/root/kodi/tools/depends/native/distribute'
Makefile:61: recipe for target 'distribute' failed
make[1]: *** [distribute] Error 2

How Has This Been Tested?

This change will be tested by the automatic Jenkins build jobs.

Screenshots (if appropriate):

Types of change

  • Bug fix (non-breaking change which fixes an issue)
  • Clean up (non-breaking change which removes non-working, unmaintained functionality)
  • Improvement (non-breaking change which improves existing functionality)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that will cause existing functionality to change)
  • Cosmetic change (non-breaking change that doesn't touch code)
  • None of the above (please explain below)

Checklist:

  • My code follows the Code Guidelines of this project
  • My change requires a change to the documentation, either Doxygen or wiki
  • I have updated the documentation accordingly
  • I have read the Contributing document
  • I have added tests to cover my change
  • All new and existing tests passed

As stated on PyPi (https://pypi.org/project/distribute/),
`distribute` is a legacy package and compatibility layer
that installs Setuptools 0.7+.

Since Setuptools (v41) gets already installed, this wrapper
is not needed anymore.

Related to #12804.
@jaylinski jaylinski requested a review from Rechi February 11, 2020 07:44
@lrusak lrusak added Type: Cleanup non-breaking change which removes non-working or unmaintained functionality v19 Matrix labels Feb 20, 2020
@lrusak lrusak added this to the Matrix 19.0-alpha 1 milestone Feb 20, 2020
@lrusak lrusak merged commit a6e4569 into xbmc:master Feb 20, 2020
@lrusak
Copy link
Contributor

lrusak commented Feb 20, 2020

Thanks for your contribution!

Maven85 pushed a commit to Maven85/kodi that referenced this pull request Feb 21, 2020
@jaylinski jaylinski deleted the depends/native-setuptools branch February 24, 2020 02:10
Maven85 pushed a commit to Maven85/kodi that referenced this pull request Feb 24, 2020
Maven85 pushed a commit to Maven85/kodi that referenced this pull request Feb 26, 2020
Maven85 pushed a commit to Maven85/kodi that referenced this pull request May 5, 2020
Maven85 pushed a commit to Maven85/kodi that referenced this pull request Aug 3, 2020
Maven85 pushed a commit to Maven85/kodi that referenced this pull request Aug 7, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Type: Cleanup non-breaking change which removes non-working or unmaintained functionality v19 Matrix
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants