|
msg73393 - (view) |
Author: Eyal Lotem (Peaker) |
Date: 2008-09-18 18:11 |
When using either the ext_package keyword argument to setup, or when
using the "pkg.name" module name notation to Extension instances,
distutils installs the compiled extensions into the appropriate package
directory.
However, distutils does not create an __init__.py file in that
directory, so it is not actually a package and is not importable.
|
|
msg119366 - (view) |
Author: Éric Araujo (eric.araujo) *  |
Date: 2010-10-22 08:35 |
Thanks for the report. To the best of my knowledge, distutils never generates Python files, and the docs for ext_modules or ext_package don’t imply __init__.py will be generated. IOW, for “pkg.foo”, you’re supposed to have pkg/__init__.py and pkg/foo.c.
I think this bug is invalid, or is a request for a small doc improvement. Do you agree?
|
|
msg120586 - (view) |
Author: Éric Araujo (eric.araujo) *  |
Date: 2010-11-06 06:26 |
Reclassifying as request for doc enhancement. I’ll check the distutils2 doc and add a line about this problem if I find the text is not clear enough.
Someone finding this report thanks to the “easy” keyword can feel free to propose a patch.
|
|
msg144773 - (view) |
Author: Éric Araujo (eric.araujo) *  |
Date: 2011-10-02 14:14 |
We’re working on a patch on the core-mentorship list.
|
|
msg145146 - (view) |
Author: Mike Hoy (mikehoy) |
Date: 2011-10-07 21:23 |
> We’re working on a patch on the core-mentorship list.
Éric, I emailed the diff to the Core-Mentorship list, but since there was no reply I will just attach it here. Please review patch and let me know if you want any changes.
|
|
msg145209 - (view) |
Author: Éric Araujo (eric.araujo) *  |
Date: 2011-10-09 03:44 |
>> We’re working on a patch on the core-mentorship list.
> I emailed the diff to the Core-Mentorship list, but since there
> was no reply I will just attach it here.
I added that message here to avoid someone else working on the same bug. I did not reply to the mailing list because it’s not easy to review emailed patches and I don’t have Internet access each day.
> Please review patch and let me know if you want any changes.
Done. You should have received an email; if not, follow the link titled “review” on the right of your patch.
|
|
msg145272 - (view) |
Author: Mike Hoy (mikehoy) |
Date: 2011-10-09 16:15 |
Submitted v2 of my patch after reading Éric's review of my first.
|
|
msg145303 - (view) |
Author: Éric Araujo (eric.araujo) *  |
Date: 2011-10-10 15:35 |
You did not reply to my first question on apiref.rst, and you did not rewrap your lines to 80 chars :)
|
|
msg145311 - (view) |
Author: Mike Hoy (mikehoy) |
Date: 2011-10-10 18:47 |
Responded to first question in apiref and uploaded a new patch that wraps lines at 80 characters.
|
|
msg145382 - (view) |
Author: Mike Hoy (mikehoy) |
Date: 2011-10-12 01:18 |
setupscript did not have the changes that were made in apiref. v4 is now consistent and line wrapping at 80 chars.
|
|
msg145416 - (view) |
Author: Éric Araujo (eric.araujo) *  |
Date: 2011-10-12 16:56 |
Looks good, will commit.
|
|
msg146082 - (view) |
Author: Roundup Robot (python-dev) |
Date: 2011-10-21 13:52 |
New changeset f84040b11211 by Éric Araujo in branch 'default':
Document that packaging doesn’t create __init__.py files (#3902).
http://hg.python.org/cpython/rev/f84040b11211
|
|
msg146088 - (view) |
Author: Éric Araujo (eric.araujo) *  |
Date: 2011-10-21 14:02 |
I thought about the wording again and committed a different version. I also decided not to backport to distutils; see the commit message for a rationale. Thanks for the help!
|
|
| Date |
User |
Action |
Args |
| 2011-10-21 14:02:51 | eric.araujo | set | status: open -> closed versions:
- 3rd party, Python 2.7, Python 3.2 messages:
+ msg146088
components:
- Distutils, Distutils2 resolution: fixed stage: patch review -> committed/rejected |
| 2011-10-21 13:52:28 | python-dev | set | nosy:
+ python-dev messages:
+ msg146082
|
| 2011-10-12 16:56:48 | eric.araujo | set | messages:
+ msg145416 |
| 2011-10-12 01:18:13 | mikehoy | set | files:
+ apiref-setupscript-v4.diff
messages:
+ msg145382 |
| 2011-10-10 18:47:39 | mikehoy | set | files:
+ apiref-setupscript-v3.diff
messages:
+ msg145311 |
| 2011-10-10 15:35:19 | eric.araujo | set | messages:
+ msg145303 |
| 2011-10-09 16:15:53 | mikehoy | set | files:
+ apiref-setupscript-v2.diff
messages:
+ msg145272 |
| 2011-10-09 03:44:22 | eric.araujo | set | messages:
+ msg145209 |
| 2011-10-07 21:23:27 | mikehoy | set | files:
+ distutils-init.py-apiref-setup.diff
nosy:
+ mikehoy messages:
+ msg145146
keywords:
+ patch |
| 2011-10-02 14:14:31 | eric.araujo | set | versions:
+ Python 2.7, Python 3.2, Python 3.3 nosy:
+ alexis
messages:
+ msg144773
components:
+ Distutils stage: needs patch -> patch review |
| 2010-11-06 06:26:33 | eric.araujo | set | title: distutils does not create __init__.py for packages containing extension modules -> Packages containing only extension modules have to contain __init__.py nosy:
tarek, eric.araujo, Peaker versions:
+ 3rd party, - Python 3.1, Python 2.7, Python 3.2 messages:
+ msg120586
components:
+ Documentation, Distutils2, - Distutils keywords:
+ easy stage: needs patch |
| 2010-10-22 08:35:33 | eric.araujo | set | messages:
- msg113049 |
| 2010-10-22 08:35:27 | eric.araujo | set | assignee: tarek -> eric.araujo messages:
+ msg119366 nosy:
+ eric.araujo, - terry.reedy title: distutils does not correctly create packages for compiled extensions -> distutils does not create __init__.py for packages containing extension modules |
| 2010-08-05 20:44:44 | terry.reedy | set | nosy:
+ terry.reedy messages:
+ msg113049
|
| 2010-07-11 11:07:05 | BreamoreBoy | set | versions:
+ Python 3.2, - Python 2.6, Python 3.0 |
| 2009-02-06 09:17:05 | tarek | set | assignee: tarek nosy:
+ tarek versions:
+ Python 2.6, Python 3.0, Python 3.1, Python 2.7, - Python 2.5 |
| 2008-09-18 18:11:45 | Peaker | create | |