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.
Created on 2004年02月13日 08:24 by goeran, last changed 2022年04月11日 14:56 by admin.
| Files | ||||
|---|---|---|---|---|
| File name | Uploaded | Description | Edit | |
| pyconfig-includedir.patch | lotheac, 2014年09月05日 19:41 | review | ||
| Messages (8) | |||
|---|---|---|---|
| msg19983 - (view) | Author: Göran Uddeborg (goeran) | Date: 2004年02月13日 08:24 | |
When configuring Python with an explicit --includedir most of the header files do turn up in this directory. But the pyconfig.h is still placed in $(prefix)/include. I assume it is a bug, and this file too should be placed according to --includedir. |
|||
| msg19984 - (view) | Author: Pelle Johansson (morth) | Date: 2004年10月23日 13:52 | |
Logged In: YES user_id=180081 Actually, pyconfig.h is placed in $(exec-prefix)/include. This is fine as the file is architecture dependant. However the other header files use a local #include "pyconfig.h" which will not match if it's not the same dir. If you like me want a common directory for all archindependant files and then separate for each arch it causes additional headache, since there's no easy way for me to symlink from the arch include/ dir to the archindependant, as they have a common subdir (python2.3/ in my case). Currently it seems I'll have to symlink each header file individually from the archindependent dir to the arch ones. Ideally pyconfig.h would be put directly in $(exec-prefix)/include/ and be refered to as <pyconfig.h>. I could then just symlink the subdir. Whether to honor includedir or not I don't know, I'll leave that problem to the project. |
|||
| msg19985 - (view) | Author: Martin v. Löwis (loewis) * (Python committer) | Date: 2006年04月12日 08:05 | |
Logged In: YES user_id=21627 I don't think I will do anything about this anytime soon, so unassigning myself. |
|||
| msg59177 - (view) | Author: Christian Heimes (christian.heimes) * (Python committer) | Date: 2008年01月03日 23:33 | |
I'm able to reproduce the bug with 2.6 |
|||
| msg114322 - (view) | Author: Mark Lawrence (BreamoreBoy) * | Date: 2010年08月19日 05:50 | |
Is this still a problem, sorry I don't have a box to test it on? |
|||
| msg114420 - (view) | Author: Göran Uddeborg (goeran) | Date: 2010年08月20日 08:33 | |
I tried by building Python 3.1.2 with the configuration ... --prefix=$home/ptest --includedir=$home/ptest/myspecialincludedir pyconfig.h still wound up in $prefix/include/python3.1, while all other header files were correctly placed in $prefix/myspecialincludedir/python3.1. So yes, it is still a problem. |
|||
| msg192579 - (view) | Author: Christian Heimes (christian.heimes) * (Python committer) | Date: 2013年07月07日 18:37 | |
I found the reason for the issue. pyconfig.h is installed to CONFINCLUDEPY. The other header files are copied to INCLUDEPY INCLUDEDIR= @includedir@ CONFINCLUDEDIR= $(exec_prefix)/include INCLUDEPY= $(INCLUDEDIR)/python$(LDVERSION) CONFINCLUDEPY= $(CONFINCLUDEDIR)/python$(LDVERSION) @for i in $(srcdir)/Include/*.h; \ do \ echo $(INSTALL_DATA) $$i $(INCLUDEPY); \ $(INSTALL_DATA) $$i $(DESTDIR)$(INCLUDEPY); \ done $(INSTALL_DATA) pyconfig.h $(DESTDIR)$(CONFINCLUDEPY)/pyconfig.h |
|||
| msg226448 - (view) | Author: Lauri Tirkkonen (lotheac) | Date: 2014年09月05日 19:41 | |
Patch attached to set CONFINCLUDEDIR to --includedir. There's additionally some hardcoded assumptions in sysconfig and distutils.sysconfig about the include paths, of which this patch fixes some.
What it doesn't address is sysconfig.get_path with 'include' or 'platinclude'. There 'include', however, were already broken if python was configured with --includedir ('platinclude' was correct because it was hardcoded, and pyconfig.h always installed to the same place). I think those should also be fixable by getting the correct directories from _sysconfigdata instead of hardcoding possible 'installation schemes' and trying some de-facto paths based on those. I suspect this is also a problem for library paths, but this issue is only concerned with includedir.
I suspect the problem that 'CONFINCLUDEDIR' was trying to solve is separating platform-dependent headers from platform-independent ones, but it doesn't actually solve that problem correctly: pyconfig.h does not go in --includedir AND the hardcoded include path for pyconfig.h doesn't go in "python-config --includes" output.
|
|||
| History | |||
|---|---|---|---|
| Date | User | Action | Args |
| 2022年04月11日 14:56:02 | admin | set | github: 39936 |
| 2020年07月03日 05:43:58 | ned.deily | set | nosy:
- Mario Gonzalez |
| 2020年07月03日 05:41:06 | ned.deily | set | messages: - msg372730 |
| 2020年07月01日 04:25:57 | Mario Gonzalez | set | nosy:
+ Mario Gonzalez messages: + msg372730 |
| 2014年09月05日 19:41:35 | lotheac | set | files:
+ pyconfig-includedir.patch nosy: + lotheac messages: + msg226448 keywords: + patch |
| 2014年02月03日 17:05:53 | BreamoreBoy | set | nosy:
- BreamoreBoy |
| 2013年07月07日 18:37:31 | christian.heimes | set | stage: needs patch messages: + msg192579 versions: + Python 3.3, Python 3.4, Python 3.5 |
| 2010年08月20日 08:33:34 | goeran | set | messages: + msg114420 |
| 2010年08月19日 05:50:40 | BreamoreBoy | set | nosy:
+ BreamoreBoy messages: + msg114322 versions: + Python 3.1, Python 2.7, Python 3.2, - Python 2.6, Python 3.0 |
| 2009年02月14日 11:32:18 | ajaksu2 | set | type: behavior |
| 2008年01月03日 23:33:54 | christian.heimes | set | priority: normal -> low nosy: + christian.heimes messages: + msg59177 severity: normal -> minor versions: + Python 2.6, Python 3.0, - Python 2.2 |
| 2004年02月13日 08:24:58 | goeran | create | |