Skip to content

Commit

Permalink
Update supported Python versions to current releases.
Browse files Browse the repository at this point in the history
  • Loading branch information
hannosch committed Apr 3, 2016
1 parent 6ac8506 commit 428ab01
Show file tree
Hide file tree
Showing 7 changed files with 51 additions and 61 deletions.
1 change: 1 addition & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ language: python
sudo: false
python:
- 2.7
- 3.3
- 3.4
- 3.5
install:
Expand Down
12 changes: 6 additions & 6 deletions CHANGES.rst
Original file line number Diff line number Diff line change
@@ -1,20 +1,20 @@
Changelog
=========

Unreleased
----------
3.0 (unreleased)
----------------

- Add coverage testing.

- Add Python 3 compatibility.
- Add Python 3.3 - 3.5 compatibility.

- Declare currently-supported Python versions (2.6, 2.7), and test them
- Declare currently-supported Python versions, and test them.

- Normalize package structure (``README.rst``, ``CHANGES.rst``). Synthesize
- Normalize package structure (``README.rst``, ``CHANGES.rst``). Synthesize
package description from README.rst and CHANGES.rst.

- Use nose for testing instead of zope.testrunner and test
for 100% test coverage
for 100% test coverage.

2.12.0 (2012-08-30)
-------------------
Expand Down
1 change: 1 addition & 0 deletions MANIFEST.in
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
include *.rst
include *.txt

recursive-include src *
Expand Down
51 changes: 15 additions & 36 deletions bootstrap-buildout.py → bootstrap.py
Original file line number Diff line number Diff line change
Expand Up @@ -25,10 +25,7 @@

from optparse import OptionParser

__version__ = '2015-07-01'
# See zc.buildout's changelog if this version is up to date.

tmpeggs = tempfile.mkdtemp(prefix='bootstrap-')
tmpeggs = tempfile.mkdtemp()

usage = '''\
[DESIRED PYTHON FOR BUILDOUT] bootstrap.py [options]
Expand All @@ -43,9 +40,8 @@
'''

parser = OptionParser(usage=usage)
parser.add_option("--version",
action="store_true", default=False,
help=("Return bootstrap.py version."))
parser.add_option("-v", "--version", help="use a specific zc.buildout version")

parser.add_option("-t", "--accept-buildout-test-releases",
dest='accept_buildout_test_releases',
action="store_true", default=False,
Expand All @@ -63,33 +59,25 @@
parser.add_option("--allow-site-packages",
action="store_true", default=False,
help=("Let bootstrap.py use existing site packages"))
parser.add_option("--buildout-version",
help="Use a specific zc.buildout version")
parser.add_option("--setuptools-version",
help="Use a specific setuptools version")
parser.add_option("--setuptools-to-dir",
help=("Allow for re-use of existing directory of "
"setuptools versions"))
help="use a specific setuptools version")

options, args = parser.parse_args()
if options.version:
print("bootstrap.py version %s" % __version__)
sys.exit(0)

options, args = parser.parse_args()

######################################################################
# load/install setuptools

try:
if options.allow_site_packages:
import setuptools
import pkg_resources
from urllib.request import urlopen
except ImportError:
from urllib2 import urlopen

ez = {}
if os.path.exists('ez_setup.py'):
exec(open('ez_setup.py').read(), ez)
else:
exec(urlopen('https://bootstrap.pypa.io/ez_setup.py').read(), ez)
exec(urlopen('https://bootstrap.pypa.io/ez_setup.py').read(), ez)

if not options.allow_site_packages:
# ez_setup imports site, which adds site packages
Expand All @@ -100,19 +88,12 @@
# We can't remove these reliably
if hasattr(site, 'getsitepackages'):
for sitepackage_path in site.getsitepackages():
# Strip all site-packages directories from sys.path that
# are not sys.prefix; this is because on Windows
# sys.prefix is a site-package directory.
if sitepackage_path != sys.prefix:
sys.path[:] = [x for x in sys.path
if sitepackage_path not in x]
sys.path[:] = [x for x in sys.path if sitepackage_path not in x]

setup_args = dict(to_dir=tmpeggs, download_delay=0)

