Skip to content
This repository has been archived by the owner on Aug 2, 2022. It is now read-only.

Commit

Permalink
Python 3.4/5/6 and PyPy support.
Browse files Browse the repository at this point in the history
- Modern .travis.yml that enables coveralls.
- 100% coverage.
- Add tox.ini.
- Rename .txt -> .rst for rendering
- Drop test dependencies on zope.app.zcmlfiles and zope.app.testing.
  • Loading branch information
jamadden committed May 23, 2017
1 parent 5f26c53 commit 5e5def5
Show file tree
Hide file tree
Showing 22 changed files with 440 additions and 313 deletions.
8 changes: 8 additions & 0 deletions .coveragerc
Original file line number Diff line number Diff line change
@@ -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
Original file line number Diff line number Diff line change
Expand Up @@ -10,3 +10,5 @@ eggs/
include/
lib/
local/
htmlcov/
.coverage
27 changes: 22 additions & 5 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -1,9 +1,26 @@
language: python
sudo: false
python:
- 2.7
install:
- pip install .
- 2.7
- 3.4
- 3.5
- 3.6
- pypy-5.4.1
script:
- python setup.py test -q
- coverage run -m zope.testrunner --test-path=src

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

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


cache: pip

before_cache:
- rm -f $HOME/.cache/pip/log/debug.log
50 changes: 27 additions & 23 deletions CHANGES.txt → CHANGES.rst
Original file line number Diff line number Diff line change
@@ -1,16 +1,20 @@
=======
CHANGES
=======
=========
CHANGES
=========

1.3.5 (unreleased)
------------------
2.0.0 (unreleased)
==================


- Add support for Python 3.4, 3.5, 3.6 and PyPy.
- Drop test dependency on ``zope.app.testing`` and
``zope.app.zcmlfiles``, among others.
- Make zope.app.publication dependency optional.
- Python3 fixes to code, tests are still failing as zope.app.testing is not yet ported to python3.



1.3.4 (2012-01-20)
------------------
==================

- Register adapters with getSiteManager rather than getGlobalSiteManager. This
allows registering resource libraries in non-global sites. For detais see:
Expand All @@ -29,7 +33,7 @@ CHANGES
- Remove dependency on ``zope.app.pagetemplate``.

1.3.2 (2010-08-16)
------------------
==================

- Response._addDependencies will only include a ResourceLibrary in the
list of dependencies if the ResourceLibrary actually has included
Expand All @@ -42,7 +46,7 @@ CHANGES
imports and whitespace.

1.3.1 (2010-03-24)
------------------
==================

- Resource libraries that are required during a retried request are now
correctly registered and injected to the HTML.
Expand All @@ -55,7 +59,7 @@ CHANGES


1.3.0 (2009-10-08)
------------------
==================

- Use ``zope.browserresource`` instead of ``zope.app.publisher``, removing
a dependency on latter.
Expand All @@ -66,13 +70,13 @@ CHANGES
- Moved the dependency on zope.site to the test dependencies.

1.2.0 (2009-06-04)
------------------
==================

- Use ``zope.site`` instead of ``zope.app.component``. Removes direct
dependency on ``zope.app.component``.

1.1.0 (2009-05-05)
------------------
==================

New features:

Expand All @@ -86,7 +90,7 @@ New features:
inserted using the special marker comment '<!-- zc.resourcelibrary -->'.

1.0.2 (2009-01-27)
------------------
==================

- Remove zope.app.zapi from dependencies, substituting
its uses with direct imports.
Expand All @@ -97,7 +101,7 @@ New features:
- Change "cheeseshop" to "pypi" in the package homepage.

1.0.1 (2008-03-07)
------------------
==================

Bugs fixed:

Expand All @@ -108,7 +112,7 @@ Bugs fixed:
exception in the resourcelibrary response code.

1.0.0 (2008-02-17)
------------------
==================

New features:

Expand All @@ -123,23 +127,23 @@ Bugs fixed:


0.8.2 (2007-12-07)
------------------
==================

- bug fix: when checking content type, take into account that it may be None

0.8.1 (2007-12-05)
------------------
==================

- changed MIME type handling to be more restrictive about whitespace to
conform to RfC 2045

0.8 (2007-12-04)
----------------
================

- fixed the check for HTML and XML content to allow content type parameters

