question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

RFE: move from distutils to setuptools (& `setup.py build_sphinx`)

See original GitHub issue
[tkloczko@barrel ipython-7.24.1]$ grep distutils setup.py
# BEFORE importing distutils, remove MANIFEST. distutils doesn't properly
from distutils.core import setup
# custom distutils commands
from distutils.command.sdist import sdist

Looks like ipython is still using distutils and by this it does not support setup.py build_sphinx:

+ /usr/bin/python3 setup.py build_sphinx -b man --build-dir build/sphinx
/usr/lib64/python3.8/distutils/dist.py:274: UserWarning: Unknown distribution option: 'project_urls'
  warnings.warn(msg)
usage: setup.py [global_opts] cmd1 [cmd1_opts] [cmd2 [cmd2_opts] ...]
   or: setup.py --help [cmd1 cmd2 ...]
   or: setup.py --help-commands
   or: setup.py cmd --help

error: invalid command 'build_sphinx'

It would be good to move to setuptools.

Issue Analytics

  • State:closed
  • Created 2 years ago
  • Comments:10 (9 by maintainers)

github_iconTop GitHub Comments

1reaction
pradyunsgcommented, Aug 31, 2021

My two cents: it would be a good idea to move to flit, since IPython is a pure-Python project and doesn’t need most of the additional capabilities afforded by setuptools.

1reaction
kloczekcommented, Aug 30, 2021

distutils is also deprecated from Python 3.10 : https://www.python.org/dev/peps/pep-0632/

Good point. I just added note in my ticket against flit to not generate settup.py with import distutils becasue oof that PEP.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Porting from Distutils - Setuptools - Python Packaging Authority
Porting from Distutils#. Setuptools and the PyPA have a stated goal to make Setuptools the reference API for distutils. Since the 60.0.0 release,...
Read more >
2. Writing the Setup Script — Python 3.11.1 documentation
The setup script is the centre of all activity in building, distributing, and installing modules using the Distutils. The main purpose of the...
Read more >
Setuptools integration - Sphinx documentation
The Sphinx build can then be triggered from distutils, and some Sphinx options can be set in setup.py or setup.cfg instead of Sphinx's...
Read more >
BuildDoc Class — sphinx documentation
Distutils command to build Sphinx documentation. The Sphinx build can then be triggered from distutils, and some Sphinx options can be set in...
Read more >
Getting Started with Paver - PythonHosted.org
<== # sh('cd docs/samples/started/oldway; python setup.py sdist', ... Paver lets you continue to use distutils and setuptools commands.
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found