Skip to content

Commit

Permalink
Support for PyPy and Python 3.5+
Browse files Browse the repository at this point in the history
  • Loading branch information
jamadden committed May 1, 2017
1 parent 2ed03b9 commit df83696
Show file tree
Hide file tree
Showing 16 changed files with 384 additions and 212 deletions.
8 changes: 8 additions & 0 deletions .coveragerc
@@ -0,0 +1,8 @@
[run]
source = src

[report]
exclude_lines =
pragma: no cover
if __name__ == '__main__':
raise NotImplementedError
2 changes: 2 additions & 0 deletions .gitignore
Expand Up @@ -8,3 +8,5 @@ __pycache__/
tags
TAGS
ID
.coverage
htmlcov/
26 changes: 21 additions & 5 deletions .travis.yml
@@ -1,9 +1,25 @@
language: python
sudo: false
python:
- 2.7
install:
- pip install .
- 2.7
- 3.5
- 3.6
- pypy-5.4.1
script:
- python setup.py test -q
- coverage run -m zope.testrunner --test-path=src --auto-color --auto-progress

after_success:
- coveralls
notifications:
email: false
email: false

install:
- pip install -U pip setuptools
- pip install -U coveralls coverage
- pip install -U -e ".[test,zcml,extract]"


cache: pip

before_cache:
- rm -f $HOME/.cache/pip/log/debug.log
5 changes: 2 additions & 3 deletions CHANGES.txt → CHANGES.rst
Expand Up @@ -2,10 +2,10 @@
CHANGES
=======

3.7.6 (unreleased)
4.0.0 (unreleased)
------------------

- Nothing changed yet.
- Add support for Python 3.4, 3.5 and 3.6 and PyPy.


3.7.5 (2016-03-28)
Expand Down Expand Up @@ -146,4 +146,3 @@ CHANGES

* Initial release as a separate project, corresponds to ``zope.app.locales``
from Zope 3.4.0a1

6 changes: 6 additions & 0 deletions MANIFEST.in
@@ -1,10 +1,16 @@
include *.py
include *.txt
include *.rst
include buildout.cfg
include .coveragerc
include .travis.yml
include tox.ini

recursive-include src *.po
recursive-include src *.mo
recursive-include src *.pot
recursive-include src *.txt
recursive-include src *.rst
recursive-include src *.zcml
recursive-include testproj *.pt
recursive-include testproj *.py
Expand Down
File renamed without changes.
2 changes: 2 additions & 0 deletions setup.cfg
@@ -0,0 +1,2 @@
[bdist_wheel]
universal = 1
32 changes: 19 additions & 13 deletions setup.py
Expand Up @@ -22,20 +22,21 @@


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


setup(name='zope.app.locales',
version='3.7.6.dev0',
version='4.0.0.dev0',
author='Zope Corporation and Contributors',
author_email='zope-dev@zope.org',
description='Zope locale extraction and management utilities',
long_description='\n\n'.join([
read('README.txt'),
read('README.rst'),
'Detailed Documentation\n'
'----------------------',
read('src', 'zope', 'app', 'locales', 'TRANSLATE.txt'),
read('CHANGES.txt'),
read('src', 'zope', 'app', 'locales', 'TRANSLATE.rst'),
read('CHANGES.rst'),
]),
keywords="zope3 i18n l10n translation gettext",
classifiers=[
Expand All @@ -46,29 +47,34 @@ def read(*rnames):
'Programming Language :: Python',
'Programming Language :: Python :: 2',
'Programming Language :: Python :: 2.7',
'Programming Language :: Python :: 2 :: Only',
'Programming Language :: Python :: Implementation',
'Programming Language :: Python :: 3',
'Programming Language :: Python :: 3.5',
'Programming Language :: Python :: 3.6',
'Programming Language :: Python :: Implementation :: CPython',
'Programming Language :: Python :: Implementation :: PyPy',
'Natural Language :: English',
'Operating System :: OS Independent',
'Topic :: Internet :: WWW/HTTP',
'Topic :: Software Development :: Internationalization',
'Framework :: Zope3'],
'Framework :: Zope3',
],
url='http://pypi.python.org/pypi/zope.app.locales',
license='ZPL 2.1',
packages=find_packages('src'),
package_dir={'': 'src'},
namespace_packages=['zope', 'zope.app'],
install_requires=['setuptools',
'zope.i18nmessageid',
'zope.interface',
],
install_requires=[
'setuptools',
'zope.i18nmessageid',
'zope.interface',
],
extras_require=dict(
test=[
'zope.i18n',
'zope.security',
'zope.tal',
'zope.testing',
'zope.testrunner',
],
zcml=[
'zope.i18n',
Expand All @@ -84,4 +90,4 @@ def read(*rnames):
[console_scripts]
i18nextract=zope.app.locales.extract:main [extract]
"""
)
)
8 changes: 1 addition & 7 deletions src/zope/__init__.py
@@ -1,7 +1 @@
# this is a namespace package
try:
import pkg_resources
pkg_resources.declare_namespace(__name__)
except ImportError:
import pkgutil
__path__ = pkgutil.extend_path(__path__, __name__)
__import__('pkg_resources').declare_namespace(__name__) # pragma: no cover
8 changes: 1 addition & 7 deletions src/zope/app/__init__.py
@@ -1,7 +1 @@
# this is a namespace package
try:
import pkg_resources
pkg_resources.declare_namespace(__name__)
except ImportError:
import pkgutil
__path__ = pkgutil.extend_path(__path__, __name__)
__import__('pkg_resources').declare_namespace(__name__) # pragma: no cover
File renamed without changes.
File renamed without changes.

0 comments on commit df83696

Please sign in to comment.