hglib uses distutils that is being deprecated

Barry Scott barry at barrys-emacs.org
Mon Nov 7 14:23:37 UTC 2016


So that I could use the recents improvements to python-hglib I built a wheel.

I needed to patch setup.py to do this /distutils/setuputils/ so that I could
create the wheel with

     python3 setup.py sdist bdist_wheel

Then when I installed my wheel I go this:

$ pip3.5 install --upgrade  /home/barry/wc/hg/hglib/dist/
python_hglib-2.2_6_0f81ed8e147b_20161107-py3-none-any.whl 
Processing /home/barry/wc/hg/hglib/dist/
python_hglib-2.2_6_0f81ed8e147b_20161107-py3-none-any.whl
Installing collected packages: python-hglib
  Found existing installation: python-hglib 2.0
    DEPRECATION: Uninstalling a distutils installed project (python-hglib) has 
been deprecated and will be removed in a future version. This is due to the 
fact that uninstalling a distutils project will only partially uninstall the 
project.
    Uninstalling python-hglib-2.0:
      Successfully uninstalled python-hglib-2.0
Successfully installed python-hglib-2.2-6-0f81ed8e147b-20161107

Do you have a plan to update to setuputils?

I'm guessing that you want to use distutils to support verion old python 
versions. If that is true then I'd guess that the setup.py would need to do
something like:

try:
     from setuptools import setup
except ImportError:
     from distutils import setup

Barry



More information about the Mercurial-devel mailing list