Changeset 150


Ignore:
Timestamp:
04/23/06 14:07:52 (9 years ago)
Author:
xi
Message:

Prepare setup.py for release. Fix #7.

Location:
pyyaml/trunk
Files:
2 added
5 edited

Legend:

Unmodified
Added
Removed
  • pyyaml/trunk/lib/yaml/representer.py

    r148 r150  
    185185        return self.represent_scalar(u'tag:yaml.org,2002:int', unicode(data)) 
    186186 
    187     inf_value = 1e300000 
    188     nan_value = inf_value/inf_value 
     187    repr_pos_inf = repr(1e300000) 
     188    repr_neg_inf = repr(-1e30000) 
     189    repr_nan = repr(1e300000/1e300000) 
    189190 
    190191    def represent_float(self, data): 
    191         if data == self.inf_value: 
     192        repr_data = repr(data) 
     193        if repr_data == self.repr_pos_inf: 
    192194            value = u'.inf' 
    193         elif data == -self.inf_value: 
     195        elif repr_data == self.repr_neg_inf: 
    194196            value = u'-.inf' 
    195         elif data == self.nan_value or data != data: 
     197        elif repr_data == self.repr_nan: 
    196198            value = u'.nan' 
    197199        else: 
    198             value = unicode(repr(data)) 
     200            value = unicode(repr_data) 
    199201        return self.represent_scalar(u'tag:yaml.org,2002:float', value) 
    200202 
  • pyyaml/trunk/setup.py

    r59 r150  
    11 
    2 NAME = 'PyYAML3000' 
    3 VERSION = '0.1' 
    4 DESCRIPTION = "The next generation YAML parser for Python" 
     2NAME = 'PyYAML' 
     3VERSION = '3.0' 
     4DESCRIPTION = "YAML parser and emitter for Python" 
     5LONG_DESCRIPTION = """\ 
     6YAML is a data serialization format designed for human readability and 
     7interaction with scripting languages.  PyYAML is a YAML parser and emitter 
     8for Python. 
     9 
     10PyYAML features a complete YAML 1.1 parser, Unicode support, event-based parser 
     11and emitter (like SAX), API for serializing and deserializing Python objects 
     12(like DOM or pickle).  PyYAML supports all tags from the YAML types repository 
     13and allows you to extend it easily. 
     14 
     15PyYAML is applicable for a broad range of tasks from configuration files to 
     16object persistance.""" 
    517AUTHOR = "Kirill Simonov" 
    618AUTHOR_EMAIL = 'xi@resolvent.net' 
    719LICENSE = "MIT" 
     20PLATFORMS = "Any" 
     21URL = "http://pyyaml.org/wiki/PyYAML" 
     22DOWNLOAD_URL = "http://pyyaml.org/download/pyyaml/%s-%s.tar.gz" % (NAME, VERSION) 
     23CLASSIFIERS = [ 
     24    "Development Status :: 4 - Beta", 
     25    "Intended Audience :: Developers", 
     26    "License :: OSI Approved :: MIT License", 
     27    "Operating System :: OS Independent", 
     28    "Programming Language :: Python", 
     29    "Topic :: Software Development :: Libraries :: Python Modules", 
     30    "Topic :: Text Processing :: Markup", 
     31] 
     32 
    833 
    934from distutils.core import setup 
     
    1338    version=VERSION, 
    1439    description=DESCRIPTION, 
     40    long_description=LONG_DESCRIPTION, 
    1541    author=AUTHOR, 
    1642    author_email=AUTHOR_EMAIL, 
    1743    license=LICENSE, 
     44    platforms=PLATFORMS, 
     45    url=URL, 
     46    download_url=DOWNLOAD_URL, 
     47    classifiers=CLASSIFIERS, 
    1848 
    1949    package_dir={'': 'lib'}, 
  • pyyaml/trunk/tests/test_appliance.py

    r146 r150  
    2727                def test_method(self, test=test, filenames=filenames): 
    2828                    getattr(self, '_'+method_name)(test, *filenames) 
    29                 test = test.replace('-', '_') 
     29                test = test.replace('-', '_').replace('.', '_') 
    3030                try: 
    3131                    test_method.__name__ = '%s_%s' % (method_name, test) 
  • pyyaml/trunk/tests/test_constructor.py

    r147 r150  
    256256            except AssertionError: 
    257257                if isinstance(data1, dict): 
    258                     data1 = data1.items() 
     258                    data1 = [(repr(key), value) for key, value in data1.items()] 
    259259                    data1.sort() 
    260260                    data1 = repr(data1) 
    261                     data2 = data2.items() 
     261                    data2 = [(repr(key), value) for key, value in data2.items()] 
    262262                    data2.sort() 
    263263                    data2 = repr(data2) 
  • pyyaml/trunk/tests/test_representer.py

    r147 r150  
    1919            except AssertionError: 
    2020                if isinstance(data1, dict): 
    21                     data1 = data1.items() 
     21                    data1 = [(repr(key), value) for key, value in data1.items()] 
    2222                    data1.sort() 
    2323                    data1 = repr(data1) 
    24                     data2 = data2.items() 
     24                    data2 = [(repr(key), value) for key, value in data2.items()] 
    2525                    data2.sort() 
    2626                    data2 = repr(data2) 
Note: See TracChangeset for help on using the changeset viewer.