[issue13317] building with 2to3 generates wrong import paths because build_ext is run after build_py

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: needs patch -> 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



[issue13317] building with 2to3 generates wrong import paths because build_ext is run after build_py

2019-07-29 Thread STINNER Victor


STINNER Victor  added the comment:

This issue is no newcomer friendly, I remove the "easy" keyword.

--
keywords:  -easy
nosy: +vstinner

___
Python tracker 

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



[issue13317] building with 2to3 generates wrong import paths because build_ext is run after build_py

2015-12-22 Thread Swati Jaiswal

Swati Jaiswal added the comment:

Can someone help with tests? I just need a pointer on how to do it.

--
keywords: +patch
Added file: http://bugs.python.org/file41394/iss_13317.patch

___
Python tracker 

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



[issue13317] building with 2to3 generates wrong import paths because build_ext is run after build_py

2015-12-21 Thread Éric Araujo

Éric Araujo added the comment:

I’m not active in python-dev anymore.

The fix was noted in a previous comment:

build.sub_commands in distutils.command.build should list "build_ext" before 
"build_py".
lib2to3.fixes.fix_import will write global instead of local import statements 
else.

--
assignee: eric.araujo -> 
components:  -Distutils2
nosy: +dstufft
versions: +Python 3.5 -3rd party, Python 3.2, Python 3.3

___
Python tracker 

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



[issue13317] building with 2to3 generates wrong import paths because build_ext is run after build_py

2015-12-08 Thread Swati Jaiswal

Swati Jaiswal added the comment:

are you working on it @eric?

--
nosy: +curioswati

___
Python tracker 

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



[issue13317] building with 2to3 generates wrong import paths because build_ext is run after build_py

2013-03-10 Thread Éric Araujo

Éric Araujo added the comment:

For the record this is caused by #17393

--

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue13317
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue13317] building with 2to3 generates wrong import paths because build_ext is run after build_py

2011-11-21 Thread Éric Araujo

Éric Araujo mer...@netwok.org added the comment:

Ah, thanks for clarifying, I didn’t understand what you meant with local/global 
but now I see it’s about absolute imports and explicit relative imports.  (I 
don’t remember ever reading that terminology before looking at fix_import.)

I’m adding the “easy” keyword because it should not be too hard to write tests 
for this, with the examples and helpers we already have in the test suite and 
given that I’m available for help.

--
assignee: tarek - eric.araujo
components: +Distutils2 -2to3 (2.x to 3.x conversion tool)
keywords: +easy
nosy: +alexis
stage:  - needs patch
type:  - behavior
versions: +3rd party, Python 3.2, Python 3.3

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue13317
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue13317] building with 2to3 generates wrong import paths because build_ext is run after build_py

2011-11-05 Thread Arfrever Frehtes Taifersar Arahesis

Changes by Arfrever Frehtes Taifersar Arahesis arfrever@gmail.com:


--
nosy: +Arfrever

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue13317
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue13317] building with 2to3 generates wrong import paths because build_ext is run after build_py

2011-11-03 Thread Éric Araujo

Éric Araujo mer...@netwok.org added the comment:

Hello and thanks for the report.

 We need build_ext before build_py. Otherwise, when 2to3 is called (in 
 build_py),
 it will not find ext modules,
Why is 2to3 interested in extension modules?  2to3 converts Python code, 
extension modules are written in C or C++.

 thinking that those modules are global
I don’t understand what you mean.

Can you give me a Python or shell script to reproduce the error or a full 
description of what you did, what you expected and what went wrong?

--
nosy: +eric.araujo

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue13317
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue13317] building with 2to3 generates wrong import paths because build_ext is run after build_py

2011-11-03 Thread simohe

simohe sim...@besonet.ch added the comment:

fix_imports rewrites the import statements to local or global. When a python 
module loads a local extension module, this import statement should be 
converted to a local import (from . import extensionmodule). But when the 
extension module is not built yet, fix_imports does not find them (no file 
named extenstionmodule.[so|sl]). So it suggests a global import (import 
extensionmodule).


The original comment is a slightly modified version of this here:
http://selenic.com/hg/file/afc02adf4ded/contrib/setup3k.py#l223


short summary:

build.sub_commands in distutils.command.build should list build_ext before 
build_py.
lib2to3.fixes.fix_import will write global instead of local import statements 
else.

--
assignee:  - tarek
components: +Distutils -Build
nosy: +tarek

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue13317
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue13317] building with 2to3 generates wrong import paths because build_ext is run after build_py

2011-11-01 Thread simohe

New submission from simohe sim...@besonet.ch:

We need build_ext before build_py. Otherwise, when 2to3 is called (in 
build_py), it will not find ext modules, thinking that those modules are global 
and, consequently, making a mess, now that all module imports are global.

--
components: 2to3 (2.x to 3.x conversion tool), Build
messages: 146808
nosy: simohe
priority: normal
severity: normal
status: open
title: building with 2to3 generates wrong import paths because build_ext is run 
after build_py

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue13317
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com