Skip to content

Commit

Permalink
Stop depending on ZODB since we only use it for tests.
Browse files Browse the repository at this point in the history
Also slightly simplify .travis.yml and enable caching.

(We have to repeat ourselves once in .travis.yml, either two installs of
the current directory, once with . once with zope.intid[test] and use
python setup.py test, or specify the name of the tests to run. If we do
the former with only '.[test]' then python3 fails to find the zope.intid
module.)
  • Loading branch information
jamadden committed Nov 30, 2016
1 parent ec5e70c commit a299505
Show file tree
Hide file tree
Showing 3 changed files with 19 additions and 15 deletions.
8 changes: 5 additions & 3 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,11 @@ python:
- pypy
- pypy3
install:
- pip install .
- pip install zope.intid[test]
- pip install -U pip setuptools # need updated pip for caching
- pip install -e .[test]
script:
- python setup.py test -q
- python -m zope.intid.tests
notifications:
email: false

cache: pip
2 changes: 2 additions & 0 deletions CHANGES.rst
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,8 @@ Changes

- Drop support for Python 2.6.

- Stop depending on ZODB for anything except testing.

4.1.0 (2014-12-27)
------------------

Expand Down
24 changes: 12 additions & 12 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,16 @@
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()

TESTS_REQUIRE = [
'ZODB',
'zope.testing',
'zope.site',
'zope.traversing',
'zope.container',
]

setup(name = 'zope.intid',
version='4.2.0.dev0',
Expand Down Expand Up @@ -60,14 +69,10 @@ def read(*rnames):
package_dir = {'': 'src'},
namespace_packages=['zope'],
extras_require = dict(
test=['zope.testing',
'zope.site',
'zope.traversing',
'zope.container',]),
test=TESTS_REQUIRE),
install_requires = [
'persistent',
'BTrees',
'ZODB',
'setuptools',
'zope.lifecycleevent>=3.5.2',
'zope.component',
Expand All @@ -77,12 +82,7 @@ def read(*rnames):
'zope.location>=3.5.4',
'zope.security',
],
tests_require = [
'zope.testing',
'zope.site',
'zope.traversing',
'zope.container',
],
tests_require = TESTS_REQUIRE,
test_suite = 'zope.intid.tests.test_suite',
include_package_data = True,
zip_safe = False,
Expand Down

0 comments on commit a299505

Please sign in to comment.