Skip to content

Commit

Permalink
Merge pull request #11 from zopefoundation/py37
Browse files Browse the repository at this point in the history
Add support for Python 3.7
  • Loading branch information
mgedmin committed Aug 9, 2018
2 parents 9608463 + 92a3a23 commit d1c39f4
Show file tree
Hide file tree
Showing 5 changed files with 32 additions and 18 deletions.
10 changes: 7 additions & 3 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,15 @@ language: python
sudo: false
python:
- 2.7
- 3.3
- 3.4
- 3.5
- 3.6
- pypy-5.4.1
- pypy
matrix:
include:
- python: 3.7
dist: xenial
sudo: true
script:
- coverage run -m zope.testrunner --test-path=src --auto-color --auto-progress

Expand All @@ -24,4 +28,4 @@ install:
cache: pip

before_cache:
- rm -f $HOME/.cache/pip/log/debug.log
- rm -f $HOME/.cache/pip/log/debug.log
7 changes: 6 additions & 1 deletion CHANGES.rst
Original file line number Diff line number Diff line change
@@ -1,12 +1,17 @@
Changes
=======

4.1.1 (unreleased)
4.2.0 (unreleased)
------------------

- Fix the possibility of a rare crash in the C extension when deallocating items. See
https://github.com/zopefoundation/zope.i18nmessageid/issues/7

- Drop support for Python 3.3.

- Add support for Python 3.7.


4.1.0 (2017-05-02)
------------------

Expand Down
4 changes: 2 additions & 2 deletions appveyor.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,14 +7,14 @@ environment:
matrix:
- python: 27
- python: 27-x64
- python: 33
- python: 33-x64
- python: 34
- python: 34-x64
- python: 35
- python: 35-x64
- python: 36
- python: 36-x64
- python: 37
- python: 37-x64

install:
- "SET PATH=C:\\Python%PYTHON%;c:\\Python%PYTHON%\\scripts;%PATH%"
Expand Down
27 changes: 16 additions & 11 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -37,27 +37,30 @@
"_zope_i18nmessageid_message.c")
codeoptimization = Feature(
"Optional code optimizations",
standard = True,
ext_modules = [Extension(
standard=True,
ext_modules=[Extension(
"zope.i18nmessageid._zope_i18nmessageid_message",
[os.path.normcase(codeoptimization_c)]
)])

extra = {
'extras_require': {'testing': ['nose', 'coverage'],
'docs': ['Sphinx'],
},
'extras_require': {
'testing': ['nose', 'coverage'],
'docs': ['Sphinx'],
},
}

if not is_pypy and not is_jython:
# Jython cannot build the C optimizations, while on PyPy they are
# anti-optimizations (the C extension compatibility layer is known-slow,
# and defeats JIT opportunities).
extra['features'] = {'codeoptimization':codeoptimization}
extra['features'] = {'codeoptimization': codeoptimization}


def read(*rnames):
return open(os.path.join(os.path.dirname(__file__), *rnames)).read()


class optional_build_ext(build_ext):
"""This class subclasses build_ext and allows
the building of C extensions to fail.
Expand Down Expand Up @@ -94,8 +97,10 @@ def _unavailable(self, e):
sys.stderr.write(str(e) + '\n')
sys.stderr.write('*' * 80 + '\n')

setup(name='zope.i18nmessageid',
version='4.1.1.dev0',

setup(
name='zope.i18nmessageid',
version='4.2.0.dev0',
author='Zope Foundation and Contributors',
author_email='zope-dev@zope.org',
description='Message Identifiers for internationalization',
Expand All @@ -114,10 +119,10 @@ def _unavailable(self, e):
'Programming Language :: Python :: 2',
'Programming Language :: Python :: 2.7',
'Programming Language :: Python :: 3',
'Programming Language :: Python :: 3.3',
'Programming Language :: Python :: 3.4',
'Programming Language :: Python :: 3.5',
'Programming Language :: Python :: 3.6',
'Programming Language :: Python :: 3.7',
"Programming Language :: Python :: Implementation :: CPython",
"Programming Language :: Python :: Implementation :: PyPy",
'Natural Language :: English',
Expand All @@ -129,11 +134,11 @@ def _unavailable(self, e):
url='http://pypi.python.org/pypi/zope.i18nmessageid',
packages=find_packages('src'),
package_dir={'': 'src'},
namespace_packages=['zope',],
namespace_packages=['zope'],
install_requires=['setuptools'],
include_package_data=True,
test_suite='zope.i18nmessageid.tests.test_suite',
zip_safe=False,
cmdclass={'build_ext':optional_build_ext},
cmdclass={'build_ext': optional_build_ext},
**extra
)
2 changes: 1 addition & 1 deletion tox.ini
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[tox]
envlist =
py27,py33,py34,py35,py36,pypy,pypy3,coverage,docs
py27,py34,py35,py36,py37,pypy,pypy3,coverage,docs

[testenv]
deps =
Expand Down

0 comments on commit d1c39f4

Please sign in to comment.