Skip to content

Commit

Permalink
v 1.3.7 Updated MANIFEST.in and setup.py so the licence and readm…
Browse files Browse the repository at this point in the history
…e are properly included in the distribution.
  • Loading branch information
quandyfactory committed Apr 25, 2014
1 parent 2539bf5 commit 3a4f255
Show file tree
Hide file tree
Showing 6 changed files with 17 additions and 35 deletions.
2 changes: 1 addition & 1 deletion MANIFEST.in
Original file line number Diff line number Diff line change
@@ -1 +1 @@
include README.markdown LICENSE.txt
include *.markdown *.txt
8 changes: 7 additions & 1 deletion README.markdown
Original file line number Diff line number Diff line change
Expand Up @@ -196,11 +196,17 @@ If you encounter any errors in the code, please file an issue: <https://github.c

### Version

* Version: 1.3.6
* Version: 1.3.7
* Release Date: 2014-04-24

### Revision History

#### Version 1.3.7

* Release Date: 2014-04-21
* Changes:
* Updated `MANIFEST.in` and `setup.py` so the licence and readme are properly included in the distribution.

#### Version 1.3.6

* Release Date: 2014-04-21
Expand Down
2 changes: 1 addition & 1 deletion dicttoxml.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@

from __future__ import unicode_literals

__version__ = '1.3.6'
__version__ = '1.3.7'
version = __version__

from random import randint
Expand Down
Binary file modified dist/dicttoxml-1.3.6.tar.gz
Binary file not shown.
Binary file added dist/dicttoxml-1.3.7.tar.gz
Binary file not shown.
40 changes: 8 additions & 32 deletions setup.py
Original file line number Diff line number Diff line change
@@ -1,48 +1,24 @@
from distutils.core import setup

version = '1.3.6'
version = '1.3.7'

with open('README.markdown') as readme:
long_description = readme.read()

setup(
name = 'dicttoxml',
version = version,
description = 'Converts a Python dictionary or other native data type into a valid XML string. ',
long_description = """Supports item (`int`, `float`, `bool`, `str`, `unicode`, `datetime`, `none`) and collection (`list`, `set`, `tuple` and `dict`, as well as iterable and dict-like objects) data types with arbitrary nesting for the collections. Items with a `datetime` type are converted to ISO format strings. Items with a `none` type become empty XML elements.
The root object passed into the `dicttoxml` function can be any of the supported data types.
To satisfy XML syntax, the method wraps all the dict keys/elements and values in a `<root> ... </root>` element. However, this can be disabled to create XML snippets.
For lists of items, if each item is also a collection data type (`lists`, `dict`), the elements of that item are wrapped in a generic `<item> ... </item>` element.
Each elements includes a `type` attribute with the data type. Note: `datetime` data types are converted into ISO format strings, and `unicode` and `datetime` data types get a `str` attribute.
Python -> XML
integer int
float float
string str
unicode str
datetime str
None null
boolean bool
list list
set list
tuple list
dict dict
Elements with an unsupported data type raise a TypeError exception.
If an element name is invalid XML, it is rendered with the name "key" and the invalid name is included as a `name` attribute. E.g. `{ "^.{0,256}$": "foo" }` would be rendered `<key name="^.{0,256}$">foo</key>`. An exception is element names with spaces, which are converted to underscores.
**This module should work in Python 2.6+ and Python 3.**
""",
long_description = long_description,
author = 'Ryan McGreal',
author_email = 'ryan@quandyfactory.com',
license = 'GNU General Public Licence, Version 2',
license = 'LICENCE.txt',
url = 'https://github.com/quandyfactory/dicttoxml',
py_modules = ['dicttoxml'],
download_url = 'https://github.com/quandyfactory/dicttoxml/blob/master/dist/dicttoxml-%s.tar.gz?raw=true' % (version),
platforms='Cross-platform',
classifiers=[
'Programming Language :: Python',
'Programming Language :: Python :: 3'
],
],
)

0 comments on commit 3a4f255

Please sign in to comment.