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 pip import and version check from setup.py to make doit install with setuptools 50.0 #369

Merged
merged 1 commit into from
Sep 1, 2020

Conversation

Kwpolska
Copy link
Contributor

Changes to how setuptools 50 works means that installing doit crashes with a cryptic KeyError (most likely caused by setuptools and pip’s monkeypatching of distutils). This check is not really necessary (most people have a newer pip these days).


Error:

$ ./setup.py
/tmp/venv/lib64/python3.8/site-packages/_distutils_hack/__init__.py:30: UserWarning: Setuptools is replacing distutils.
  warnings.warn("Setuptools is replacing distutils.")
Traceback (most recent call last):
  File "./setup.py", line 44, in <module>
    setup(name = 'doit',
  File "/tmp/venv/lib64/python3.8/site-packages/setuptools/__init__.py", line 152, in setup
    _install_setup_requires(attrs)
  File "/tmp/venv/lib64/python3.8/site-packages/setuptools/__init__.py", line 145, in _install_setup_requires
    dist.parse_config_files(ignore_option_errors=True)
  File "/tmp/venv/lib64/python3.8/site-packages/setuptools/dist.py", line 665, in parse_config_files
    self._parse_config_files(filenames=filenames)
  File "/tmp/venv/lib64/python3.8/site-packages/setuptools/dist.py", line 572, in _parse_config_files
    filenames = self.find_config_files()
  File "/tmp/venv/lib64/python3.8/site-packages/setuptools/_distutils/dist.py", line 353, in find_config_files
    sys_dir = os.path.dirname(sys.modules['distutils'].__file__)
KeyError: 'distutils'

Please consider making a new release to PyPI, since this makes it hard to install doit (and its dependents, like Nikola). Please also consider adding wheels to the PyPI release to simplify installation (./setup.py sdist bdist_wheel to build, then upload both files).

Changes to how setuptools 50 works means that installing doit crashes with a cryptic KeyError (most likely caused by setuptools and pip’s monkeypatching of distutils). This check is not really necessary (most people have a newer pip these days).
@schettino72
Copy link
Member

schettino72 commented Sep 1, 2020

thanks. also added a wheel file as you suggested.

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 this pull request may close these issues.

2 participants