New Ticket     Tickets     Wiki     Browse Source     Timeline     Roadmap     Ticket Reports     Search

Ticket #27757 (closed defect: fixed)

Opened 2 years ago

Last modified 20 months ago

mercurial: use python27

Reported by: singingwolfboy@… Owned by: deric@…
Priority: Normal Milestone:
Component: ports Version: 1.9.2
Keywords: Cc: marc.schlaich@…, sean@…, felix.buenemann@…, jowens@…, macports@…, macsforever2000@…, pixilla@…, macporter90210@…, mmoll@…
Port: mercurial

Description

We should default to the latest stable 2.x python, in this case Python 2.7. Patch attached.

Attachments

mercurial.patch (321 bytes) - added by singingwolfboy@… 2 years ago.

Change History

Changed 2 years ago by singingwolfboy@…

comment:1 follow-up: ↓ 14 Changed 2 years ago by joshmoz@…

Please don't do this until bug #27916 has been addressed. It'll cause a problematic version of python to be installed on more systems.

comment:2 Changed 2 years ago by deric@…

comment:3 Changed 2 years ago by marc.schlaich@…

Why not creating py26-mercurial and py27-mercurial according to the convention of python packages?

comment:4 Changed 2 years ago by ryandesign@…

Because mercurial s not a python module; it is a program that happens to use python.

comment:5 Changed 2 years ago by marc.schlaich@…

It is listed in PyPI (http://pypi.python.org/pypi/Mercurial), so it is obviously a python package!

To force a specific version of python is not very recommended. In combination with the port "tortoisehg" it forces a huge dependency list if the python version of mercurial is not your default python version (see #29498).

comment:6 Changed 2 years ago by marc.schlaich@…

  • Cc marc.schlaich@… added

Cc Me!

comment:7 Changed 2 years ago by sean@…

  • Cc sean@… added

Cc Me!

comment:8 Changed 2 years ago by felix.buenemann@…

  • Cc felix.buenemann@… added

Cc Me!

comment:9 Changed 2 years ago by ryandesign@…

  • Cc jowens@…, macports@… added
  • Summary changed from switch mercurial to Python 2.7 to mercurial: use python27

Has duplicates #29821, #30255.

comment:10 follow-up: ↓ 12 Changed 2 years ago by marc.schlaich@…

I should note again: Why there is no py26-mercurial and py27-mercurial? There are a lot of follow up packages which requires Mercurial as a package, for example hggit and hgsubversion, which exists only for Python 2.6 because of this weak port name.

comment:11 Changed 2 years ago by macsforever2000@…

  • Cc macsforever2000@… added

Cc Me!

comment:12 in reply to: ↑ 10 Changed 2 years ago by macports@…

Replying to marc.schlaich@…:

I should note again: Why there is no py26-mercurial and py27-mercurial? There are a lot of follow up packages which requires Mercurial as a package, for example hggit and hgsubversion, which exists only for Python 2.6 because of this weak port name.

As stated before, that naming convention is for python modules, not applications using python. It makes sense to have modules installed for more than one python version, but it does not make sense to have more than one instance of a Python-using app installed.

The more correct solution would be to use variants and have the default variant be python27 but use python26 or whatever other variant if that is the installed version. How to make that happen is something I haven't the time to dive into, but there are some ports that work this way (e.g. avahi).

comment:13 Changed 2 years ago by singingwolfboy@…

Actually, it might be more correct to separate the mercurial port into two parts: the Python module installed in the site-packages directory, which would follow the module naming convention of py2{5,6,7}-mercurial; and the CLI client (/opt/local/bin/hg) and all the support files under /opt/local/share/mercurial, which would simply be called mercurial. I.E. separate the parts of mercurial that are dependent on Python version from the parts of mercurial that aren't. We might also need to use the port_select behavior in Macports to switch between what Python version you want for the mercurial CLI client.

This seems like the most robust solution, but also the most work. :(

comment:14 in reply to: ↑ 1 Changed 2 years ago by pixilla@…

Replying to joshmoz@…:

Please don't do this until bug #27916 has been addressed. It'll cause a problematic version of python to be installed on more systems.

Replying to deric@…:

#27916 is http://bugs.python.org/issue9516 upstream

issue9516 has status: closed, resolution: fixed.

comment:15 Changed 2 years ago by pixilla@…

  • Cc pixilla@… added

Cc Me!

comment:16 Changed 21 months ago by ryandesign@…

  • Cc macporter90210@… added

Has duplicate #31417.

So, can this be done now?

comment:17 Changed 20 months ago by mmoll@…

  • Cc mmoll@… added

Cc Me!

comment:18 follow-up: ↓ 19 Changed 20 months ago by jmr@…

  • Status changed from new to closed
  • Resolution set to fixed

comment:19 in reply to: ↑ 18 Changed 20 months ago by and.damore@…

Replying to jmr@…:

r86604

Does this need variants in order to handle other python's versions as the port name is not in py-* form?

Note: See TracTickets for help on using tickets.