Skip to content

Commit

Permalink
Merge pull request #98 from zopefoundation/maurits/fix-unicode-decode…
Browse files Browse the repository at this point in the history
…-error-setup-py-3x

Fixed possible UnicodeDecodeError in setup.py on Python 3.6. [3.x]
  • Loading branch information
mauritsvanrees committed Sep 4, 2020
2 parents 08d834b + 6708c32 commit 69b18ea
Show file tree
Hide file tree
Showing 4 changed files with 28 additions and 36 deletions.
4 changes: 4 additions & 0 deletions CHANGES.txt
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,11 @@ CHANGES
3.7.1 (unreleased)
------------------

- Fixed possible UnicodeDecodeError in setup.py on Python 3.6.
Put the long description in setup.cfg, without replacing characters.

- Drop Python 3.4 support. Add 3.7 and 3.8 support.

- Fixed compatibility with changed repeat syntax.
Fixes `issue 94 <https://github.com/zopefoundation/z3c.form/issues/94>`_.

Expand Down
3 changes: 3 additions & 0 deletions README.txt
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
This package provides an implementation for HTML and JSON forms and widgets. The goal
is to provide a simple API but with the ability to easily customize any data or
steps.


.. contents::
21 changes: 21 additions & 0 deletions setup.cfg
Original file line number Diff line number Diff line change
@@ -1,2 +1,23 @@
[bdist_wheel]
universal = 1

[metadata]
long_description = file:
README.txt,
src/z3c/form/README.txt,
src/z3c/form/form.txt,
src/z3c/form/group.txt,
src/z3c/form/subform.txt,
src/z3c/form/field.txt,
src/z3c/form/button.txt,
src/z3c/form/zcml.txt,
src/z3c/form/validator.txt,
src/z3c/form/widget.txt,
src/z3c/form/contentprovider.txt,
src/z3c/form/action.txt,
src/z3c/form/value.txt,
src/z3c/form/datamanager.txt,
src/z3c/form/converter.txt,
src/z3c/form/term.txt,
src/z3c/form/util.txt,
CHANGES.txt
36 changes: 0 additions & 36 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,18 +13,9 @@
##############################################################################
"""Setup
"""
import os
from setuptools import setup, find_packages


def read(*rnames):
with open(os.path.join(os.path.dirname(__file__), *rnames)) as f:
text = f.read()
if isinstance(text, bytes):
text = text.decode('utf-8')
return text.encode('ascii', 'xmlcharrefreplace').decode()


def alltests():
import os
import sys
Expand All @@ -41,39 +32,12 @@ def alltests():
return unittest.TestSuite(suites)


chapters = '\n'.join(
[read('src', 'z3c', 'form', name)
for name in ('README.txt',
'form.txt',
'group.txt',
'subform.txt',
'field.txt',
'button.txt',
'zcml.txt',
'validator.txt',
'widget.txt',
'contentprovider.txt',
'action.txt',
'value.txt',
'datamanager.txt',
'converter.txt',
'term.txt',
'util.txt',
)])


setup(
name='z3c.form',
version='3.7.1.dev0',
author="Stephan Richter, Roger Ineichen and the Zope Community",
author_email="zope-dev@zope.org",
description="An advanced form and widget framework for Zope 3",
long_description=(
read('README.txt')
+ '\n\n' +
'.. contents:: \n\n' + chapters
+ '\n\n'
+ read('CHANGES.txt')),
license="ZPL 2.1",
keywords="zope3 form widget",
classifiers=[
Expand Down

0 comments on commit 69b18ea

Please sign in to comment.