From f3b7fadee3dc9b05fdb2e7117336425fa8b1d5d5 Mon Sep 17 00:00:00 2001 From: "W. Trevor King" Date: Thu, 28 Jul 2011 15:29:50 -0400 Subject: [PATCH] Cleanup setup.py. --- setup.py | 46 +++++++++++++++++----------------------------- 1 file changed, 17 insertions(+), 29 deletions(-) diff --git a/setup.py b/setup.py index aa0bbb4..2d6c792 100644 --- a/setup.py +++ b/setup.py @@ -18,50 +18,38 @@ "Tools for controlling piezoelectric actuators." from distutils.core import setup -from os import walk import os.path from pypiezo import __version__ package_name = 'pypiezo' -classifiers = """\ -Development Status :: 2 - Pre-Alpha -Intended Audience :: Developers -Intended Audience :: Science/Research -Operating System :: POSIX -Operating System :: Unix -License :: OSI Approved :: GNU General Public License (GPL) -Programming Language :: Python -Topic :: Scientific/Engineering -Topic :: Software Development :: Libraries :: Python Modules -""" - -def find_packages(root='pypiezo'): - packages = [] - prefix = '.'+os.path.sep - for dirpath,dirnames,filenames in walk(root): - if '__init__.py' in filenames: - if dirpath.startswith(prefix): - dirpath = dirpath[len(prefix):] - packages.append(dirpath.replace(os.path.sep, '.')) - return packages - +base_url = 'http://physics.drexel.edu/~wking' _this_dir = os.path.dirname(__file__) -packages = find_packages() setup(name=package_name, version=__version__, maintainer='W. Trevor King', maintainer_email='wking@drexel.edu', - url='http://www.physics.drexel.edu/~wking/unfolding-disasters/posts/%s/' % package_name, - download_url='http://www.physics.drexel.edu/~wking/code/python/%s-%s.tar.gz' % (package_name, __version__), + url='{}/unfolding-disasters/posts/{}/'.format(base_url, package_name), + download_url='{}/code/python/%s-%s.tar.gz'.foramt( + base_url, package_name, __version__), license='GNU General Public License (GPL)', platforms=['all'], description=__doc__, long_description=open(os.path.join(_this_dir, 'README'), 'r').read(), - classifiers=filter(None, classifiers.split('\n')), - packages=packages, - provides=['pypiezo (%s)' % __version__], + classifiers=[ + 'Development Status :: 2 - Pre-Alpha', + 'Intended Audience :: Developers', + 'Intended Audience :: Science/Research', + 'Operating System :: POSIX', + 'Operating System :: Unix', + 'License :: OSI Approved :: GNU General Public License (GPL)', + 'Programming Language :: Python', + 'Topic :: Scientific/Engineering', + 'Topic :: Software Development :: Libraries :: Python Modules', + ], + packages=[package_name], + provides=['{} ({})'.format(package_name, __version__)], requires=['pycomedi (>= 0.3)'], ) -- 2.26.2