[Zconfig] SVN: ZConfig/trunk/setup.py try to avoid requiring
setuptools; not everyone drinks that koolaid
Fred L. Drake, Jr.
fdrake at gmail.com
Tue Apr 22 20:01:26 EDT 2008
Log message for revision 85627:
try to avoid requiring setuptools; not everyone drinks that koolaid
Changed:
U ZConfig/trunk/setup.py
-=-
Modified: ZConfig/trunk/setup.py
===================================================================
--- ZConfig/trunk/setup.py 2008-04-22 23:47:47 UTC (rev 85626)
+++ ZConfig/trunk/setup.py 2008-04-23 00:01:25 UTC (rev 85627)
@@ -1,5 +1,3 @@
-from setuptools import find_packages, setup
-
README = open('README.txt').read()
NEWS = open('NEWS.txt').read()
@@ -20,7 +18,7 @@
suites = list(find_suites(options))
return TestSuite(suites)
-setup(
+options = dict(
name="ZConfig",
version="2.5.2dev",
author="Fred L. Drake, Jr.",
@@ -29,21 +27,40 @@
long_description=README + '\n\n' + NEWS,
license="ZPL 2.1",
url='http://www.zope.org/Members/fdrake/zconfig/',
-
- packages=find_packages("."),
+ # List packages explicitly so we don't have to assume setuptools:
+ packages=[
+ "ZConfig",
+ "ZConfig.components",
+ "ZConfig.components.basic",
+ "ZConfig.components.basic.tests",
+ "ZConfig.components.logger",
+ "ZConfig.components.logger.tests",
+ "ZConfig.tests",
+ "ZConfig.tests.library",
+ "ZConfig.tests.library.thing",
+ "ZConfig.tests.library.widget",
+ ],
scripts=["scripts/zconfig", "scripts/zconfig_schema2html"],
include_package_data=True,
zip_safe=False,
classifiers=[
- 'Intended Audience :: Developers',
- 'Intended Audience :: System Administrators',
- 'License :: OSI Approved :: Zope Public License',
- 'Operating System :: OS Independent',
- 'Programming Language :: Python',
- 'Topic :: Software Development :: Libraries :: Python Modules',
- ],
- test_suite='__main__.alltests', # support 'setup.py test'
+ 'Intended Audience :: Developers',
+ 'Intended Audience :: System Administrators',
+ 'License :: OSI Approved :: Zope Public License',
+ 'Operating System :: OS Independent',
+ 'Programming Language :: Python',
+ 'Topic :: Software Development :: Libraries :: Python Modules',
+ ],
+ # Support for 'setup.py test' when setuptools is available:
+ test_suite='__main__.alltests',
tests_require=[
- 'zope.testing',
- ]
+ 'zope.testing',
+ ],
)
+
+try:
+ from setuptools import setup
+except ImportError:
+ from distutils.core import setup
+
+setup(**options)
More information about the ZConfig
mailing list