This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

classification
Title: setup.py: Python header file dependencies
Type: compile error Stage: resolved
Components: Build Versions: Python 3.2, Python 3.3, Python 2.7
process
Status: closed Resolution: fixed
Dependencies: Superseder:
Assigned To: Nosy List: eric.araujo, python-dev, skrah
Priority: high Keywords: patch

Created on 2012-02-28 17:00 by skrah, last changed 2022-04-11 14:57 by admin. This issue is now closed.

Files
File name Uploaded Description Edit
issue14152.diff skrah, 2012-02-29 10:46 review
Messages (10)
msg154556 - (view) Author: Stefan Krah (skrah) * (Python committer) Date: 2012-02-28 17:00
The arraymodule depends on "structmember.h". Patch attached.
msg154565 - (view) Author: Stefan Krah (skrah) * (Python committer) Date: 2012-02-28 19:28
There is a comment in setup.py that suggests that *all* Python headers
should be added to the dependencies (?):


  # Python header files
  headers = [sysconfig.get_config_h_filename()]
  headers += glob(os.path.join(sysconfig.get_path('platinclude'), "*.h"))


Was that the intention? Because this is what I get when I add a
print statement:

['/home/stefan/pydev/cpython/pyconfig.h', '/home/stefan/pydev/cpython/pyconfig.h']
msg154579 - (view) Author: Stefan Krah (skrah) * (Python committer) Date: 2012-02-28 23:29
In Python2.6 all headers from Include/ were added:

   # Python header files
   headers = glob("Include/*.h") + ["pyconfig.h"]
msg154598 - (view) Author: Éric Araujo (eric.araujo) * (Python committer) Date: 2012-02-29 04:16
Does the 2.6 code work when you build in a subdirectory?  (I assume that’s why sysconfig is used instead of hard-coding, but I’ll check the VCS log when I have some time to be sure.)
msg154599 - (view) Author: Éric Araujo (eric.araujo) * (Python committer) Date: 2012-02-29 04:19
I actually meant: when you build in any directory other that the top-level checkout directory.
msg154609 - (view) Author: Stefan Krah (skrah) * (Python committer) Date: 2012-02-29 10:08
Dependency support added: 1be93dd179df

Last good version (all Include/*.h): 9705ef3fdb22

Current behavior (only pyconfig.h): fa69e891edf4


To answer your question: Neither of the last two revisions builds
in an out-of-source directory.

Raising the priority to high: The missing dependencies caused a
bug report on core-mentorship that was extremely time consuming
until I finally had the revelation that the submitter did not
run `make distclean` after `hg fetch` (which would not be necessary
with the dependencies in place).
msg154610 - (view) Author: Stefan Krah (skrah) * (Python committer) Date: 2012-02-29 10:46
Here's a patch.
msg154615 - (view) Author: Éric Araujo (eric.araujo) * (Python committer) Date: 2012-02-29 11:31
> To answer your question: Neither of the last two revisions builds
> in an out-of-source directory.
My question was more whether the last known good revision did :)

> Here's a patch.
Tested with Python built in the top-level dir and in another dir, works in both cases.  Please apply, but not to security-only branches.
msg154628 - (view) Author: Roundup Robot (python-dev) (Python triager) Date: 2012-02-29 13:18
New changeset 1c77eadba9dc by Stefan Krah in branch '3.2':
Issue #14152: Restore the Include/*.h dependencies for extension builds.
http://hg.python.org/cpython/rev/1c77eadba9dc

New changeset c85812b0e97d by Stefan Krah in branch 'default':
Issue #14152: Merge fix from 3.2.
http://hg.python.org/cpython/rev/c85812b0e97d

New changeset 3e2c230f4664 by Stefan Krah in branch '2.7':
Issue #14152: backport fix.
http://hg.python.org/cpython/rev/3e2c230f4664
msg154629 - (view) Author: Stefan Krah (skrah) * (Python committer) Date: 2012-02-29 13:26
??ric Araujo <report@bugs.python.org> wrote:
> > To answer your question: Neither of the last two revisions builds
> > in an out-of-source directory.
> My question was more whether the last known good revision did :)

That's what I meant. "last two revisions" was intended to refer to
the last two entries in the list. But I see the ambiguity.  :)

Thanks for reviewing!
History
Date User Action Args
2022-04-11 14:57:27adminsetgithub: 58360
2012-02-29 13:35:47eric.araujosetstatus: open -> closed
resolution: fixed
stage: patch review -> resolved
2012-02-29 13:26:01skrahsetmessages: + msg154629
2012-02-29 13:18:24python-devsetnosy: + python-dev
messages: + msg154628
2012-02-29 11:31:09eric.araujosetmessages: + msg154615
versions: - Python 3.1
2012-02-29 10:48:55skrahsetstage: patch review
versions: + Python 3.1, Python 2.7, Python 3.2
2012-02-29 10:48:31skrahsetfiles: - arraymodule_deps.diff
2012-02-29 10:46:02skrahsetfiles: + issue14152.diff
keywords: + patch
messages: + msg154610
2012-02-29 10:08:30skrahsetpriority: normal -> high
keywords: - patch
messages: + msg154609
2012-02-29 04:19:13eric.araujosetmessages: + msg154599
2012-02-29 04:16:02eric.araujosetnosy: + eric.araujo
messages: + msg154598
2012-02-28 23:29:49skrahsetmessages: + msg154579
2012-02-28 19:28:03skrahsettitle: arraymodule: structmember.h dependency -> setup.py: Python header file dependencies
messages: + msg154565
stage: patch review -> (no value)
2012-02-28 17:00:06skrahcreate