You are not logged in.

#1 2014-05-23 02:24:14

mmix
Member
Registered: 2014-01-11
Posts: 33

gedit 3.12.1 --enable-python=no

hi,

i think gedit with python option is wrong,
because, it's python3 dependency.

for some reason, i need python2 only.
python3 is python symlinked, it cause compatibility problem.

sudo ln -sf /usr/bin/python2 /usr/bin/python

i don't use python3, so removed it, and build gedit like this:

./configure --prefix=/usr --enable-python=no

Offline

#2 2014-05-23 03:23:50

Scimmia
Fellow
Registered: 2012-09-01
Posts: 13,729

Re: gedit 3.12.1 --enable-python=no

And what do you expect to happen by posting here?

Offline

#3 2014-05-23 04:25:12

mmix
Member
Registered: 2014-01-11
Posts: 33

Re: gedit 3.12.1 --enable-python=no

i just wish gedit without python by default in arch.

Offline

#4 2014-05-23 04:28:21

ewaller
Administrator
From: Pasadena, CA
Registered: 2009-07-13
Posts: 20,722

Re: gedit 3.12.1 --enable-python=no

Arch assumes Python 3.  Breaking the symlink by hand and linking Python 2 on Arch is a really bad idea.  I strongly discourage that.
It is your system, but making that change means you will not be able to obtain help here.

You may want to grab the PKGBUILD for gedit, patch it do disable the Python option, and build it yourself

Last edited by ewaller (2014-05-23 04:30:55)


Nothing is too wonderful to be true, if it be consistent with the laws of nature -- Michael Faraday
The shortest way to ruin a country is to give power to demagogues.— Dionysius of Halicarnassus
---
How to Ask Questions the Smart Way

Offline

#5 2014-05-23 05:04:32

Scimmia
Fellow
Registered: 2012-09-01
Posts: 13,729

Re: gedit 3.12.1 --enable-python=no

mmix, my point is that posting here won't do anything. If you want something changed in a package, you post a bug or a feature request in the bug tracker.

Just know, there's very little chance of this happening unless python3 in gedit is causing problems. Python2 is a dead end, python3 is the future.

Offline

#6 2014-05-23 07:48:10

mmix
Member
Registered: 2014-01-11
Posts: 33

Re: gedit 3.12.1 --enable-python=no

oh i didn't know that python3 is so important to arch.

BTW, in my condition, i don't care about python*, as long as it work for me.
but python3 as python break my work system, so i did it.
i didn't ask the help, but suggestion, cause, i think this is little inconvenient.

Anyway thanks for the info/reply.

Offline

#7 2014-05-31 17:46:39

mmix
Member
Registered: 2014-01-11
Posts: 33

Re: gedit 3.12.1 --enable-python=no

Python2 is a dead end, python3 is the future.

well, someone doesn't think so,
i know how to use python, but still have no interest.
https://medium.com/@deliciousrobots/pyt … 2ad703365d

Offline

#8 2014-05-31 18:01:36

Scimmia
Fellow
Registered: 2012-09-01
Posts: 13,729

Re: gedit 3.12.1 --enable-python=no

mmix wrote:

Python2 is a dead end, python3 is the future.

well, someone doesn't think so,
i know how to use python, but still have no interest.
https://medium.com/@deliciousrobots/pyt … 2ad703365d

That entire post is just someone whining that 3rd party libs haven't been ported. Do you really want to use libs that haven't been touched in years? I ran into this recently in a python lib someone used that wasn't available on Arch. A little research turned up that it was a lib that the author abandoned in 1999 and Debian has been limping along, even though there are maintained libs that do the same thing. No thanks.

Offline

#9 2014-05-31 18:16:15

WorMzy
Administrator
From: Scotland
Registered: 2010-06-16
Posts: 13,721
Website

Re: gedit 3.12.1 --enable-python=no

