Join GitHub today
GitHub is home to over 50 million developers working together to host and review code, manage projects, and build software together.
Sign upGitHub is where the world builds software
Millions of developers and companies build, ship, and maintain their software on GitHub — the largest and most advanced development platform in the world.
Update documentation for external cython modules #296
Conversation
Changes needed to compile the example: * add `include_dirs` directive * change imports to `lxml.includes.*` * fix `ElementDefaultClassLookup` typo Happy to make modifications if any of this is incorrect.
|
Thanks! |
| @@ -49,8 +49,14 @@ This is the easiest way of extending lxml at the C level. A Cython_ | |||
|
|
|||
| # My Cython extension | |||
|
|
|||
| # directive pointing compiler to lxml header files; | |||
| # use ``aliases={"LXML_PACKAGE_DIR": LXML_PACKAGE_DIR}`` | |||
scoder
Dec 29, 2019
Member
Writing LXML_PACKAGE_DIR on both sides here seems more confusing than necessary. It's not very clear which refers to the include_dirs value below, and which the user needs to provide (and how). It should work to use lxml.includes.__path__ for the alias value (assuming lxml is already installed at build time, which setuptools and pip can take care of).
Writing LXML_PACKAGE_DIR on both sides here seems more confusing than necessary. It's not very clear which refers to the include_dirs value below, and which the user needs to provide (and how). It should work to use lxml.includes.__path__ for the alias value (assuming lxml is already installed at build time, which setuptools and pip can take care of).
dgreisen
Dec 29, 2019
Author
Contributor
addressed. On my machine, lxml.__path__ works, while lxml.includes.__path__ does not, so I updated as requested but kept it pointing to lxml root directory
addressed. On my machine, lxml.__path__ works, while lxml.includes.__path__ does not, so I updated as requested but kept it pointing to lxml root directory
scoder
Dec 30, 2019
Member
Ah, right. The api C header files end up in that directory, so lxml.__path__ is correct.
Ah, right. The api C header files end up in that directory, so lxml.__path__ is correct.
addresses code review
Changes needed to compile the example:
include_dirsdirectivelxml.includes.*ElementDefaultClassLookuptypoHappy to make modifications if any of this is incorrect.