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

This commit is contained in:
Kirill Simonov 2008-09-30 11:45:18 +00:00
parent 487ac91791
commit a69b98b63f
3 changed files with 14 additions and 35 deletions

View File

@ -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):
"""

View File

@ -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']),
],
),
},
)

View File

@ -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}
)