btw, if it "cause compatibility problem" having /usr/bin/python be a symlink to python3, then you're doing it wrong. If your scripts need python2, then they should explicitly call for python2. If they need python3, they should call for python3.

The only time you should call for 'python', is when your scripts will work with both python2 or python3.


Sakura:-
Mobo: MSI MAG X570S TORPEDO MAX // Processor: AMD Ryzen 9 5950X @4.9GHz // GFX: AMD Radeon RX 5700 XT // RAM: 32GB (4x 8GB) Corsair DDR4 (@ 3000MHz) // Storage: 1x 3TB HDD, 6x 1TB SSD, 2x 120GB SSD, 1x 275GB M2 SSD

Making lemonade from lemons since 2015.

Online

#10 2014-05-31 19:03:15

mmix
Member
Registered: 2014-01-11
Posts: 33

Re: gedit 3.12.1 --enable-python=no

@Scimmia:
i don't think he is whining, he said something fundamental.

@WorMzy:
should i edit script to "s/python/python2/g"? no thanks,
in my condition, gedit3 only rely on python3, so i removed gedit from arch,
built gedit with enable-python=no option, everything is now fine.
i have no time to edit "#!/usr/bin/python" in other numerous scripts.

Offline

#11 2014-05-31 19:26:48

WorMzy
Administrator
From: Scotland
Registered: 2010-06-16
Posts: 13,721
Website

Re: gedit 3.12.1 --enable-python=no

There's no need for the g, your shebangs are (or should be) only on the first line. But yes, if you want the scripts to use python2, you should have them call python2.

find /home/user/myscripts -type f -iname "*.py" -exec sed -i '1s:python$:python2:' {} \;

Should take care of most of your scripts. There may be a few corner cases where the pattern doesn't match. Saying "I don't have time to fix my scripts" is simply lazy. Besides, adhering to good coding practices shouldn't be an afterthought.


Sakura:-
Mobo: MSI MAG X570S TORPEDO MAX // Processor: AMD Ryzen 9 5950X @4.9GHz // GFX: AMD Radeon RX 5700 XT // RAM: 32GB (4x 8GB) Corsair DDR4 (@ 3000MHz) // Storage: 1x 3TB HDD, 6x 1TB SSD, 2x 120GB SSD, 1x 275GB M2 SSD

Making lemonade from lemons since 2015.

Online

#12 2014-05-31 19:30:45

mmix
Member
Registered: 2014-01-11
Posts: 33

Re: gedit 3.12.1 --enable-python=no

well, "There's more than one way to do it".

Offline

#13 2014-05-31 20:59:40

Scimmia
Fellow
Registered: 2012-09-01
Posts: 13,729

Re: gedit 3.12.1 --enable-python=no

mmix wrote:

@Scimmia:
i don't think he is whining, he said something fundamental.

@WorMzy:
should i edit script to "s/python/python2/g"? no thanks,
in my condition, gedit3 only rely on python3, so i removed gedit from arch,
built gedit with enable-python=no option, everything is now fine.
i have no time to edit "#!/usr/bin/python" in other numerous scripts.

Yes, it is fundamental that there is a lot of old, dead code out there.

As for changing the shebang, see http://legacy.python.org/dev/peps/pep-0394/

Offline

#14 2014-09-28 06:13:30

mmix
Member
Registered: 2014-01-11
Posts: 33

Re: gedit 3.12.1 --enable-python=no

here is another method:
https://developer.mozilla.org/en-US/Fir … requisites

By default, Arch Linux uses Python3. You'll have to force it to use the old python2. You can do that by linking the python2 executable to python but this is discouraged and considered error-prone. This will also break python 3 if it is installed on your system. A better way is to use virtualenv/virtualenvwrapper:

sudo pacman -S python-virtualenvwrapper
source /usr/bin/virtualenvwrapper.sh
mkvirtualenv -p `which python2` firefoxos
workon firefoxos

Offline

Board footer

Powered by FluxBB