Commits

Jonathan Eunice  committed 6f3d357

cleaning up repo to clone

  • Participants
  • Parent commits 9b93595

Comments (0)

Files changed (8)

+syntax: glob
+*.swp.{py,txt,html,css,js}
+*.pyc
+.DS_Store
+.tox
+build/*
+dist/*
+*.egg-info/*
+setup.cfg
+PKG-INFO
+
+Installation
+============
+
+::
+
+    pip install namedentities
+        
+(You may need to prefix this with "sudo " to authorize installation.)
+
+**NOTA BENE** Code runs successfully under Python 3, but packaging
+seemingly doesn't work as yet.
+
+Usage
+=====
+
+Python 2::
+  
+    from namedentities import named_entities
+    
+    u = u'both em\u2014and–dashes…'
+    print named_entities(u)
+    
+Python 3::
+
+    from namedentities import named_entities
+    
+    u = 'both em\u2014and–dashes…'
+    print(named_entities(u))
+
+    
+History
+=======
+
+ * 1.0.8 No longer attempts to encode ``<``, ``>``, or 
+   ``&`` (or thier numerical equivalents) to avoid
+   interfering with HTML escaping.
+
+ * This is basically a packaging of Ian Beck's work
+   (described in http://beckism.com/2009/03/named_entities_python/)
+
+   Thank you, Ian!
+
+

File README.txt

-
-Installation
-============
-
-::
-
-    pip install namedentities
-        
-(You may need to prefix this with "sudo " to authorize installation.)
-
-**NOTA BENE** Code runs successfully under Python 3, but packaging
-seemingly doesn't work as yet.
-
-Usage
-=====
-
-Python 2::
-  
-    from namedentities import named_entities
-    
-    u = u'both em\u2014and–dashes…'
-    print named_entities(u)
-    
-Python 3::
-
-    from namedentities import named_entities
-    
-    u = 'both em\u2014and–dashes…'
-    print(named_entities(u))
-
-    
-History
-=======
-
- * 1.0.8 No longer attempts to encode ``<``, ``>``, or 
-   ``&`` (or thier numerical equivalents) to avoid
-   interfering with HTML escaping.
-
- * This is basically a packaging of Ian Beck's work
-   (described in http://beckism.com/2009/03/named_entities_python/)
-
-   Thank you, Ian!
-
-

File namedentities/example3.py

 from namedentities import named_entities
 
 u = 'both em\u2014and–dashes…'
-print(named_entities(u))
+print(named_entities(u))
+
+both em\u2014and–dashes…
+[pytest]
+python_files = test/*.py
 
 from setuptools import setup, find_packages
 
-readme = open('README.txt', 'r')
-README_TEXT = readme.read()
-readme.close()
-
 setup(
     name='namedentities',
-    version='1.0.8',
+    version='1.0.9',
     author='Jonathan Eunice',
     author_email='jonathan.eunice@gmail.com',
     description='Simple way to convert numeric HTML entities to far more readable named entities.',
-    long_description=README_TEXT,
+    long_description=open('README.rst').read(),
     url='http://bitbucket.org/jeunice/namedentities',
     packages = find_packages(),
     install_requires=[],
+    tests_require = ['tox', 'pytest','six'],
+    zip_safe = True,
+    keywords='HTML named entities numeric entities',
     classifiers=[
         'Development Status :: 4 - Beta',
         'Operating System :: OS Independent',
         'Intended Audience :: Developers',
         'Environment :: Web Environment',
         'Programming Language :: Python',
-        'Programming Language :: Python :: 2',
+        'Programming Language :: Python :: 2.7',
         'Topic :: Text Processing :: Filters',
         'Topic :: Text Processing :: Markup :: HTML'
     ]
-)
+)

File test/test.py

+
+
+import six
+from namedentities import named_entities
+
+def test_ne():
+    u = six.u('both em\u2014and–dashes…')
+    assert named_entities(u) == six.u("both em\u2014and–dashes…")
+[tox]
+envlist = py26, py27, py32, py33
+
+[testenv]
+changedir=test
+deps=
+    pytest
+    six
+commands=py.test