From 673ac23e93f64a287c16a0d0ea45ba9ab9379d2d Mon Sep 17 00:00:00 2001 From: PJ Eby Date: Sat, 17 Sep 2005 01:13:02 +0000 Subject: Added support to solve the infamous "we want .py on Windows, no extension elsewhere" problem, while also bypassing the need for PATHEXT on Windows, and in fact the need to even write script files at all, for any platform. Instead, you define "entry points" in your setup script, in this case the names of the scripts you want (without extensions) and the functions that should be imported and run to implement the scripts. Setuptools will then generate platform-appropriate script files at install time, including an .exe wrapper when installing on Windows. --HG-- branch : setuptools extra : convert_revision : svn%3A6015fed2-1504-0410-9fe1-9d1591cc4771/sandbox/trunk/setuptools%4041246 --- setup.py | 51 ++++++++++++++++++++++++++++++++++++++++++++++----- 1 file changed, 46 insertions(+), 5 deletions(-) (limited to 'setup.py') diff --git a/setup.py b/setup.py index cea8d918..10d19795 100755 --- a/setup.py +++ b/setup.py @@ -34,12 +34,12 @@ setup( keywords = "CPAN PyPI distutils eggs package management", url = "http://peak.telecommunity.com/DevCenter/setuptools", test_suite = 'setuptools.tests.test_suite', - packages = find_packages(), + package_data = {'setuptools': ['launcher.exe']}, py_modules = ['pkg_resources', 'easy_install'], - scripts = ['easy_install.py'], + - zip_safe = False, # We want 'python -m easy_install' to work :( + zip_safe = False, # We want 'python -m easy_install' to work, for now :( entry_points = { "distutils.commands" : [ "%(cmd)s = setuptools.command.%(cmd)s:%(cmd)s" % locals() @@ -63,9 +63,9 @@ setup( "top_level.txt = setuptools.command.egg_info:write_toplevel_names", "depends.txt = setuptools.command.egg_info:warn_depends_obsolete", ], + "console_scripts": + ["easy_install = setuptools.command.easy_install:main"], }, - # uncomment for testing - # setup_requires = ['setuptools>=0.6a0'], classifiers = [f.strip() for f in """ Development Status :: 3 - Alpha @@ -78,5 +78,46 @@ setup( Topic :: System :: Archiving :: Packaging Topic :: System :: Systems Administration Topic :: Utilities""".splitlines() if f.strip()] + + + # uncomment for testing + # setup_requires = ['setuptools>=0.6a0'], ) + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + -- cgit v1.2.1