Opened 6 years ago

Closed 6 years ago

#57344 closed defect (fixed)

mpv dose not work niether variants nor info with Error: No python variant selected when variants.conf has +python37

Reported by: stanimura Owned by: Ionic (Mihai Moldovan)
Priority: Normal Milestone:
Component: ports Version: 2.5.3
Keywords: Cc: yan12125 (Chih-Hsuan Yen), chrstphrchvz (Christopher Chavez)
Port: mpv

Description

info and variants dose not work for mpv

$ port info mpv
Error: No python variant selected. You must select at least one. The highest value will be used.
Error: Unable to open port: Select a python variant.
$ port variants mpv
Error: No python variant selected. You must select at least one. The highest value will be used.
Error: Unable to open port: Select a python variant.

This happens when +python37 and -python27 are added to variants.conf.

The solution is to edit Profile of mpv.

--- /opt/local/var/macports/sources/rsync.macports.org/release/tarballs/ports/multimedia/mpv/Portfile	2018-10-08 22:35:29.000000000 +0900
+++ mpv.Portfile	2018-10-11 18:51:19.000000000 +0900
@@ -277,9 +277,9 @@


 # Shameless copy from ipe-tools.
-set python.versions         {27 36}
+set python.versions         {27 37}
 # Remove after 07-30-2018.
-dict set python.legacy_versions 35 36
+dict set python.legacy_versions 35 36 37
 set python.default_version  27
 set python.version          ""

This works both info and variants. With the edited Portfile, mpv can build and the resulted mpv works for me.

Change History (5)

comment:1 Changed 6 years ago by ryandesign (Ryan Carsten Schmidt)

Cc: ionic@… removed
Keywords: variants.conf removed
Owner: set to Ionic
Status: newassigned

The problem isn't that your variants.conf contains +python37; the problem is that it contains -python27. You might want to remove that.

But yes, python37 support should be added to the mpv portfile as you suggest.

comment:2 Changed 6 years ago by yan12125 (Chih-Hsuan Yen)

Cc: yan12125 added

comment:3 Changed 6 years ago by chrstphrchvz (Christopher Chavez)

Cc: chrstphrchvz added

comment:4 Changed 6 years ago by chrstphrchvz (Christopher Chavez)

To be clear, the proposed changes intend to add a subport for Python 3.7, and replace (obsolete) all pre-3.7 subports with the 3.7 subport, correct?

I'm not too familiar with Tcl syntax, but I think this line:

dict set python.legacy_versions 35 36 37

is invalid, and would lead to some error like

missing value to go with key
while evaluating dict set python.legacy_versions 35 36 37

If the 3.6 subport is being obsoleted by the 3.7 subport, and the 3.5 subport has been obsolete long enough that it can be removed, could the changes then just be:

-set python.versions         {27 36}
+set python.versions         {27 37}
-# Remove after 07-30-2018.
+# Remove (or comment out, until Python 3.8 released?) after 2020-mm-dd
-dict set python.legacy_versions 35 36
+dict set python.legacy_versions 36 37

comment:5 Changed 6 years ago by chrstphrchvz (Christopher Chavez)

Resolution: fixed
Status: assignedclosed

In 884b468f6ca721f384a96115d6e53c0f39590f16/macports-ports (master):

mpv: add +python37 variant

Mark +python36 variant as obsolete
Remove obsolete variant +python35

Closes: #57344

Note: See TracTickets for help on using tickets.