if options.setuptools_version is not None:
setup_args['version'] = options.setuptools_version
if options.setuptools_to_dir is not None:
setup_args['to_dir'] = options.setuptools_to_dir

ez['use_setuptools'](**setup_args)
import setuptools
Expand All @@ -129,12 +110,7 @@

ws = pkg_resources.working_set

setuptools_path = ws.find(
pkg_resources.Requirement.parse('setuptools')).location

# Fix sys.path here as easy_install.pth added before PYTHONPATH
cmd = [sys.executable, '-c',
'import sys; sys.path[0:0] = [%r]; ' % setuptools_path +
'from setuptools.command.easy_install import main; main()',
'-mZqNxd', tmpeggs]

Expand All @@ -147,8 +123,11 @@
if find_links:
cmd.extend(['-f', find_links])

setuptools_path = ws.find(
pkg_resources.Requirement.parse('setuptools')).location

requirement = 'zc.buildout'
version = options.buildout_version
version = options.version
if version is None and not options.accept_buildout_test_releases:
# Figure out the most recent final version of zc.buildout.
import setuptools.package_index
Expand Down Expand Up @@ -188,7 +167,7 @@ def _final_version(parsed_version):
cmd.append(requirement)

import subprocess
if subprocess.call(cmd) != 0:
if subprocess.call(cmd, env=dict(os.environ, PYTHONPATH=setuptools_path)) != 0:
raise Exception(
"Failed to execute command:\n%s" % repr(cmd)[1:-1])

Expand Down
11 changes: 9 additions & 2 deletions buildout.cfg
Original file line number Diff line number Diff line change
@@ -1,10 +1,17 @@
[buildout]
develop = .
parts = test
parts = interpreter test

[interpreter]
recipe = zc.recipe.egg
interpreter = python
eggs =
zLOG

[test]
recipe = zc.recipe.egg
eggs =
Nose
coverage
nose
tox
zLOG
34 changes: 18 additions & 16 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,34 +15,36 @@
"""
from setuptools import setup, find_packages

__version__ = '3.0.dev0'

with open('README.rst') as f:
README = f.read()

with open('CHANGES.rst') as f:
CHANGES = f.read()

setup(name='zLOG',
version = '2.12.0',
url='http://cheeseshop.python.org/pypi/zLOG',
version=__version__,
url='http://pypi.python.org/pypi/zLOG',
license='ZPL 2.1',
description='A general logging facility',
author='Zope Foundation and Contributors',
author_email='zope-dev@zope.org',
long_description='\n\n'.join([README,CHANGES]),
long_description='\n\n'.join([README, CHANGES]),
classifiers=[
"Development Status :: 5 - Production/Stable",
"Intended Audience :: Developers",
"License :: OSI Approved :: Zope Public License",
"Operating System :: OS Independent",
"Programming Language :: Python",
"Programming Language :: Python :: 2.6",
"Programming Language :: Python :: 2.7",
"Programming Language :: Python :: 3.4",
"Programming Language :: Python :: 3.5",
"Programming Language :: Python :: Implementation :: CPython",
"Framework :: Zope2",
"Topic :: Software Development :: Libraries :: Python Modules",
],
"Development Status :: 5 - Production/Stable",
"Intended Audience :: Developers",
"License :: OSI Approved :: Zope Public License",
"Operating System :: OS Independent",
"Programming Language :: Python",
"Programming Language :: Python :: 2.7",
"Programming Language :: Python :: 3.3",
"Programming Language :: Python :: 3.4",
"Programming Language :: Python :: 3.5",
"Programming Language :: Python :: Implementation :: CPython",
"Programming Language :: Python :: Implementation :: PyPy",
"Framework :: Zope2",
],
packages=find_packages('src'),
package_dir={'': 'src'},
test_suite='zLOG.tests',
Expand Down
2 changes: 1 addition & 1 deletion tox.ini
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[tox]
envlist =
py26,py27,py34,py35,pypy3,coverage
py27,py33,py34,py35,pypy3,coverage

[testenv]
commands =
Expand Down

0 comments on commit 428ab01

Please sign in to comment.