lazr-developers team mailing list archive
-
lazr-developers team
-
Mailing list archive
-
Message #00042
[Merge] lp:~gary/lazr.yourpkg/trunk into lp:lazr.yourpkg
Gary Poster has proposed merging lp:~gary/lazr.yourpkg/trunk into lp:lazr.yourpkg.
Requested reviews:
LAZR Developers (lazr-developers)
This branch makes a number of small-ish changes.
- silently ignore "lazr." prefix in prepare.py
- specify test_suite in the setup.py. This makes `python setup.py test` work.
- use "eggtestinfo" as a setup requirement. This is supposed to make the setup.py test work for binary eggs; I'm proceeding on some Zope "best practices" for that.
- I moved the tests directory to a tests.py file. This makes the test_suite a bit easier, and matches the use cases for our current packages better.
--
https://code.launchpad.net/~gary/lazr.yourpkg/trunk/+merge/4477
Your team LAZR Developers is subscribed to branch lp:lazr.yourpkg.
=== modified file '.bzrignore'
--- .bzrignore 2009-03-03 16:11:30 +0000
+++ .bzrignore 2009-03-14 00:08:24 +0000
@@ -6,3 +6,6 @@
src/lazr.yourpkg.egg-info
tags
TAGS
+build
+*.egg
+dist
=== modified file 'prepare.py'
--- prepare.py 2009-01-22 03:02:47 +0000
+++ prepare.py 2009-03-14 00:06:48 +0000
@@ -130,12 +130,14 @@
def main():
parser, options, name = parse_arguments()
# Do some basic sanity checking on the name.
+ if name.startswith('lazr.'):
+ name = name[5:]
if name.count('.') > 0:
parser.error('Name may not have dots in it')
if options.dry_run:
+ # --dry-run implies at least one level of verbosity.
options.verbosity = max(options.verbosity, 1)
walk_and_replace('.', name, options)
- # --dry-run implies at least one level of verbosity.
if not options.keep:
if options.verbosity > 0:
print 'Removing prepare.py'
=== modified file 'setup.py'
--- setup.py 2009-01-10 01:00:49 +0000
+++ setup.py 2009-03-13 21:51:39 +0000
@@ -62,4 +62,6 @@
"License :: OSI Approved :: GNU Library or Lesser General Public License (LGPL)",
"Operating System :: OS Independent",
"Programming Language :: Python"],
+ setup_requires=['eggtestinfo'],
+ test_suite='lazr.yourpkg.tests.test_suite',
)
=== removed directory 'src/lazr/yourpkg/tests'
=== renamed file 'src/lazr/yourpkg/tests/test_documentation.py' => 'src/lazr/yourpkg/tests.py'
--- src/lazr/yourpkg/tests/test_documentation.py 2009-03-03 16:14:37 +0000
+++ src/lazr/yourpkg/tests.py 2009-03-13 21:51:39 +0000
@@ -18,14 +18,15 @@
def test_suite():
- # This breaks the zip-safe flag.
- docs_directory = os.path.normpath(os.path.join(__file__, '../../docs'))
- doctest_files = ['../docs/%s' % filename
- for filename in os.listdir(docs_directory)
- if filename.endswith('.txt')]
-
- kwargs = dict(
- module_relative=True,
- optionflags=doctest.NORMALIZE_WHITESPACE|doctest.ELLIPSIS)
+ package_directory = os.path.dirname(__file__)
+ docs_directory = os.path.normpath(os.path.join(package_directory, 'docs'))
+ if os.path.exists(docs_directory):
+ doctest_files = [os.path.join('docs', filename)
+ for filename in os.listdir(docs_directory)
+ if filename.endswith('.txt')]
+ else:
+ doctest_files = []
+ doctest_files.append('README.txt')
+ kwargs = dict(module_relative=True, optionflags=DOCTEST_FLAGS)
return unittest.TestSuite((
doctest.DocFileSuite(*doctest_files, **kwargs)))
=== removed file 'src/lazr/yourpkg/tests/__init__.py'
Follow ups