0.6.1 (2007-11-03)
------------------
==================

- Update package meta-data.

Expand All @@ -148,21 +152,21 @@ Bugs fixed:
- Merged functional and unit tests.

0.6.0 (2006-09-22)
------------------
==================

???

0.5.2 (2006-06-15)
------------------
==================

- Add more package meta-data.

0.5.1 (2006-06-06)
------------------
==================

- Update package code to work with newer versions of other packages.

0.5.0 (2006-04-24)
------------------
==================

- Initial release.
4 changes: 4 additions & 0 deletions MANIFEST.in
Original file line number Diff line number Diff line change
@@ -1,10 +1,14 @@
include *.py
include *.txt
include *.rst
include .travis.yml
include tox.ini
include .coveragerc
include buildout.cfg
recursive-include src *.css
recursive-include src *.js
recursive-include src *.kss
recursive-include src *.pt
recursive-include src *.txt
recursive-include src *.rst
recursive-include src *.zcml
File renamed without changes.
2 changes: 2 additions & 0 deletions setup.cfg
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
[bdist_wheel]
universal = 1
89 changes: 55 additions & 34 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,61 +13,82 @@
##############################################################################
"""Setup for zc.resourcelibrary package
$Id: setup.py 81038 2007-10-24 14:34:17Z srichter $
"""
import os
from setuptools import setup, find_packages

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='zc.resourcelibrary',
version='1.3.5dev',
version='2.0.0.dev0',
author='Zope Foundation and Contributors',
author_email='zope-dev@zope.org',
description='Post-rendering Resource Inclusion',
long_description=(
read('README.txt')
read('README.rst')
+ '\n\n.. contents::\n\n' +
read('src', 'zc', 'resourcelibrary', 'README.txt')
read('src', 'zc', 'resourcelibrary', 'README.rst')
+ '\n\n' +
read('CHANGES.txt')
),
keywords = "zope3 resource javascript css inclusion",
classifiers = [
read('CHANGES.rst')
),
keywords="zope3 resource javascript css inclusion",
classifiers=[
'Development Status :: 5 - Production/Stable',
'Environment :: Web Environment',
'Intended Audience :: Developers',
'License :: OSI Approved :: Zope Public License',
'Programming Language :: Python',
'Programming Language :: Python',
'Programming Language :: Python :: 2',
'Programming Language :: Python :: 2.7',
'Programming Language :: Python :: 3',
'Programming Language :: Python :: 3.4',
'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',
'Framework :: Zope3'],
url='http://pypi.python.org/pypi/zc.resourcelibrary',
'Framework :: Zope3',
],
url='http://github.com/zopefoundation/zc.resourcelibrary',
license='ZPL 2.1',
packages=find_packages('src'),
package_dir = {'': 'src'},
package_dir={'': 'src'},
namespace_packages=['zc'],
extras_require=dict(
test=['zope.app.testing',
'zope.app.zcmlfiles',
'zope.pagetemplate',
'zope.securitypolicy',
'zope.testbrowser',
'zope.testing',
]),
install_requires=['setuptools',
'zope.browserpage',
'zope.browserresource',
'zope.component',
'zope.configuration',
'zope.interface',
'zope.publisher',
'zope.security',
'zope.tales',
'zope.traversing',
],
include_package_data = True,
zip_safe = False,
)
extras_require={
'test': [
'webtest',
'zope.app.appsetup >= 4.0.0',
'zope.app.basicskin >= 4.0.0',
'zope.app.http >= 4.0.1',
'zope.app.publication >= 4.2.1',
'zope.app.security >= 4.0.0',
'zope.app.wsgi >= 4.1.0',
'zope.pagetemplate',
'zope.principalregistry',
'zope.securitypolicy',
'zope.testbrowser',
'zope.testing',
'zope.testrunner',
]
},
install_requires=[
'setuptools',
'zope.browserpage',
'zope.browserresource',
'zope.component',
'zope.configuration',
'zope.interface',
'zope.publisher',
'zope.security',
'zope.site',
'zope.tales',
'zope.traversing',
],
include_package_data=True,
zip_safe=False,
)
8 changes: 1 addition & 7 deletions src/zc/__init__.py
Original file line number Diff line number Diff line change
@@ -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
Loading

0 comments on commit 5e5def5

Please sign in to comment.