mirror of
https://gitee.com/openharmony/third_party_pyyaml
synced 2024-11-23 07:20:31 +00:00
Use setuptools for setup.py. Dropped setup_with_libyaml.py; to build libyaml bindings, use --with-libyaml.
This commit is contained in:
parent
487ac91791
commit
a69b98b63f
@ -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):
|
||||
"""
|
||||
|
15
setup.py
15
setup.py
@ -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']),
|
||||
],
|
||||
),
|
||||
},
|
||||
)
|
||||
|
||||
|
@ -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}
|
||||
)
|
||||
|
Loading…
Reference in New Issue
Block a user