Permalink
Browse files

moved public Cython/C declarations into 'lxml.include' package, which…

… is now returned by lxml.get_include()

--HG--
rename : src/lxml/c14n.pxd => src/lxml/include/c14n.pxd
rename : src/lxml/config.pxd => src/lxml/include/config.pxd
rename : src/lxml/dtdvalid.pxd => src/lxml/include/dtdvalid.pxd
rename : src/lxml/etree_defs.h => src/lxml/include/etree_defs.h
rename : src/lxml/etreepublic.pxd => src/lxml/include/etreepublic.pxd
rename : src/lxml/htmlparser.pxd => src/lxml/include/htmlparser.pxd
rename : src/lxml/relaxng.pxd => src/lxml/include/relaxng.pxd
rename : src/lxml/schematron.pxd => src/lxml/include/schematron.pxd
rename : src/lxml/tree.pxd => src/lxml/include/tree.pxd
rename : src/lxml/uri.pxd => src/lxml/include/uri.pxd
rename : src/lxml/xinclude.pxd => src/lxml/include/xinclude.pxd
rename : src/lxml/xmlerror.pxd => src/lxml/include/xmlerror.pxd
rename : src/lxml/xmlparser.pxd => src/lxml/include/xmlparser.pxd
rename : src/lxml/xmlschema.pxd => src/lxml/include/xmlschema.pxd
rename : src/lxml/xpath.pxd => src/lxml/include/xpath.pxd
rename : src/lxml/xslt.pxd => src/lxml/include/xslt.pxd
  • Loading branch information...
1 parent 85652b2 commit 6d33615e46e4a2316331c1bfe8051875abf59ed3 @scoder scoder committed Mar 2, 2012
View
@@ -89,6 +89,8 @@ def ext_modules(static_include_dirs, static_library_dirs,
_define_macros = define_macros()
_libraries = libraries()
+ _include_dirs.append(os.path.join(get_base_dir(), PACKAGE_PATH, 'include'))
+
if _library_dirs:
message = "Building against libxml2/libxslt in "
if len(_library_dirs) > 1:
@@ -10,10 +10,12 @@ def get_include():
"""
lxml_path = __path__[0]
include_path = os.path.join(lxml_path, 'include')
- includes = [lxml_path]
+ includes = [include_path, lxml_path]
for name in os.listdir(include_path):
- includes.append(os.path.join(include_path, name))
+ path = os.path.join(include_path, name)
+ if os.path.isdir(path):
+ includes.append(path)
return includes
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
@@ -1,7 +1,10 @@
-# public Pyrex/C interface to lxml.etree
+# public Cython/C interface to lxml.etree
cimport tree
+cdef extern from "lxml-version.h":
+ cdef char* LXML_VERSION_STRING
+
cdef extern from "etree_defs.h":
# test if c_node is considered an Element (i.e. Element, Comment, etc.)
cdef bint _isElement(tree.xmlNode* c_node) nogil
File renamed without changes.
File renamed without changes.
File renamed without changes.
@@ -1,6 +1,7 @@
from libc cimport stdio
cdef extern from "lxml-version.h":
+ # deprecated declaration, use etreepublic.pxd instead
cdef char* LXML_VERSION_STRING
cdef extern from "libxml/xmlversion.h":
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
View
@@ -118,7 +118,7 @@ def create_version_h(svn_version):
svn_version += '.0'
version_h = open(
- os.path.join(get_base_dir(), 'src', 'lxml', 'lxml-version.h'),
+ os.path.join(get_base_dir(), 'src', 'lxml', 'include', 'lxml-version.h'),
'w')
version_h.write('''\
#ifndef LXML_VERSION_STRING

0 comments on commit 6d33615

Please sign in to comment.