[issue27226] distutils: unable to compile both .opt-1.pyc and .opt2.pyc simultaneously

2021-02-03 Thread Steve Dower


Steve Dower  added the comment:

Distutils is now deprecated (see PEP 632) and all tagged issues are being 
closed. From now until removal, only release blocking issues will be considered 
for distutils.

If this issue does not relate to distutils, please remove the component and 
reopen it. If you believe it still requires a fix, most likely the issue should 
be re-reported at https://github.com/pypa/setuptools

--
nosy: +steve.dower
resolution:  -> out of date
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



[issue27226] distutils: unable to compile both .opt-1.pyc and .opt2.pyc simultaneously

2020-11-06 Thread Brett Cannon


Change 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



[issue27226] distutils: unable to compile both .opt-1.pyc and .opt2.pyc simultaneously

2020-10-19 Thread Éric Araujo

Éric Araujo  added the comment:

FWIW the behaviour in distutils was intended to be controlled by the setup.p 
options, but in fact also depended on the options of the python command itself 
(-O and dont-write-bytecode option/envvar).  This was changed in distutils2 but 
judged too big to fix in distutils: 
https://hg.python.org/distutils2/rev/7c0a88497b5c

--

___
Python tracker 

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



[issue27226] distutils: unable to compile both .opt-1.pyc and .opt2.pyc simultaneously

2016-07-24 Thread Chris Mayo

Changes by Chris Mayo :


--
nosy: +cjmayo

___
Python tracker 

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



[issue27226] distutils: unable to compile both .opt-1.pyc and .opt2.pyc simultaneously

2016-06-05 Thread Brett Cannon

Changes by Brett Cannon :


--
versions:  -Python 3.5

___
Python tracker 

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



[issue27226] distutils: unable to compile both .opt-1.pyc and .opt2.pyc simultaneously

2016-06-05 Thread Brett Cannon

Changes by Brett Cannon :


--
type: behavior -> enhancement

___
Python tracker 

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



[issue27226] distutils: unable to compile both .opt-1.pyc and .opt2.pyc simultaneously

2016-06-05 Thread Michał Górny

Michał Górny added the comment:

Yes, you could put it like this.

--

___
Python tracker 

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



[issue27226] distutils: unable to compile both .opt-1.pyc and .opt2.pyc simultaneously

2016-06-05 Thread Brett Cannon

Brett Cannon added the comment:

But distutils still does the right thing with -O2 and --optimize 2, right? If 
that's the case then this is an enhancement request to add support to distutils 
to compile all bytecode levels and not a regression.

--

___
Python tracker 

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



[issue27226] distutils: unable to compile both .opt-1.pyc and .opt2.pyc simultaneously

2016-06-05 Thread Michał Górny

Michał Górny added the comment:

Brett, .pyc was controlled by --compile and .pyo by --optimize (either 1 or 2). 
Technically only two variants could be used simultaneously, and distutils 
accounted for that.

Now you have .pyc + .opt-1.pyc + .opt-2.pyc, so three variants instead of two.

--

___
Python tracker 

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



[issue27226] distutils: unable to compile both .opt-1.pyc and .opt2.pyc simultaneously

2016-06-05 Thread Brett Cannon

Brett Cannon added the comment:

So the reason Python does the right thing at install is because compileall is 
used by the Makefile to do the compilation and it's run twice (it actually 
doesn't use distutils for this).

My question is what did distutils do before PEP 488 since .pyc and .pyo files 
had different names before as well? Did distutils build both previously and so 
this is a regression? Or is this a feature request?

--

___
Python tracker 

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



[issue27226] distutils: unable to compile both .opt-1.pyc and .opt2.pyc simultaneously

2016-06-05 Thread Ned Deily

Ned Deily added the comment:

Since this is an addition to the changes made for PEP 488 (Issue23731), nosying 
Brett

--
nosy: +brett.cannon, ned.deily

___
Python tracker 

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



[issue27226] distutils: unable to compile both .opt-1.pyc and .opt2.pyc simultaneously

2016-06-05 Thread Arfrever Frehtes Taifersar Arahesis

Arfrever Frehtes Taifersar Arahesis added the comment:

I would suggest using --optimize=1,2 / -O1,2 for this purpose.

Documentation in this part of Lib/distutils/command/build_py.py and 
Lib/distutils/command/install_lib.py should also be updated:

('optimize=', 'O',
 "also compile with optimization: -O1 for \"python -O\", "
 "-O2 for \"python -OO\", and -O0 to disable [default: -O0]"),

--
nosy: +Arfrever
versions: +Python 3.6

___
Python tracker 

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



[issue27226] distutils: unable to compile both .opt-1.pyc and .opt2.pyc simultaneously

2016-06-04 Thread Michał Górny

Changes by Michał Górny :


--
keywords: +patch
Added file: 
http://bugs.python.org/file43231/0001-distutils-make-OO-enable-both-opt-1-and-opt-2-optimi.patch

___
Python tracker 

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



[issue27226] distutils: unable to compile both .opt-1.pyc and .opt2.pyc simultaneously

2016-06-04 Thread Michał Górny

New submission from Michał Górny:

Since 3.5, optimized Python modules for -O and -OO are installed using 
different names. The Python build system itself seems to been prepared for this 
as Python itself is built with both .opt-1.pyc and .opt-2.pyc files built. 
However, distutils at the moment can only install one of them.

Gentoo is relying on 'setup.py install --compile -O2' doing the right thing. We 
can change the arguments if necessary but calling it twice would require a lot 
of conditional changes to how we build packages. Of course, not installing both 
variants is not an option since it causes Python to attempt to write them at 
runtime later.

Could we please get some way to build both .opt-1.pyc and .opt-2.pyc in 
setup.py install? Either through making -O2 build also -O1 implicitly, or 
providing an ability to specify multiple optimization levels.

Relevant Gentoo bug: https://bugs.gentoo.org/585060

--
components: Distutils
messages: 267389
nosy: dstufft, eric.araujo, mgorny
priority: normal
severity: normal
status: open
title: distutils: unable to compile both .opt-1.pyc and .opt2.pyc simultaneously
type: behavior
versions: Python 3.5

___
Python tracker 

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