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年10月05日 06:51 by raorn, last changed 2022年04月11日 14:56 by admin. This issue is now closed.
| Files | ||||
|---|---|---|---|---|
| File name | Uploaded | Description | Edit | |
| docembed.patch | pitrou, 2011年11月29日 18:16 | review | ||
| docembed-edits.patch | eric.araujo, 2012年01月06日 16:43 | review | ||
| Messages (21) | |||
|---|---|---|---|
| msg60573 - (view) | Author: Sir Raorn (raorn) | Date: 2004年10月05日 06:51 | |
Missing documentation part about linking program with libpython (embedding python). Questions are: How one can get needed CFLAGS (-I... -D...) How one can get needed LDFLAGS (-L... -l...) For now, applications assumes that headers located in PREFIX/include/pythonX.Y, libraries located in EXEC_PREFIX/lib/pythonX.Y/config |
|||
| msg109742 - (view) | Author: Mark Lawrence (BreamoreBoy) * | Date: 2010年07月09日 14:15 | |
The number of google hits tells me this is still an issue. |
|||
| msg148568 - (view) | Author: Éric Araujo (eric.araujo) * (Python committer) | Date: 2011年11月29日 14:05 | |
I did not found all these Google hist. Most of the links on the first page for "link libpython" are bug reports which are rejected by maintainers. Related: http://mail.python.org/pipermail/python-dev/2006-February/060549.html So, what do people link with libpython for? |
|||
| msg148573 - (view) | Author: Eli Bendersky (eli.bendersky) * (Python committer) | Date: 2011年11月29日 14:44 | |
Éric, this is for embedding a Python interpreter in a C/C++ application. I tend to agree that the official doc page (http://docs.python.org/extending/embedding.html) on this topic is somewhat lacking in the area of the configuration/compilation procedure. There's some info scattered around the web in tutorials, though. So I'd say it's a valid issue. |
|||
| msg148587 - (view) | Author: Antoine Pitrou (pitrou) * (Python committer) | Date: 2011年11月29日 17:37 | |
There is (outdated, incomplete and clumsy) documentation about using distutils.sysconfig from the command-line. I'll try to work on a small patch. It will probably be Unix-only, though. |
|||
| msg148589 - (view) | Author: Antoine Pitrou (pitrou) * (Python committer) | Date: 2011年11月29日 18:04 | |
Attached patch rewrites the offending paragraphs. |
|||
| msg148590 - (view) | Author: Antoine Pitrou (pitrou) * (Python committer) | Date: 2011年11月29日 18:16 | |
Updated markup. |
|||
| msg148591 - (view) | Author: Eli Bendersky (eli.bendersky) * (Python committer) | Date: 2011年11月29日 18:29 | |
Antoine, this is a big improvement - LGTM. |
|||
| msg148684 - (view) | Author: Roundup Robot (python-dev) (Python triager) | Date: 2011年11月30日 20:25 | |
New changeset 2c05b8a6cdd1 by Antoine Pitrou in branch '3.2': Issue #1040439: better document how to compile and link an embedded Python interpreter. http://hg.python.org/cpython/rev/2c05b8a6cdd1 New changeset 528abe272856 by Antoine Pitrou in branch 'default': Issue #1040439: better document how to compile and link an embedded Python interpreter. http://hg.python.org/cpython/rev/528abe272856 |
|||
| msg148685 - (view) | Author: Ray (rpq) | Date: 2011年11月30日 20:38 | |
I think mentioning that you can export CFLAGS and LDFLAGS would be particularly useful. I was able to compile some of the missing packages that were deemed 'missing' at the end of 'make' by updating setup.py and having CFLAGS and LDFLAGS point to the desired packages' directories... Unfortunately for linux, the ability to specify *multiple* lib/ and include/ paths using this method is currently not available unless you modify setup.py. I opened a ticket in relation to this: Issue13511 if anyone cares. |
|||
| msg148686 - (view) | Author: Antoine Pitrou (pitrou) * (Python committer) | Date: 2011年11月30日 20:48 | |
> I think mentioning that you can export CFLAGS and LDFLAGS would be > particularly useful. I was able to compile some of the missing > packages that were deemed 'missing' at the end of 'make' by updating > setup.py and having CFLAGS and LDFLAGS point to the desired packages' > directories... Unless I'm missing something, this is slightly off-topic for this issue, which is about using Python as an embedded interpreter, not compiling it. Embedding Python assumes it has already been built. |
|||
| msg148725 - (view) | Author: Éric Araujo (eric.araujo) * (Python committer) | Date: 2011年12月01日 14:14 | |
I did a review on Rietveld. |
|||
| msg150740 - (view) | Author: Éric Araujo (eric.araujo) * (Python committer) | Date: 2012年01月06日 16:43 | |
Attached patch adds the useful bits from the review I did; I hope you won’t think it’s pointless nitpicking. |
|||
| msg150746 - (view) | Author: Antoine Pitrou (pitrou) * (Python committer) | Date: 2012年01月06日 16:55 | |
> Attached patch adds the useful bits from the review I did; I hope you > won’t think it’s pointless nitpicking. Looks good to me. |
|||
| msg152687 - (view) | Author: Roundup Robot (python-dev) (Python triager) | Date: 2012年02月05日 12:50 | |
New changeset 79e8de78abd0 by Éric Araujo in branch '3.2': Markup improvements for the embedding CPython doc patch from #1040439 http://hg.python.org/cpython/rev/79e8de78abd0 New changeset 1cb9b8126534 by Éric Araujo in branch 'default': Merge edits from 3.2 (#13716, #1040439, #2945, #13770, #6715) http://hg.python.org/cpython/rev/1cb9b8126534 |
|||
| msg152741 - (view) | Author: Éric Araujo (eric.araujo) * (Python committer) | Date: 2012年02月06日 15:51 | |
Is there still work to do on this issue? |
|||
| msg152742 - (view) | Author: Antoine Pitrou (pitrou) * (Python committer) | Date: 2012年02月06日 16:20 | |
> Is there still work to do on this issue? Not for Unix, no. I don't if it's applicable to Windows. |
|||
| msg152928 - (view) | Author: Eli Bendersky (eli.bendersky) * (Python committer) | Date: 2012年02月09日 04:32 | |
ISTM that part of the doc specifically deals with Unix, so this issue can be closed as completed. Windows is a different issue. Perhaps the documentation should have a new section on embedding on Windows, similarly to the "Building C and C++ Extensions on Windows" section in the "extending" documentation. Anyway, if there's interest in that, it should be a separate issue. |
|||
| msg154300 - (view) | Author: Éric Araujo (eric.araujo) * (Python committer) | Date: 2012年02月26日 02:49 | |
Is there any reason not to backport to 2.7? (Yes, I’m volunteering.) |
|||
| msg154905 - (view) | Author: Eli Bendersky (eli.bendersky) * (Python committer) | Date: 2012年03月04日 19:09 | |
Éric, go ahead :) |
|||
| msg191812 - (view) | Author: Ned Deily (ned.deily) * (Python committer) | Date: 2013年06月24日 21:35 | |
I've now backported the 3.x update to the 2.7 docs in Issue18164 (I hadn't noticed that this issue was still open). As Eli noted, if any updates are needed to cover Windows, a separate issue should be opened. I'm closing this one. |
|||
| History | |||
|---|---|---|---|
| Date | User | Action | Args |
| 2022年04月11日 14:56:07 | admin | set | github: 40984 |
| 2013年06月24日 21:35:58 | ned.deily | set | status: open -> closed nosy: + ned.deily messages: + msg191812 resolution: fixed stage: patch review -> resolved |
| 2012年06月08日 12:38:10 | eli.bendersky | set | nosy:
- eli.bendersky |
| 2012年03月04日 19:09:06 | eli.bendersky | set | messages: + msg154905 |
| 2012年02月26日 02:49:55 | eric.araujo | set | messages: + msg154300 |
| 2012年02月09日 04:32:56 | eli.bendersky | set | messages: + msg152928 |
| 2012年02月06日 16:20:58 | pitrou | set | messages: + msg152742 |
| 2012年02月06日 15:51:32 | eric.araujo | set | messages: + msg152741 |
| 2012年02月05日 12:50:14 | python-dev | set | messages: + msg152687 |
| 2012年01月06日 16:55:01 | pitrou | set | messages: + msg150746 |
| 2012年01月06日 16:43:11 | eric.araujo | set | files:
+ docembed-edits.patch messages: + msg150740 |
| 2011年12月01日 14:14:31 | eric.araujo | set | messages: + msg148725 |
| 2011年11月30日 20:48:00 | pitrou | set | messages: + msg148686 |
| 2011年11月30日 20:38:58 | rpq | set | nosy:
+ rpq messages: + msg148685 |
| 2011年11月30日 20:25:11 | python-dev | set | nosy:
+ python-dev messages: + msg148684 |
| 2011年11月29日 18:29:43 | eli.bendersky | set | messages: + msg148591 |
| 2011年11月29日 18:16:31 | pitrou | set | files: - docembed.patch |
| 2011年11月29日 18:16:20 | pitrou | set | files:
+ docembed.patch messages: + msg148590 |
| 2011年11月29日 18:04:13 | pitrou | set | files:
+ docembed.patch keywords: + patch messages: + msg148589 stage: needs patch -> patch review |
| 2011年11月29日 17:37:48 | pitrou | set | nosy:
+ pitrou messages: + msg148587 |
| 2011年11月29日 14:44:29 | eli.bendersky | set | messages: + msg148573 |
| 2011年11月29日 14:05:05 | eric.araujo | set | nosy:
+ eric.araujo messages: + msg148568 title: Missing documentation on How To Link With libpython -> Missing documentation on how to link with libpython |
| 2011年11月29日 07:30:32 | eli.bendersky | set | nosy:
+ eli.bendersky |
| 2011年11月29日 06:32:39 | ezio.melotti | set | nosy:
- BreamoreBoy stage: needs patch versions: + Python 2.7, Python 3.3 |
| 2010年07月09日 14:15:05 | BreamoreBoy | set | versions:
+ Python 3.2, - Python 2.6 nosy: + docs@python, BreamoreBoy messages: + msg109742 assignee: docs@python |
| 2009年02月14日 18:21:41 | ajaksu2 | set | versions: + Python 2.6 |
| 2004年10月05日 06:51:11 | raorn | create | |