Commits

Julian Rosse committed 232083c

testing

  • Participants
  • Parent commits 5e760e9

Comments (0)

Files changed (9)

+syntax: glob
+
+.DS_Store
+*.pyc
+*.pyo
+*.bak
+*.swp
+*.egg-info
+*.so
+*.cpp
+MANIFEST
+build/
+dist/
+exclude *.py
+include setup.py
+include MANIFEST.in README.txt
+recursive-include pyces *.pyx *.pxd *.pxi *.py
+recursive-include tests *.py

README

-Pyces
+Pyces
++++++
+
+Pyces aims to be an ElementTree/lxml-compatible binding for the
+Xerces-C++ XML parsing library.
+
+It is implemented using Cython to interface to Xerces.

pyces/__init__.py

+#

pyces/pyces.etree.pyx

 cimport tree
+
+def hello( x ):
+    return x
-cdef extern from "xercesc/dom/DOM.hpp" namespace "xercesc":
-    cdef cppclass DOMElement:
-       XMLCh* getTagName()
+# cdef extern from "xercesc/util/XercesDefs.hpp" namespace "xercesc":
+#     ctypedef unsigned int XMLCh
+
+# cdef extern from "xercesc/dom/DOM.hpp" namespace "xercesc":
+#     cdef cppclass DOMElement:
+#        XMLCh* getTagName()
 from distutils.extension import Extension
 from Cython.Distutils import build_ext
 
-setup( cmdclass=dict( build_ext=build_ext ),
+version = "0.0"
+with open( "README.txt" ) as file:
+    long_description = file.read()
+
+setup( name="Pyces",
+       version=version,
+       author="Julian Rosse",
+       author_email="julian@helixbass.net",
+       maintainer="Julian Rosse",
+       maintainer_email="julian@helixbass.net",
+       url="http://bitbucket.org/helixbass/pyces",
+       license="MIT",
+       description="XML processing library combining Xerces-C++ with the ElementTree API",
+       long_description=long_description,
+       packages=[ "pyces" ],
+       classifiers=[ "Development Status :: 3 - Alpha",
+                     "Intended Audience :: Developers",
+                     "License :: OSI Approved :: MIT License",
+                     "Programming Language :: Cython",
+                     "Programming Language :: Python",
+                     "Programming Language :: C",
+                     "Operating System :: OS Independent",
+                     "Topic :: Text Processing :: Markup :: HTML",
+                     "Topic :: Text Processing :: Markup :: XML" ],
+       cmdclass=dict( build_ext=build_ext ),
        ext_modules=[ Extension( "pyces.etree",
-                                [ "pyces.etree.pyx" ],
+                                [ "pyces/pyces.etree.pyx" ],
                                 language="c++",
                                 libraries=[ "stdc++",
-                                            "xerces-c" ] ) ] )
+                                            # "xerces-c"
+                                            ] ) ] )

test/test_etree.py

+from unittest import TestCase
+
+class SimpleTest( TestCase ):
+    def test_hello( self ):
+        from pyces import etree
+        self.assertEquals( etree.hello( "abc" ), "abc" )