Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update documentation for external cython modules #296

Merged
merged 2 commits into from Dec 30, 2019
Merged

Conversation

@dgreisen
Copy link
Contributor

@dgreisen dgreisen commented Dec 29, 2019

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.

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.
Copy link
Member

@scoder scoder left a comment

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}``

This comment has been minimized.

@scoder

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).

This comment has been minimized.

@dgreisen

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

This comment has been minimized.

@scoder

scoder Dec 30, 2019
Member

Ah, right. The api C header files end up in that directory, so lxml.__path__ is correct.

addresses code review
@scoder scoder merged commit 7432362 into lxml:master Dec 30, 2019
1 of 2 checks passed
1 of 2 checks passed
continuous-integration/travis-ci/pr The Travis CI build failed
Details
continuous-integration/appveyor/pr AppVeyor build succeeded
Details
@dgreisen dgreisen deleted the dgreisen:patch-4 branch Dec 30, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked issues

Successfully merging this pull request may close these issues.

None yet

2 participants
You can’t perform that action at this time.