hglib uses distutils that is being deprecated

Pierre-Yves David pierre-yves.david at ens-lyon.org
Mon Nov 7 09:51:49 EST 2016



On 11/07/2016 03:37 PM, Barry Scott wrote:
> On Monday, 7 November 2016 15:28:33 GMT Pierre-Yves David wrote:
>> On 11/07/2016 03:23 PM, Barry Scott wrote:
>>> 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
>>
>> I know that Gregory Szorc is building wheel for Mercurial itself. We can
>> probably use the same approache used by Mercurial in hglib (whatever
>> this approach is). Can you send a patch for hglib?
>>
>
> I don't think a wheel is created for mercurial.

The internet disagree https://pypi.python.org/pypi/Mercurial

> On Windows its a .exe and
> on Fedoara the site-specific/mercurial is installed from the RPM.
>
> Looking a bit closer at hglib I only see PyPI with a .tar.gz source file.
> I guess you do nto use wheels at all and pip will do the setup.py install
> dance for the user.
>
> I could patch to change from distutil to setuputil. But someone that knows
> hglib's packaging strategy needs to speak to what is sensible to do.

Cheers,

-- 
Pierre-Yves David


More information about the Mercurial-devel mailing list