diff options
author | xi <xi@18f92427-320e-0410-9341-c67f048884a3> | 2008-09-30 11:45:18 +0000 |
---|---|---|
committer | xi <xi@18f92427-320e-0410-9341-c67f048884a3> | 2008-09-30 11:45:18 +0000 |
commit | e86a1fbcad269bc74cdb0fb5d1ae834dbe9a022f (patch) | |
tree | ffc9781d45c3dd7cd43c151f9040d0f7dc9d907b | |
parent | 82a53600bf7af30a46a1ea4560e0b22f428a25b8 (diff) | |
download | pyyaml-e86a1fbcad269bc74cdb0fb5d1ae834dbe9a022f.tar.gz |
Use setuptools for setup.py. Dropped setup_with_libyaml.py; to build libyaml bindings, use --with-libyaml.
git-svn-id: http://svn.pyyaml.org/pyyaml/trunk@275 18f92427-320e-0410-9341-c67f048884a3
-rw-r--r-- | lib/yaml/__init__.py | 3 | ||||
-rw-r--r-- | setup.py | 15 | ||||
-rw-r--r-- | setup_with_libyaml.py | 31 |
3 files changed, 14 insertions, 35 deletions
diff --git a/lib/yaml/__init__.py b/lib/yaml/__init__.py index e131795..74b087b 100644 --- a/lib/yaml/__init__.py +++ b/lib/yaml/__init__.py @@ -10,8 +10,9 @@ from dumper import * try: from cyaml import * + with_libyaml = True except ImportError: - pass + with_libyaml = False def scan(stream, Loader=Loader): """ @@ -1,6 +1,6 @@ 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 @@ -21,7 +21,7 @@ PLATFORMS = "Any" 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", @@ -30,7 +30,7 @@ CLASSIFIERS = [ "Topic :: Text Processing :: Markup", ] -from distutils.core import setup +from setuptools import setup, Extension, Feature if __name__ == '__main__': @@ -49,5 +49,14 @@ if __name__ == '__main__': package_dir={'': 'lib'}, packages=['yaml'], + + features = { + 'libyaml': Feature( + description="LibYAML bindings", + ext_modules=[ + Extension('_yaml', ['ext/_yaml.pyx'], libraries=['yaml']), + ], + ), + }, ) diff --git a/setup_with_libyaml.py b/setup_with_libyaml.py deleted file mode 100644 index a084ca7..0000000 --- a/setup_with_libyaml.py +++ /dev/null @@ -1,31 +0,0 @@ - -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} - ) - |