Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add support for Python 3.6 and 3.7. #2

Merged
merged 8 commits into from
Nov 7, 2018
Merged
Show file tree
Hide file tree
Changes from 5 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 11 additions & 0 deletions .coveragerc
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
[run]
source = zc.sourcefactory

[report]
precision = 2
exclude_lines =
pragma: no cover
if __name__ == '__main__':
raise NotImplementedError
self.fail
raise AssertionError
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
__pycache__
src/*.egg-info

.coverage
.installed.cfg
.tox
bin
Expand Down
15 changes: 13 additions & 2 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,20 @@ python:
- 3.3
- 3.4
icemac marked this conversation as resolved.
Show resolved Hide resolved
- 3.5
- 3.6
matrix:
include:
- python: "3.7"
dist: xenial
sudo: true
install:
- pip install .
- pip install -U pip setuptools
- pip install -U coverage coveralls
- pip install -U -e .[test]
script:
- python setup.py test -q
- coverage run -m zope.testrunner --test-path=src
after_success:
- coveralls
notifications:
email: false
cache: pip
4 changes: 3 additions & 1 deletion CHANGES.txt
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,9 @@ Changes
1.1.0 (unreleased)
==================

- Nothing changed yet.
- Add support for Python 3.6 and 3.7.

- Drop support for Python 3.3 and 3.4.


1.0.0 (2016-08-02)
Expand Down
1 change: 0 additions & 1 deletion MANIFEST.in
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
include *.rst
include *.txt
include *.py
include buildout.cfg
include tox.ini

Expand Down
15 changes: 15 additions & 0 deletions README.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
================
Source Factories
================

Source factories are used to simplify the creation of sources for certain
standard cases.

Sources split up the process of providing input fields with choices for users
into several components: a context binder, a source class, a terms class, and a
term class.

This is the correct abstraction and will fit many complex cases very well. To
reduce the amount of work to do for some standard cases, the source factories
allow users to define only the business relevant code for getting a list of
values, getting a token and a title to display.
210 changes: 0 additions & 210 deletions bootstrap.py

This file was deleted.

59 changes: 19 additions & 40 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,65 +16,52 @@
from setuptools import setup, find_packages
import os.path

def read_file(*args):
path = os.path.join(os.path.dirname(__file__), *args)
file_contents = open(path, 'r').read()
return file_contents + '\n\n'

def alltests():
import os
import sys
import unittest
# use the zope.testrunner machinery to find all the
# test suites we've put under ourselves
import zope.testrunner.find
import zope.testrunner.options
here = os.path.abspath(os.path.join(os.path.dirname(__file__), 'src'))
args = sys.argv[:]
defaults = ["--test-path", here]
options = zope.testrunner.options.get_options(args, defaults)
suites = list(zope.testrunner.find.find_suites(options))
return unittest.TestSuite(suites)
def read_file(*args):
path = os.path.join(*args)
with open(path, 'r') as f:
return f.read() + '\n\n'

setup(
name='zc.sourcefactory',
version='1.1.0.dev0',
author='Zope Corporation and Contributors',
author_email='zope-dev@zope.org',
url='http://pypi.python.org/pypi/zc.sourcefactory',
keywords='zope zope3 vocabulary source factory',
description='An easy way to create custom Zope 3 sources.',
url='https://github.com/zopefoundation/zc.sourcefactory',
keywords='zope vocabulary source factory',
description='An easy way to create custom Zope sources.',
license='ZPL 2.1',
long_description=(
read_file('README.rst') +
'\n\n.. contents::\n\n' +
read_file('src', 'zc', 'sourcefactory', 'README.txt') +
read_file('src', 'zc', 'sourcefactory', 'mapping.txt') +
read_file('src', 'zc', 'sourcefactory', 'constructors.txt') +
read_file('src', 'zc', 'sourcefactory', 'adapters.txt') +
read_file('src', 'zc', 'sourcefactory', 'browser', 'README.txt') +
read_file('src', 'zc', 'sourcefactory', 'browser', 'token.txt') +
read_file('CHANGES.txt')
),
classifiers = [
),
classifiers=[
'Topic :: Software Development',
'Framework :: Zope :: 3',
'Framework :: Zope :: 4',
'Development Status :: 5 - Production/Stable',
'Intended Audience :: Developers',
'License :: OSI Approved :: Zope Public License',
'Programming Language :: Python',
'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',
'Natural Language :: English',
'Operating System :: OS Independent',
],

],
packages=find_packages('src'),
package_dir={'':'src'},

package_dir={'': 'src'},
include_package_data=True,
install_requires=[
'ZODB',
Expand All @@ -88,7 +75,7 @@ def alltests():
'zope.proxy',
'zope.publisher',
'zope.schema',
],
],
namespace_packages=['zc'],
extras_require={
'test': [
Expand All @@ -97,14 +84,6 @@ def alltests():
'zope.testing',
'zope.testrunner',
'zope.keyreference',
]},
tests_require = [
'zope.component[zcml]',
'zope.keyreference',
'zope.site',
'zope.testing',
'zope.testrunner',
],
test_suite = '__main__.alltests',
]},
zip_safe=False,
)
)
Loading