Skip to content

Commit

Permalink
post-git cleanup
Browse files Browse the repository at this point in the history
  • Loading branch information
hannosch committed Mar 2, 2013
1 parent a7add01 commit 62a3134
Show file tree
Hide file tree
Showing 8 changed files with 48 additions and 41 deletions.
15 changes: 15 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
bin
build
develop-eggs
dist
lib
include
man
parts

__pycache__
.*
*.dll
*.pyc
*.pyo
*.so
4 changes: 2 additions & 2 deletions CHANGES.txt → CHANGES.rst
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
``zope.mkzeoinstance`` Changelog
================================
Changelog
=========

3.9.6 (unreleased)
------------------
Expand Down
7 changes: 7 additions & 0 deletions MANIFEST.in
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
include *.rst
include *.txt

recursive-include src *

global-exclude *.pyc
global-exclude *.pyo
4 changes: 2 additions & 2 deletions README.txt → README.rst
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
``zope.mkzeoinstance`` README
=============================
``zope.mkzeoinstance``
======================

This package provides a single script, ``mkzeoinstance``, which creates
a standalone ZEO server instance.
30 changes: 10 additions & 20 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,52 +11,42 @@
# FOR A PARTICULAR PURPOSE.
#
##############################################################################
""" Setup for zope.mkzeoinstance package
"""

import os
from setuptools import setup, find_packages

def read(*rnames):
return open(os.path.join(os.path.dirname(__file__), *rnames)).read()
__version__ = '3.9.6dev'

setup(
name='zope.mkzeoinstance',
version='3.9.6dev',
version=__version__,
url='http://pypi.python.org/pypi/zope.mkzeoinstance',
license='ZPL 2.1',
description='Make standalone ZEO database server instances',
author='Zope Foundation and Contributors',
author_email='zope-dev@zope.org',
long_description=(
read('README.txt')
+ '\n' +
read('CHANGES.txt')
),
long_description=(open('README.rst').read() + "\n" +
open('CHANGES.rst').read()),
classifiers=[
"Development Status :: 5 - Production/Stable",
"Intended Audience :: Developers",
"License :: OSI Approved :: Zope Public License",
"Operating System :: OS Independent",
"Programming Language :: Python :: 2.4",
"Programming Language :: Python :: 2.5",
"Programming Language :: Python :: 2.6",
"Topic :: Software Development :: Libraries :: Python Modules",
],

"Programming Language :: Python :: 2.7",
],
packages=find_packages('src'),
package_dir={'': 'src'},
namespace_packages=['zope',],
namespace_packages=['zope'],
include_package_data=True,
install_requires=[
'setuptools',
'ZODB3 >= 3.9.4',
],
zip_safe=False,
test_suite='zope.mkzeoinstance.tests.test_suite',
test_suite='zope.mkzeoinstance.tests',
entry_points = {
'console_scripts': [
'mkzeoinstance = zope.mkzeoinstance:main',
],
'mkzeoinstance = zope.mkzeoinstance:main',
],
},
)
1 change: 1 addition & 0 deletions src/zope/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
__import__('pkg_resources').declare_namespace(__name__)
1 change: 0 additions & 1 deletion src/zope/mkzeoinstance/tests/__init__.py
Original file line number Diff line number Diff line change
@@ -1 +0,0 @@
# Python Package
27 changes: 11 additions & 16 deletions src/zope/mkzeoinstance/tests/test_unix.py
Original file line number Diff line number Diff line change
Expand Up @@ -93,18 +93,20 @@ def test_create_folders_and_files(self):
Changed mode for %(instance_home)s/bin/zeoctl to 755
Wrote file %(instance_home)s/bin/runzeo
Changed mode for %(instance_home)s/bin/runzeo to 755
""" % {'instance_home':
instance_home}
""" % {'instance_home': instance_home}

self.assertEqual(temp_out_file.getvalue(), expected_out)

self.assertTrue(os.path.exists(os.path.join(instance_home, 'etc')))
self.assertTrue(os.path.exists(os.path.join(instance_home, 'var')))
self.assertTrue(os.path.exists(os.path.join(instance_home, 'log')))
self.assertTrue(os.path.exists(os.path.join(instance_home, 'bin')))
self.assertTrue(os.path.exists(os.path.join(instance_home, 'etc', 'zeo.conf')))
self.assertTrue(os.path.exists(os.path.join(instance_home, 'bin', 'zeoctl')))
self.assertTrue(os.path.exists(os.path.join(instance_home, 'bin', 'runzeo')))
self.assertTrue(
os.path.exists(os.path.join(instance_home, 'etc', 'zeo.conf')))
self.assertTrue(
os.path.exists(os.path.join(instance_home, 'bin', 'zeoctl')))
self.assertTrue(
os.path.exists(os.path.join(instance_home, 'bin', 'runzeo')))

def test_zeo_conf_content(self):
instance_home = self.instance_home
Expand Down Expand Up @@ -218,7 +220,7 @@ def test_mkdirs(self):
sys.stdout = temp_out_file
mkdirs(path)
sys.stdout = orig_stdout
self.assertEqual('Created directory %s\n'%path,
self.assertEqual('Created directory %s\n' % path,
temp_out_file.getvalue())
self.assertTrue(os.path.exists(path))

Expand All @@ -229,7 +231,7 @@ def test_makedir(self):
sys.stdout = temp_out_file
makedir(self.temp_dir, 'test')
sys.stdout = orig_stdout
self.assertEqual('Created directory %s\n'%path,
self.assertEqual('Created directory %s\n' % path,
temp_out_file.getvalue())
self.assertTrue(os.path.exists(path))

Expand All @@ -243,7 +245,7 @@ def test_makefile(self):
makefile(template, self.temp_dir, 'test.txt', **params)
sys.stdout = orig_stdout
path = os.path.join(self.temp_dir, 'test.txt')
self.assertEqual('Wrote file %s\n'%path,
self.assertEqual('Wrote file %s\n' % path,
temp_out_file.getvalue())

self.assertEqual('KEY=value',
Expand All @@ -259,12 +261,5 @@ def test_makexfile(self):
path = os.path.join(self.temp_dir, 'test.txt')
expected_out = """Wrote file %(path)s
Changed mode for %(path)s to 755\n"""
self.assertEqual(expected_out%{'path':path},
self.assertEqual(expected_out % {'path': path},
temp_out_file.getvalue())

def test_suite():
suite = unittest.TestSuite()
suite.addTest(unittest.makeSuite(ZeoInstanceParamsTest))
suite.addTest(unittest.makeSuite(ZeoInstanceCreateTest))
suite.addTest(unittest.makeSuite(UtilityFunctionsTest))
return suite

0 comments on commit 62a3134

Please sign in to comment.