Commits

Kirill Simonov committed 8396a07

Use setuptools for setup.py. Dropped setup_with_libyaml.py; to build libyaml bindings, use --with-libyaml.

Comments (0)

Files changed (3)

lib/yaml/__init__.py

 
 try:
     from cyaml import *
+    with_libyaml = True
 except ImportError:
-    pass
+    with_libyaml = False
 
 def scan(stream, Loader=Loader):
     """
 
 NAME = 'PyYAML'
-VERSION = '3.05'
+VERSION = '3.06'
 DESCRIPTION = "YAML parser and emitter for Python"
 LONG_DESCRIPTION = """\
 YAML is a data serialization format designed for human readability and
 URL = "http://pyyaml.org/wiki/PyYAML"
 DOWNLOAD_URL = "http://pyyaml.org/download/pyyaml/%s-%s.tar.gz" % (NAME, VERSION)
 CLASSIFIERS = [
-    "Development Status :: 4 - Beta",
+    "Development Status :: 5 - Production/Stable",
     "Intended Audience :: Developers",
     "License :: OSI Approved :: MIT License",
     "Operating System :: OS Independent",
     "Topic :: Text Processing :: Markup",
 ]
 
-from distutils.core import setup
+from setuptools import setup, Extension, Feature
 
 if __name__ == '__main__':
 
 
         package_dir={'': 'lib'},
         packages=['yaml'],
+
+        features = {
+            'libyaml': Feature(
+                description="LibYAML bindings",
+                ext_modules=[
+                    Extension('_yaml', ['ext/_yaml.pyx'], libraries=['yaml']),
+                ],
+            ),
+        },
     )
 

setup_with_libyaml.py

-
-from setup import *
-
-from distutils.core import setup
-from distutils.extension import Extension
-from Pyrex.Distutils import build_ext
-
-if __name__ == '__main__':
-
-    setup(
-        name=NAME,
-        version=VERSION,
-        description=DESCRIPTION,
-        long_description=LONG_DESCRIPTION,
-        author=AUTHOR,
-        author_email=AUTHOR_EMAIL,
-        license=LICENSE,
-        platforms=PLATFORMS,
-        url=URL,
-        download_url=DOWNLOAD_URL,
-        classifiers=CLASSIFIERS,
-
-        package_dir={'': 'lib'},
-        packages=['yaml'],
-        ext_modules=[
-            Extension("_yaml", ["ext/_yaml.pyx"], libraries=['yaml']),
-        ],
-
-        cmdclass = {'build_ext': build_ext}
-    )
-