[issue29442] Use argparse and drop dirty optparse hacks in setup.py

2017-02-19 Thread Xavier de Gaye

Xavier de Gaye added the comment:

> I'm not familiar with CPython conventions. Sorry if reopening an issue is 
> impolite.

IMO asking if it's ok to reopen this issue by using the word 'impolite' is a 
clear reference to the fact that Stefan had told you previously that you are 
being insulting by saying "it's a dirty hack ". Not only did not you take the 
opportunity given by Stefan at that time to express your apologies as expected, 
but instead you repeated it, and here your are making fun of him by using the 
word 'impolite' when you could have asked if it is correct or allowed to reopen 
an issue.

Few months ago you uttered the same kind of insults then directed at me in 
msg264605, a post addressed to Guido van Rossum in issue 26858.

Please do read the CPython Code of Conduct and try to remember that the people 
that take the time to answer your posts do it on their own free time and that 
you should be nice to them.

I am nosying Brett Cannon, the CPython maintainer and core dev in charge of the 
respect of the CoC.

--
nosy: +brett.cannon, haypo, xdegaye

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue29442] Use argparse and drop dirty optparse hacks in setup.py

2017-02-16 Thread Stefan Krah

Stefan Krah added the comment:

It's okay to reopen if some conditions have changed (which is the case here).

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue29442] Use argparse and drop dirty optparse hacks in setup.py

2017-02-16 Thread Chi Hsuan Yen

Changes by Chi Hsuan Yen :


Removed file: http://bugs.python.org/file46511/setup-argparse.patch

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue29442] Use argparse and drop dirty optparse hacks in setup.py

2017-02-16 Thread Chi Hsuan Yen

Chi Hsuan Yen added the comment:

Now I have a working patch at PR 139, and dropping optparse is still the way to 
go, so I reopen it.

I'm not familiar with CPython conventions. Sorry if reopening an issue is 
impolite.

--
resolution: not a bug -> 
status: closed -> open

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue29442] Use argparse and drop dirty optparse hacks in setup.py

2017-02-16 Thread Chi Hsuan Yen

Changes by Chi Hsuan Yen :


--
pull_requests: +99

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue29442] Use argparse and drop dirty optparse hacks in setup.py

2017-02-15 Thread Chi Hsuan Yen

Chi Hsuan Yen added the comment:

Aha the fix is simple => issue29567

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue29442] Use argparse and drop dirty optparse hacks in setup.py

2017-02-13 Thread Chi Hsuan Yen

Chi Hsuan Yen added the comment:

You're right. argparse has indirect dependency on dynamic modules so it can't 
be used in setup.py. Cross builds use prebuilt Python binaries so there's no 
problem. Sorry for those noises.

I still think it's a dirty hack as it limits scalability and brings lots of 
problems when adding new features, but I can't find a good way to remove it :(

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue29442] Use argparse and drop dirty optparse hacks in setup.py

2017-02-13 Thread Stefan Krah

Stefan Krah added the comment:

On Mon, Feb 13, 2017 at 03:04:09PM +, Chi Hsuan Yen wrote:
> 
> Chi Hsuan Yen added the comment:
> 
> I have used my old patch several days on Android, and it seems quite fine. 
> Anyway that's not important anymore.

I find that very surprising:

./python -E -S -m sysconfig --generate-posix-vars ;\
if test $? -ne 0 ; then \
echo "generate-posix-vars failed" ; \
rm -f ./pybuilddir.txt ; \
exit 1 ; \
fi
Traceback (most recent call last):
  File "./setup.py", line 4, in 
import sys, os, importlib.machinery, re, argparse
  File "/home/stefan/althome/pydev/commit-master-LATEST/Lib/argparse.py", line 
93, in 
from gettext import gettext as _, ngettext
  File "/home/stefan/althome/pydev/commit-master-LATEST/Lib/gettext.py", line 
49, in 
import locale, copy, io, os, re, struct, sys
  File "/home/stefan/althome/pydev/commit-master-LATEST/Lib/struct.py", line 
13, in 
from _struct import *
ModuleNotFoundError: No module named '_struct'

Yes, it is important, because you called the original a "dirty hack", which
some core devs do not appreciate.

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue29442] Use argparse and drop dirty optparse hacks in setup.py

2017-02-13 Thread Chi Hsuan Yen

Chi Hsuan Yen added the comment:

I have used my old patch several days on Android, and it seems quite fine. 
Anyway that's not important anymore.

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue29442] Use argparse and drop dirty optparse hacks in setup.py

2017-02-13 Thread Stefan Krah

Changes by Stefan Krah :


--
resolution:  -> not a bug
stage:  -> resolved
status: open -> closed

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue29442] Use argparse and drop dirty optparse hacks in setup.py

2017-02-13 Thread Stefan Krah

Stefan Krah added the comment:

It's not a matter of *necessary*, you simply cannot use argparse in setup.py.  
Try to build with your patch and you'll see.

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue29442] Use argparse and drop dirty optparse hacks in setup.py

2017-02-13 Thread Chi Hsuan Yen

Chi Hsuan Yen added the comment:

I've found a simpler patch set for supporting Android builds, so I don't need 
this patch anymore. If you don't think it's necessary, just close it.

> usage of os.system() in some places

I'm indeed sick with them :D

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue29442] Use argparse and drop dirty optparse hacks in setup.py

2017-02-05 Thread Brett Cannon

Changes by Brett Cannon :


--
nosy:  -brett.cannon

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue29442] Use argparse and drop dirty optparse hacks in setup.py

2017-02-04 Thread Stefan Krah

Stefan Krah added the comment:

I didn't look at this one, but some "hacks" are necessary in setup.py (example: 
usage of os.system() in some places).

--
nosy: +skrah

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue29442] Use argparse and drop dirty optparse hacks in setup.py

2017-02-03 Thread Chi Hsuan Yen

New submission from Chi Hsuan Yen:

The change is clear and self-explained. See the patch.

Motivations:

1. The hack "To prevent optparse from raising an exception..." works for single 
letter flags (-I, -L, etc.) only. I plan to add --sysroot related codes for 
Android builds and I don't want more hacks. Apparently argparse does not need 
this hack as it can parse all known flags before throwing an error
2. optparse is deprecated

Add the developer that introduced this hack. Also Serhiy, who sseems interested 
in removing optparse from the code base. (issue18973, issue18971)

--
components: Build
files: setup-argparse.patch
keywords: patch
messages: 286922
nosy: Chi Hsuan Yen, brett.cannon, serhiy.storchaka
priority: normal
severity: normal
status: open
title: Use argparse and drop dirty optparse hacks in setup.py
type: enhancement
versions: Python 3.7
Added file: http://bugs.python.org/file46511/setup-argparse.patch

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com