[wkvsf@users.sourceforge.net: Re: [twill] Small backward compatibility patch to setup.py]

15 views
Skip to first unread message

C. Titus Brown

unread,
Mar 30, 2009, 4:05:26 PM3/30/09
to twill-dev
----- Forwarded message from "William K. Volkman" <wk...@users.sourceforge.net> -----

X-Original-To: ti...@caltech.edu
From: "William K. Volkman" <wk...@users.sourceforge.net>
To: ti...@idyll.org
Date: Sun, 26 Mar 2006 04:03:51 -0700
X-Mailer: Evolution 2.2.3 (2.2.3-2.fc4)
Cc: tw...@lists.idyll.org
Subject: Re: [twill] Small backward compatibility patch to setup.py

On Sat, 2006-03-25 at 17:18 -0800, Titus Brown wrote:
> On Sat, Mar 25, 2006 at 02:09:03PM -0700, William K. Volkman wrote:
> -> I end up making this change each time I get a new version of Twill,
> -> perhaps it slows down others:
> ->
> -> --- setup.py.orig 2006-03-25 02:05:04.000000000 -0700
> -> +++ setup.py 2006-03-25 14:05:10.000000000 -0700
> -> @@ -1,6 +1,9 @@
> -> #!/usr/bin/env python
> ->
> -> -from setuptools import setup
> -> +try:
> -> + from setuptools import setup
> -> +except ImportError:
> -> + from distutils.core import setup
> ->
> -> #### twill info.
>
> Hi, William,
>
> I'm putting this patch in, but I'm afraid you lose some functionality
> along with it. In particular, with twill 0.8.4, I started using the
> 'entry_point' option of setuptools.setup to specify 'twill-sh'. This
> patch to use distutils will fail to upgrade twill-sh in your current
> installation, I think.
>
> I switched to the 'entry_point' method in the hopes that this will work
> better under Windows than the old 'scripts' mechanism did. It may well
> not work out that way -- I already have another e-mail from someone who
> had some problems getting 'twill-sh' to work under 0.8.4 ;). If I get
> enough complaints, I'll switch back to using 'scripts'.

Well, yes you are correct that twill-sh doesn't get installed/upgraded.
After making all the changes necessary:
--- MANIFEST.orig 2006-03-25 14:03:22.000000000 -0700
+++ MANIFEST 2006-03-25 15:58:08.000000000 -0700
@@ -1,5 +1,6 @@
README.txt
setup.py
+twill-sh
twill-fork
twill/__init__.py
twill/_browser.py

--- setup.py.orig 2006-03-25 02:05:04.000000000 -0700
+++ setup.py 2006-03-25 16:00:21.000000000 -0700
@@ -1,6 +1,9 @@
#!/usr/bin/env python

-from setuptools import setup
+try:
+ from setuptools import setup
+except ImportError:
+ from distutils.core import setup

#### twill info.

@@ -22,7 +25,7 @@

# allow both
entry_points = dict(console_scripts=['twill-sh =
twill.shell:main'],),
- scripts = ['twill-fork'],
+ scripts = ['twill-fork','twill-sh'],

maintainer = 'C. Titus Brown',
maintainer_email = 'ti...@caltech.edu',

This is with Fedora Core 4 and python-2.4.1-2. I don't know if the
additional
entry_points will cause problems. Note that my target for setup.py is
bdist_rpm.

HTH,
William.


_______________________________________________
twill mailing list
tw...@lists.idyll.org
http://lists.idyll.org/listinfo/twill

----- End forwarded message -----

--
C. Titus Brown, c...@msu.edu

Reply all
Reply to author
Forward
0 new messages