# Midnight commander and Python3 support



## Lefteris (Jul 10, 2019)

Hi, I have seen a lot of ports changes in the latest port tree of FreeBSD v12.0 a few days ago and just about all Python port dependencies I have switched to Python3 except midnight commander. Are there any known plans to do so for MC as well? I didn't see any options to build it manually using python3 (is there a way to do that?) but I would rather use the binary updates.

Lefteris


----------



## SirDice (Jul 10, 2019)

Lefteris said:


> I have seen a lot of ports changes in the latest port tree of FreeBSD v12.0 a few days ago


Nothing more than the usual churn. I'm betting you're looking at a lot of changes because the quarterly branch was updated from Q2 to Q3. 



Lefteris said:


> just about all Python port dependencies I have switched to Python3


The default Python changed several months ago. I'm not entirely sure if that happened _before_ or _after_ the Q2 branching. 




__





						[ports] Revision 498529
					






					svnweb.freebsd.org
				






Lefteris said:


> Are there any known plans to do so for MC as well?


Eventually all ports will need to switch as Python 2.7 will be end-of-life. 




Lefteris said:


> I didn't see any options to build it manually using python3


There's no option for it, it's pretty much "hard-coded":

```
USES= gmake gnome libtool perl5 pkgconfig python:2.7,run shebangfix tar:xz
```



> (is there a way to do that?)


You can try removing the 2.7 from the `USES` line but I'm betting it's not going to work (or else this would have been done already).


----------



## Lefteris (Jul 10, 2019)

I saw that and was thinking of switching the 2.7 to 3.6 but I thought it was there for a reason. Thank you


----------



## VladiBG (Jul 10, 2019)

You can try misc/mc-light/

Port is: DEPRECATED: Unfetchable, unmaintained


----------



## Lefteris (Jul 10, 2019)

I tried it a few times actually and I would prefer it over MC as it is lighter indeed but I had a few issues. Adjusting terminal size for example would core dump. Colors were not that great either.


----------



## _martin (Sep 12, 2019)

Lefteris said:


> was thinking of switching the 2.7 to 3.6


Lefteris That's exactly what I did. I use mc heavily but  I don't want to deal with the py27 mess. Manually editing Makefile and keeping that in mind for future updates will be painful but lesser of two evils.
According to this: #3936 there's no dependency on python in mc. ldd output proves that too. 
I guess some plugins may depend on it. Never used any, so hard to say. 
But I haven't encountered any issues with mc so far.


----------



## SirDice (Sep 13, 2019)

Those two plugins are installed by default and appear to be the only two files that require python. The uc1541 plugin allows browsing C64/C128 D64 disk images. The s3+ plugin allows browsing Amazon's S3 storage. I can test the uc1541 plugin, I have a rather large collection of C64 disks. I'm not able to test S3 though.


----------



## _martin (Sep 13, 2019)

As SirDice mentioned there there are two python plugins in mc by default. They are under /usr/local/libexec/mc/extfs.d. Both of them are python3 scripts. Beats me why port requires python2. It may be an error.
I've contacted the port maintainer to check if this is an error or not.

EDIT:  Eh, while script has python3 header it's python2 code. I guess this is a result of manual edit of Makefile. I don't care about these plugins but it's a pitty I didn't check this before contacting maintainer.


----------



## woodsb02 (Oct 1, 2019)

Hi folks, the misc/mc port maintainer here... sorry I have been non-responsive on this thread until now - life has been busy.

Status update as of today, looking at the 2 upstream bugs for the 2 mc plugins that depend on python:

#3936 uc1541 - plugin has been fixed for the upcoming mc 4.8.24 release
#3904 s3+ - plugin currently broken anyway
Given this, when I update the port to 4.8.24 (after it is released), I will change the dependency to python3.


----------



## woodsb02 (Jan 20, 2020)

The misc/mc port was today updated to version 4.8.24 and python dependencies were updated to allow either python 2 or python 3 (using the default of python 3.7 as defined by the ports framework).





						[ports] Revision 523694
					






					svnweb.freebsd.org


----------

