Re: [Python-Dev] Distutils2 scripts

2010-10-22 Thread Michael Foord

 On 22/10/2010 08:20, Paul Moore wrote:

On 22 October 2010 04:31, Ron Adam  wrote:

When it's in the stdlib, the -m option should work just like any other
script run from the stdlib.

What path hacking are you thinking of?

On Windows, neither the "python" executable nor scripts in
C:\Pythonxx\Scripts are in the PATH by default. On the other hand, .py
files will run automatically via the registered file extension.

Manipulating PATH at install time (to add C:\PythonXX and/or
C:\PythonXX\Scripts) is not done - it is (rightly, in my view)
considered too difficult to get right, particularly when it comes to
uninstalling.

Many Windows users will, I guess, manually add python to PATH (so that
python-m works). Some people also add C:\PythonXX\Scripts. Personally,
I don't - so for me a pysetup script in that location would be no use.



Well, that is where pip and other scripts installed by Python go, so it 
is the 'right' place for scripts to live.


Any reason not to allow both though? (python -m and an explicit script)

For what its worth I have the same issue with unittest / unittest2. Test 
discovery and test running in Python 2.7 / 3.2 is done with:


python -m unittest args

As unittest2 is a package and supports Python 2.6 (and earlier), python 
-m unittest2 doesn't work so I provide a "unit2" script for accessing 
its functionality. I *much* prefer using "unit2 ..." to "python -m 
unittest ...".


Michael


So my personal vote is +1 for a python -m approach, and -0 for a
pysetup executable. I'm -1 on a pysetup.bat batch file - bat files
have other issues which IMO make them effectively useless.

Paul.
___
Python-Dev mailing list
Python-Dev@python.org
http://mail.python.org/mailman/listinfo/python-dev
Unsubscribe: 
http://mail.python.org/mailman/options/python-dev/fuzzyman%40voidspace.org.uk



--

http://www.voidspace.org.uk/

READ CAREFULLY. By accepting and reading this email you agree,
on behalf of your employer, to release me from all obligations
and waivers arising from any and all NON-NEGOTIATED agreements,
licenses, terms-of-service, shrinkwrap, clickwrap, browsewrap,
confidentiality, non-disclosure, non-compete and acceptable use
policies (”BOGUS AGREEMENTS”) that I have entered into with your
employer, its partners, licensors, agents and assigns, in
perpetuity, without prejudice to my ongoing rights and privileges.
You further represent that you have the authority to release me
from any BOGUS AGREEMENTS on behalf of your employer.

___
Python-Dev mailing list
Python-Dev@python.org
http://mail.python.org/mailman/listinfo/python-dev
Unsubscribe: 
http://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com


Re: [Python-Dev] Distutils2 scripts

2010-10-22 Thread Paul Moore
On 22 October 2010 04:31, Ron Adam  wrote:
> When it's in the stdlib, the -m option should work just like any other
> script run from the stdlib.
>
> What path hacking are you thinking of?

On Windows, neither the "python" executable nor scripts in
C:\Pythonxx\Scripts are in the PATH by default. On the other hand, .py
files will run automatically via the registered file extension.

Manipulating PATH at install time (to add C:\PythonXX and/or
C:\PythonXX\Scripts) is not done - it is (rightly, in my view)
considered too difficult to get right, particularly when it comes to
uninstalling.

Many Windows users will, I guess, manually add python to PATH (so that
python-m works). Some people also add C:\PythonXX\Scripts. Personally,
I don't - so for me a pysetup script in that location would be no use.

So my personal vote is +1 for a python -m approach, and -0 for a
pysetup executable. I'm -1 on a pysetup.bat batch file - bat files
have other issues which IMO make them effectively useless.

Paul.
___
Python-Dev mailing list
Python-Dev@python.org
http://mail.python.org/mailman/listinfo/python-dev
Unsubscribe: 
http://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com


Re: [Python-Dev] Distutils2 scripts

2010-10-21 Thread Ron Adam



On 10/21/2010 07:13 PM, Greg Ewing wrote:

Eric Smith wrote:

Or for that matter a plain "pysetup". It would be the one that a plain
"python" would get you.


If 'pysetup' is simply a shell script that invokes 'python -m setup'
using the current search path, I guess that's true.

On Windows, however, it seems to me that the current 'python setup.py'
scheme has advantages, since it lets you simply invoke 'setup.py' and
rely on file associations to get you the current python. Supporting
either 'python -m setup' or 'pysetup' out of the box would require
install-time path hacking of the sort that some people are uncomfortable
about.



Terek said this in the first post of this thread...

I just wanted to make sure that once distutils2 is back in the stdlib,
it's OK for us to add that script in the distribution.


When it's in the stdlib, the -m option should work just like any other 
script run from the stdlib.


What path hacking are you thinking of?

Ron

___
Python-Dev mailing list
Python-Dev@python.org
http://mail.python.org/mailman/listinfo/python-dev
Unsubscribe: 
http://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com


Re: [Python-Dev] Distutils2 scripts

2010-10-21 Thread Greg Ewing

Eric Smith wrote:
Or for that matter a plain "pysetup". It would 
be the one that a plain "python" would get you.


If 'pysetup' is simply a shell script that invokes 'python -m setup'
using the current search path, I guess that's true.

On Windows, however, it seems to me that the current 'python setup.py'
scheme has advantages, since it lets you simply invoke 'setup.py' and
rely on file associations to get you the current python. Supporting
either 'python -m setup' or 'pysetup' out of the box would require
install-time path hacking of the sort that some people are uncomfortable
about.

--
Greg
___
Python-Dev mailing list
Python-Dev@python.org
http://mail.python.org/mailman/listinfo/python-dev
Unsubscribe: 
http://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com


Re: [Python-Dev] Distutils2 scripts

2010-10-21 Thread Eric Smith

On 10/21/2010 4:44 AM, Antoine Pitrou wrote:

On Wed, 20 Oct 2010 20:01:56 -0500
Ron Adam  wrote:


On Ubuntu, I use python, python2.7, python3.1, python3.2 and that is what I
type to use that particular version.  The -m option seems to me to be the
easiest to do and works with all of these.

  python2.7 -m setup
  python3.2 -m setup


Having pysetup or pysetupX.Y executables would be much more practical
with shell auto-completion, though.


I agree. I also don't see any confusion about which python a 
"pysetupX.Y" would use. Or for that matter a plain "pysetup". It would 
be the one that a plain "python" would get you.


Eric.

___
Python-Dev mailing list
Python-Dev@python.org
http://mail.python.org/mailman/listinfo/python-dev
Unsubscribe: 
http://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com


Re: [Python-Dev] Distutils2 scripts

2010-10-21 Thread Antoine Pitrou
On Wed, 20 Oct 2010 20:01:56 -0500
Ron Adam  wrote:
> 
> On Ubuntu, I use python, python2.7, python3.1, python3.2 and that is what I 
> type to use that particular version.  The -m option seems to me to be the 
> easiest to do and works with all of these.
> 
>  python2.7 -m setup
>  python3.2 -m setup

Having pysetup or pysetupX.Y executables would be much more practical
with shell auto-completion, though.

Regards

Antoine.


___
Python-Dev mailing list
Python-Dev@python.org
http://mail.python.org/mailman/listinfo/python-dev
Unsubscribe: 
http://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com


Re: [Python-Dev] Distutils2 scripts

2010-10-20 Thread Nick Coghlan
On Thu, Oct 21, 2010 at 11:01 AM, Ron Adam  wrote:
> There are probably others I don't remember or know about.

"python -m site" is another handy one if you're trying to debug sys.path issues

Cheers,
Nick.

-- 
Nick Coghlan   |   ncogh...@gmail.com   |   Brisbane, Australia
___
Python-Dev mailing list
Python-Dev@python.org
http://mail.python.org/mailman/listinfo/python-dev
Unsubscribe: 
http://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com


Re: [Python-Dev] Distutils2 scripts

2010-10-20 Thread Ron Adam



On 10/12/2010 09:59 AM, Barry Warsaw wrote:

On Oct 12, 2010, at 12:24 PM, Greg Ewing wrote:


Giampaolo Rodolà wrote:


If that's the case what would I type in the command prompt in order to
install a module?
"C:\PythonXX\pysetup.exe"?
If so I would strongly miss old "setup.py install".


Another thing bothers me about this. With the current scheme,
if you have multiple Pythons available, it's easy to be sure
that you're installing into the right one, because it's the
one that you use to run setup.py. Whereas if installation is
performed by a different executable, there's a possibility
of them being out of sync.

So I think I'd prefer some scheme involving 'python -m ...'
or some other option to Python itself, rather than a separate
executable.


This is why I suggested that 'setup.sh' (or whatever) take a --python-version
option to select the python executable to use.

Whatever solution is implemented definitely needs to take the
multiple-installed pythons into account.


On Ubuntu, I use python, python2.7, python3.1, python3.2 and that is what I 
type to use that particular version.  The -m option seems to me to be the 
easiest to do and works with all of these.


python2.7 -m setup
python3.2 -m setup

I don't see why that isn't an acceptable solution to this? 

It's not any different than doing ...

python3.2 -m test.regrtest
python3.2 -m pydoc -g
python3.2 -m idlelib.idle
python3.2 -m this
python3.2 -m turtle
python3.2 -m timeit -h
python3.2 -m trace --help
python3.2 -m dis filename.py
python3.2 -m zipfile

There are probably others I don't remember or know about.

The point is, without the handy '-m', you have to know where the file is, 
or set environment variables, or create .bat and/or .sh files, and those 
takes a lot more work.  So why not just embrace it and move on?


Ron






___
Python-Dev mailing list
Python-Dev@python.org
http://mail.python.org/mailman/listinfo/python-dev
Unsubscribe: 
http://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com


Re: [Python-Dev] Distutils2 scripts

2010-10-20 Thread Michael Foord

 On 21/10/2010 00:33, Floris Bruynooghe wrote:

Hi

Sorry for the late response

On 8 October 2010 13:02, Fred Drake  wrote:

I'm in favor of add a top-level setup module that can be invoked using
"python -m setup ...".

I'd say +1 for this option.  It has the advantage that it's very clear
which python environment you're installing (or whatever other valid
action) the package into.  For a stand-alone script this might not
always be as clear.

Versioned scripts would also allow that without requiring the extra 
typing...


Michael


Regards
Floris




--

http://www.voidspace.org.uk/

READ CAREFULLY. By accepting and reading this email you agree,
on behalf of your employer, to release me from all obligations
and waivers arising from any and all NON-NEGOTIATED agreements,
licenses, terms-of-service, shrinkwrap, clickwrap, browsewrap,
confidentiality, non-disclosure, non-compete and acceptable use
policies (”BOGUS AGREEMENTS”) that I have entered into with your
employer, its partners, licensors, agents and assigns, in
perpetuity, without prejudice to my ongoing rights and privileges.
You further represent that you have the authority to release me
from any BOGUS AGREEMENTS on behalf of your employer.

___
Python-Dev mailing list
Python-Dev@python.org
http://mail.python.org/mailman/listinfo/python-dev
Unsubscribe: 
http://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com


Re: [Python-Dev] Distutils2 scripts

2010-10-20 Thread Floris Bruynooghe
Hi

Sorry for the late response

On 8 October 2010 13:02, Fred Drake  wrote:
> I'm in favor of add a top-level setup module that can be invoked using
> "python -m setup ...".

I'd say +1 for this option.  It has the advantage that it's very clear
which python environment you're installing (or whatever other valid
action) the package into.  For a stand-alone script this might not
always be as clear.

Regards
Floris

-- 
Debian GNU/Linux -- The Power of Freedom
www.debian.org | www.gnu.org | www.kernel.org
___
Python-Dev mailing list
Python-Dev@python.org
http://mail.python.org/mailman/listinfo/python-dev
Unsubscribe: 
http://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com


Re: [Python-Dev] Distutils2 scripts

2010-10-12 Thread Martin v. Löwis
> Assume, for the sake of the argument, that we patched the
> MSI so it (optionally) added the installing version of Python
> (and, optionally ./scripts) to the PATH. What, then, do we
> do with existing PATH entries which point to older/other Python
> installations? Option (a) says: clear them
> all out, because it's meaningless having more than one entry
> with a python.exe on it and the one we want must be this one
> because we've just ticked a box to say so. Option (b) says:
> don't mess with other entries on the PATH; it's not done.

That, too. For the registry settings, overwriting them is an
easy choice: it was the other installer that wrote the original
entries (*very* likely so), so we "own" them and we can overwrite
them. Running a repair installation on the original installer
will revert that.

With the PATH entry, it's not such an easy choice: the old entry may
have been manually added, or it may have been added by the previous
installer. Replacing it in the second case is again a straight-forward
choice, but we don't know (unless we record somewhere - in the registry
- that we added a PATH entry - perhaps an MSI Feature entry could tell
us).

Regards,
Martin
___
Python-Dev mailing list
Python-Dev@python.org
http://mail.python.org/mailman/listinfo/python-dev
Unsubscribe: 
http://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com


Re: [Python-Dev] Distutils2 scripts

2010-10-12 Thread Tim Golden

On 12/10/2010 7:17 PM, R. David Murray wrote:

On Tue, 12 Oct 2010 19:33:52 +0200, 
=?windows-1252?Q?=22Martin_v=2E_L=F6wis=22?=  wrote:

So as well as pysetup.py/.exe I would like pysetup-3.2.py / .exe on
Windows please. (I'd really like a python-3.2.exe as well.)


Please submit a patch to the installer, then.

I'm still skeptical about adding PATH, because
a) I find that fairly invasive, and despise long paths myself
(it hurts my eyes to see the list of directories that VS adds to MY
path)


Assume, for the sake of the argument, that we patched the
MSI so it (optionally) added the installing version of Python
(and, optionally ./scripts) to the PATH. What, then, do we
do with existing PATH entries which point to older/other Python
installations? Option (a) says: clear them
all out, because it's meaningless having more than one entry
with a python.exe on it and the one we want must be this one
because we've just ticked a box to say so. Option (b) says:
don't mess with other entries on the PATH; it's not done.

That said, the current installer switches an APPPATH entry and
changes -- optionally -- the file associations to point to
the installing version, so there is a precedent for ditching
previous data.

I'm actually +0 on the idea. An expert user who's trying to
juggle different Python versions should be able to sort
himself out. A naive user can use Start > Run > Python to
get the current version (thanks to the APPPATH) and can
use "program.py arg1 arg2" on the console to run program.py
with the associated version. (Notwithstanding the bug which
doesn't correctly redirect output via file associations)

But all this is pie in the sky until someone actually integrates
such a change to the MSI. Martin's clearly not going to since
he doesn't like the idea. I'm actually +0.5 on including a
script in tools\scripts (or wherever) which, when run, would
set as current the version of Python which ran it. I have a  roughly
working version of such a thing; the problem is getting it to
work with all the different Python versions and all the different
Windows versions we support.

TJG
___
Python-Dev mailing list
Python-Dev@python.org
http://mail.python.org/mailman/listinfo/python-dev
Unsubscribe: 
http://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com


Re: [Python-Dev] Distutils2 scripts

2010-10-12 Thread R. David Murray
On Tue, 12 Oct 2010 19:33:52 +0200, 
=?windows-1252?Q?=22Martin_v=2E_L=F6wis=22?=  wrote:
> > So as well as pysetup.py/.exe I would like pysetup-3.2.py / .exe on
> > Windows please. (I'd really like a python-3.2.exe as well.)
> 
> Please submit a patch to the installer, then.
> 
> I'm still skeptical about adding PATH, because
> a) I find that fairly invasive, and despise long paths myself
>(it hurts my eyes to see the list of directories that VS adds to MY
>path)

I get annoyed by that on Gentoo, too.  Gentoo, though, is using the path
entries to control *which* version of various things run when I type
a command at the prompt, IIUC, and it updates them when I change the
active version of a program, and removes them correctly when a package
is uninstalled.

Gentoo doesn't use path for that for everything, though...for Python, when
I change which version is active ("eselect python python2.5") it updates
the symlinks rather than the path, and I like that much better.  It's less
fragile, too, since it means I don't have to do 'source /etc/profile'
in every open shell after switching the active version of Python.

I don't use Windows much, but on balance I think I'm with Martin here :)

--David
___
Python-Dev mailing list
Python-Dev@python.org
http://mail.python.org/mailman/listinfo/python-dev
Unsubscribe: 
http://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com


Re: [Python-Dev] Distutils2 scripts

2010-10-12 Thread Martin v. Löwis
> So as well as pysetup.py/.exe I would like pysetup-3.2.py / .exe on
> Windows please. (I'd really like a python-3.2.exe as well.)

Please submit a patch to the installer, then.

I'm still skeptical about adding PATH, because
a) I find that fairly invasive, and despise long paths myself
   (it hurts my eyes to see the list of directories that VS adds to MY
   path)
b) it's actually fairly tricky to implement; in particular, removal on
   uninstallation is difficult.

On the other hand, adding a versioned executable in some directory that
is known to be on the path already is more easy, at least for a
per-machine installation: I guess \windows\system32 would be the right
location for such an executable. Placing files into system32 is fairly
easy with MSI (except for possible WoW64 problems - what if you install
both the 32-bit and the 64-bit Python 3.2 on the same machine).

Regards,
Martin
___
Python-Dev mailing list
Python-Dev@python.org
http://mail.python.org/mailman/listinfo/python-dev
Unsubscribe: 
http://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com


Re: [Python-Dev] Distutils2 scripts

2010-10-12 Thread Barry Warsaw
On Oct 12, 2010, at 12:24 PM, Greg Ewing wrote:

>Giampaolo Rodolà wrote:
>
>> If that's the case what would I type in the command prompt in order to
>> install a module?
>> "C:\PythonXX\pysetup.exe"?
>> If so I would strongly miss old "setup.py install".
>
>Another thing bothers me about this. With the current scheme,
>if you have multiple Pythons available, it's easy to be sure
>that you're installing into the right one, because it's the
>one that you use to run setup.py. Whereas if installation is
>performed by a different executable, there's a possibility
>of them being out of sync.
>
>So I think I'd prefer some scheme involving 'python -m ...'
>or some other option to Python itself, rather than a separate
>executable.

This is why I suggested that 'setup.sh' (or whatever) take a --python-version
option to select the python executable to use.

Whatever solution is implemented definitely needs to take the
multiple-installed pythons into account.

-Barry



signature.asc
Description: PGP signature
___
Python-Dev mailing list
Python-Dev@python.org
http://mail.python.org/mailman/listinfo/python-dev
Unsubscribe: 
http://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com


Re: [Python-Dev] Distutils2 scripts

2010-10-12 Thread Tarek Ziadé
On Tue, Oct 12, 2010 at 1:55 PM, Paul Moore  wrote:
...
> I would assume (am I wrong?) that the canonical way of installing
> modules on Windows for "non-advanced" users under distutils2 would
> still be to download and run a binary installer.

Yes this won't change.

Regards
Tarek
___
Python-Dev mailing list
Python-Dev@python.org
http://mail.python.org/mailman/listinfo/python-dev
Unsubscribe: 
http://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com


Re: [Python-Dev] Distutils2 scripts

2010-10-12 Thread Michael Foord

 On 12/10/2010 12:55, Paul Moore wrote:

On 12 October 2010 00:42, Giampaolo Rodolà  wrote:

I know. My point was you can't do it by default and installing a
module is something even a less experienced user usually does.
Typing "C:\PythonXX\pysetup" is harder compared to "setup.py install"
and solving this problem by modifying your environment paths so that
you can just type "pysetup" is something I would expect to be done by
the MSI installer, not the user.

I would assume (am I wrong?) that the canonical way of installing
modules on Windows for "non-advanced" users under distutils2 would
still be to download and run a binary installer.

Assuming that's the case, modifying paths to make sure pysetup is
available as a command is no harder than making Python itself
available. (Having said that, I'd still personally prefer to have the
distutils2 command be invoked by some form of python -m invocation).


Sure, scripts like pysetup are typically installed into 
C:\PythonXY\Scripts on Windows. Adding this to the path is no harder 
than adding C:\PythonXY to the path - in fact it is *exactly* as hard. 
Some people have an issue that they have to do this *at all* though.


Having the script invoked by "python -m ..." is no easier from this 
point of view, for it to work from the command line you still have to 
modify your path to be able to do it. Personally I would prefer a 
separate script, "pysetup install foo" is less annoying to type than 
"python -m distutils2.install foo" or "python -m setup install foo".


All the best,

Michael




Paul.
___
Python-Dev mailing list
Python-Dev@python.org
http://mail.python.org/mailman/listinfo/python-dev
Unsubscribe: 
http://mail.python.org/mailman/options/python-dev/fuzzyman%40voidspace.org.uk



--

http://www.voidspace.org.uk/

READ CAREFULLY. By accepting and reading this email you agree,
on behalf of your employer, to release me from all obligations
and waivers arising from any and all NON-NEGOTIATED agreements,
licenses, terms-of-service, shrinkwrap, clickwrap, browsewrap,
confidentiality, non-disclosure, non-compete and acceptable use
policies (”BOGUS AGREEMENTS”) that I have entered into with your
employer, its partners, licensors, agents and assigns, in
perpetuity, without prejudice to my ongoing rights and privileges.
You further represent that you have the authority to release me
from any BOGUS AGREEMENTS on behalf of your employer.

___
Python-Dev mailing list
Python-Dev@python.org
http://mail.python.org/mailman/listinfo/python-dev
Unsubscribe: 
http://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com


Re: [Python-Dev] Distutils2 scripts

2010-10-12 Thread Paul Moore
On 12 October 2010 00:42, Giampaolo Rodolà  wrote:
> I know. My point was you can't do it by default and installing a
> module is something even a less experienced user usually does.
> Typing "C:\PythonXX\pysetup" is harder compared to "setup.py install"
> and solving this problem by modifying your environment paths so that
> you can just type "pysetup" is something I would expect to be done by
> the MSI installer, not the user.

I would assume (am I wrong?) that the canonical way of installing
modules on Windows for "non-advanced" users under distutils2 would
still be to download and run a binary installer.

Assuming that's the case, modifying paths to make sure pysetup is
available as a command is no harder than making Python itself
available. (Having said that, I'd still personally prefer to have the
distutils2 command be invoked by some form of python -m invocation).

Paul.
___
Python-Dev mailing list
Python-Dev@python.org
http://mail.python.org/mailman/listinfo/python-dev
Unsubscribe: 
http://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com


Re: [Python-Dev] Distutils2 scripts

2010-10-12 Thread Michael Foord

 On 12/10/2010 00:11, Giampaolo Rodolà wrote:

Wouldn't be kinda weird that one can open the command prompt and run
"pysetup" but not "python" on Windows?
I recall an old issue on the bug tracker in which the latter proposal
was widely discussed and finally rejected for reasons I can't remember
(and it seems I can't even find the bug right now).
I think it's likely that those same reasons are valid for "pysetup" in
the same manner.

For the record, I would be more than happy to be able to open the
command prompt and type "pysetup" and "python" with success, one day.


Well ditto, but not everyone feels the same. If you have multiple python 
versions having them all modify the path on installation would be 
annoying - the other issue is that it is hard to deterministically undo 
a change on uninstallation. (And leaving cruft behind is bad, although 
plenty of other applications don't have as much of a conscience about it 
as we do.)


For the record I wrote about the PATH settings (etc) useful for Python 
on Windows:


http://www.voidspace.org.uk/python/articles/command_line.shtml#environment-variables

Probably too basic for *you* but maybe helpful for others.

What would be *really* nice was if we had a versioned script / exe as 
well (same for python.exe on Windows) so that you could unconditionally 
add the Python directory and its Scripts directory to the PATH and then 
be able to specify which version to run. Currently you have to setup 
aliases yourself to do this.


So as well as pysetup.py/.exe I would like pysetup-3.2.py / .exe on 
Windows please. (I'd really like a python-3.2.exe as well.)


All the best,

Michael Foord



--- Giampaolo
http://code.google.com/p/pyftpdlib/
http://code.google.com/p/psutil/


2010/10/12 Eric Smith:

On 10/11/2010 5:17 PM, Giampaolo Rodolà wrote:

2010/10/8 Eric Smith:

On 10/8/10 10:26 AM, Barry Warsaw wrote:

In any case, these could be a simple shell script wrapping 'python -m
setup'.
It could even take a --use-python-version option to select the pythonX.Y
it
used, without having to encode the Python version number in the script
name.

On Windows it can't be a shell script or batch file, but needs to be an
executable. setuptools already deals with this.

If that's the case what would I type in the command prompt in order to
install a module?
"C:\PythonXX\pysetup.exe"?
If so I would strongly miss old "setup.py install".

Same thing you would type at a shell prompt. Presumably we're talking about
"pysetup install" (which you'll note is one character shorter!). You could
fully qualify the path if need be, on any platform, using its conventions.

Eric.


___
Python-Dev mailing list
Python-Dev@python.org
http://mail.python.org/mailman/listinfo/python-dev
Unsubscribe: 
http://mail.python.org/mailman/options/python-dev/fuzzyman%40voidspace.org.uk



--

http://www.voidspace.org.uk/

READ CAREFULLY. By accepting and reading this email you agree,
on behalf of your employer, to release me from all obligations
and waivers arising from any and all NON-NEGOTIATED agreements,
licenses, terms-of-service, shrinkwrap, clickwrap, browsewrap,
confidentiality, non-disclosure, non-compete and acceptable use
policies (”BOGUS AGREEMENTS”) that I have entered into with your
employer, its partners, licensors, agents and assigns, in
perpetuity, without prejudice to my ongoing rights and privileges.
You further represent that you have the authority to release me
from any BOGUS AGREEMENTS on behalf of your employer.

___
Python-Dev mailing list
Python-Dev@python.org
http://mail.python.org/mailman/listinfo/python-dev
Unsubscribe: 
http://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com


Re: [Python-Dev] Distutils2 scripts

2010-10-11 Thread Éric Araujo
Le 12/10/2010 01:11, Giampaolo Rodolà a écrit :
> Wouldn't be kinda weird that one can open the command prompt and run
> "pysetup" but not "python" on Windows?
> I recall an old issue on the bug tracker in which the latter proposal
> was widely discussed and finally rejected for reasons I can't remember
> (and it seems I can't even find the bug right now).
> I think it's likely that those same reasons are valid for "pysetup" in
> the same manner.

Arguments for rejection by MvL in http://bugs.python.org/issue3561 :

“Adding something to PATH is nearly unacceptable clutter even during
installation, and completely unacceptable (to me) after uninstallation.
If you install Python several times, will the path get longer and longer?”

“To me, any change to PATH is a problem... (I really think that software
installation should never ever touch it - this aspect of the operating
system completely belongs to the user resp. the system administrator)”

“If such a solution was designed, there would still be many questions,
such as:
- what is the actual problem being solved? Is it real? Could there
  be other solutions to that problem (such as installing things into
  system32, or somewhere else that is on the PATH already)?
- if the path is modified, should the Python directory be added to
  the beginning or the end?
- IMO, this feature needs to be customizable, and IMO, it must be
  turned off by default. So how should such customization be offered?”

Regarding pysetup, would it be acceptable to require programmers on
Windows to edit their PATH or copy the script to a directory on PATH?

Regards

___
Python-Dev mailing list
Python-Dev@python.org
http://mail.python.org/mailman/listinfo/python-dev
Unsubscribe: 
http://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com


Re: [Python-Dev] Distutils2 scripts

2010-10-11 Thread Eric Smith

On 10/11/2010 5:17 PM, Giampaolo Rodolà wrote:

2010/10/8 Eric Smith:

On 10/8/10 10:26 AM, Barry Warsaw wrote:

In any case, these could be a simple shell script wrapping 'python -m
setup'.
It could even take a --use-python-version option to select the pythonX.Y
it
used, without having to encode the Python version number in the script
name.


On Windows it can't be a shell script or batch file, but needs to be an
executable. setuptools already deals with this.


If that's the case what would I type in the command prompt in order to
install a module?
"C:\PythonXX\pysetup.exe"?
If so I would strongly miss old "setup.py install".


Same thing you would type at a shell prompt. Presumably we're talking 
about "pysetup install" (which you'll note is one character shorter!). 
You could fully qualify the path if need be, on any platform, using its 
conventions.


Eric.
___
Python-Dev mailing list
Python-Dev@python.org
http://mail.python.org/mailman/listinfo/python-dev
Unsubscribe: 
http://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com


Re: [Python-Dev] Distutils2 scripts

2010-10-11 Thread Giampaolo Rodolà
2010/10/12 Antoine Pitrou :
> On Tue, 12 Oct 2010 01:11:24 +0200
> Giampaolo Rodolà  wrote:
>> Wouldn't be kinda weird that one can open the command prompt and run
>> "pysetup" but not "python" on Windows?
>
> If you add C:\PythonXY to your path, you can run "python".

I know. My point was you can't do it by default and installing a
module is something even a less experienced user usually does.
Typing "C:\PythonXX\pysetup" is harder compared to "setup.py install"
and solving this problem by modifying your environment paths so that
you can just type "pysetup" is something I would expect to be done by
the MSI installer, not the user.


--- Giampaolo
http://code.google.com/p/pyft/
http://code.google.com/p/psutil/
___
Python-Dev mailing list
Python-Dev@python.org
http://mail.python.org/mailman/listinfo/python-dev
Unsubscribe: 
http://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com


Re: [Python-Dev] Distutils2 scripts

2010-10-11 Thread Greg Ewing

Giampaolo Rodolà wrote:

Wouldn't be kinda weird that one can open the command prompt and run
"pysetup" but not "python" on Windows?
I recall an old issue on the bug tracker in which the latter proposal
was widely discussed and finally rejected for reasons I can't remember


On Windows I think it's easier and more reliable to set things
up so that you can invoke a .py file directly as a command.

--
Greg
___
Python-Dev mailing list
Python-Dev@python.org
http://mail.python.org/mailman/listinfo/python-dev
Unsubscribe: 
http://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com


Re: [Python-Dev] Distutils2 scripts

2010-10-11 Thread Greg Ewing

Giampaolo Rodolà wrote:


If that's the case what would I type in the command prompt in order to
install a module?
"C:\PythonXX\pysetup.exe"?
If so I would strongly miss old "setup.py install".


Another thing bothers me about this. With the current scheme,
if you have multiple Pythons available, it's easy to be sure
that you're installing into the right one, because it's the
one that you use to run setup.py. Whereas if installation is
performed by a different executable, there's a possibility
of them being out of sync.

So I think I'd prefer some scheme involving 'python -m ...'
or some other option to Python itself, rather than a separate
executable.

--
Greg

___
Python-Dev mailing list
Python-Dev@python.org
http://mail.python.org/mailman/listinfo/python-dev
Unsubscribe: 
http://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com


Re: [Python-Dev] Distutils2 scripts

2010-10-11 Thread Antoine Pitrou
On Tue, 12 Oct 2010 01:11:24 +0200
Giampaolo Rodolà  wrote:
> Wouldn't be kinda weird that one can open the command prompt and run
> "pysetup" but not "python" on Windows?

If you add C:\PythonXY to your path, you can run "python".

Regards

Antoine.


___
Python-Dev mailing list
Python-Dev@python.org
http://mail.python.org/mailman/listinfo/python-dev
Unsubscribe: 
http://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com


Re: [Python-Dev] Distutils2 scripts

2010-10-11 Thread Giampaolo Rodolà
Wouldn't be kinda weird that one can open the command prompt and run
"pysetup" but not "python" on Windows?
I recall an old issue on the bug tracker in which the latter proposal
was widely discussed and finally rejected for reasons I can't remember
(and it seems I can't even find the bug right now).
I think it's likely that those same reasons are valid for "pysetup" in
the same manner.

For the record, I would be more than happy to be able to open the
command prompt and type "pysetup" and "python" with success, one day.


--- Giampaolo
http://code.google.com/p/pyftpdlib/
http://code.google.com/p/psutil/


2010/10/12 Eric Smith :
> On 10/11/2010 5:17 PM, Giampaolo Rodolà wrote:
>>
>> 2010/10/8 Eric Smith:
>>>
>>> On 10/8/10 10:26 AM, Barry Warsaw wrote:

 In any case, these could be a simple shell script wrapping 'python -m
 setup'.
 It could even take a --use-python-version option to select the pythonX.Y
 it
 used, without having to encode the Python version number in the script
 name.
>>>
>>> On Windows it can't be a shell script or batch file, but needs to be an
>>> executable. setuptools already deals with this.
>>
>> If that's the case what would I type in the command prompt in order to
>> install a module?
>> "C:\PythonXX\pysetup.exe"?
>> If so I would strongly miss old "setup.py install".
>
> Same thing you would type at a shell prompt. Presumably we're talking about
> "pysetup install" (which you'll note is one character shorter!). You could
> fully qualify the path if need be, on any platform, using its conventions.
>
> Eric.
>
___
Python-Dev mailing list
Python-Dev@python.org
http://mail.python.org/mailman/listinfo/python-dev
Unsubscribe: 
http://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com


Re: [Python-Dev] Distutils2 scripts

2010-10-11 Thread Giampaolo Rodolà
2010/10/8 Eric Smith :
> On 10/8/10 10:26 AM, Barry Warsaw wrote:
>> In any case, these could be a simple shell script wrapping 'python -m
>> setup'.
>> It could even take a --use-python-version option to select the pythonX.Y
>> it
>> used, without having to encode the Python version number in the script
>> name.
>
> On Windows it can't be a shell script or batch file, but needs to be an
> executable. setuptools already deals with this.

If that's the case what would I type in the command prompt in order to
install a module?
"C:\PythonXX\pysetup.exe"?
If so I would strongly miss old "setup.py install".


--- Giampaolo
___
Python-Dev mailing list
Python-Dev@python.org
http://mail.python.org/mailman/listinfo/python-dev
Unsubscribe: 
http://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com


Re: [Python-Dev] Distutils2 scripts

2010-10-11 Thread Daniel Stutzbach
On Fri, Oct 8, 2010 at 4:44 PM, Tarek Ziadé  wrote:

> Hehe. What's the story behind changing the name from Cheeseshop to PyPI btw
> ?
> I found the first one much nicer


A through investigation revealed that the Cheeseshop did not in fact have
any cheese at all.  Not even Wensleydale.

-- 
Daniel Stutzbach, Ph.D.
President, Stutzbach Enterprises, LLC 
___
Python-Dev mailing list
Python-Dev@python.org
http://mail.python.org/mailman/listinfo/python-dev
Unsubscribe: 
http://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com


Re: [Python-Dev] Distutils2 scripts

2010-10-11 Thread Martin v. Löwis
Am 08.10.2010 17:21, schrieb Michael Foord:
>  On 08/10/2010 16:07, Barry Warsaw wrote:
>> On Oct 08, 2010, at 11:04 AM, Toshio Kuratomi wrote:
>>
>>> python-setup  is a lot like python setup.py
>>> pysetup is shorter
>>> pyegg is even shorter :-)
>> wfm!
> 
> To avoid any potential confusion, wfm is a common tla for the following
> phrases:
> 
> Whole Foods Market
> Western Federation of Miners
> Window Fitters Mate
> Workforce Management
> 
> Although wfm is possibly being used here as "works for me" given the
> context... ;-)

Not being a native speaker (of English), I had actually assumed that
Barry is proposing to call the script "wfm". Although, in retrospect,
"/usr/bin/wfm!" might work as well :-)

Regards,
Martin
___
Python-Dev mailing list
Python-Dev@python.org
http://mail.python.org/mailman/listinfo/python-dev
Unsubscribe: 
http://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com


Re: [Python-Dev] Distutils2 scripts

2010-10-09 Thread Gisle Aas
On Oct 9, 2010, at 1:07 , James Y Knight wrote:

> On Oct 8, 2010, at 5:24 PM, Gisle Aas wrote:
> 
>> On Oct 8, 2010, at 9:22 , Jeroen Ruigrok van der Werven wrote:
>> 
>>> +1 from me. I sincerely dislike the Perl-esque -m stuff.
>> 
>> As a Perl/Python guy I have to object to calling the -m stuff Perl-esque.  
>> This is a very Pythonish thing.  In the Perl world we never treat modules as 
>> scripts; they are separate concepts written separately and installed in 
>> separate locations.  There is no feature of perl similar to the Pythonish -m 
>> stuff.
> 
> 
> Yes there is. -m and -M.
> 
> E.g., the widely advertised perl -MCPAN -e install. It's not identical to 
> python's -m, to be sure, but it's *similar*.

It might look similar but it's not.

If it was similar 'python -mfoo' would be a shortcut for 'python -c "import 
foo"' and 'python -Mfoo' would be a shortcut for 'python -c "from foo import 
*".  It would also have to be possible to repeat the -c option.  Then we could 
have written the Perl-esque:

python -Mdistutils2.depgraph -c "main()"

There is no way to do something similar to 'python -mfoo ...' from perl.  The 
closest thing I could think of would be 'perl $(perldoc -l foo) ...', assuming 
a bash-like shell.

Regards,
Gisle

___
Python-Dev mailing list
Python-Dev@python.org
http://mail.python.org/mailman/listinfo/python-dev
Unsubscribe: 
http://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com


Re: [Python-Dev] Distutils2 scripts

2010-10-08 Thread James Y Knight

On Oct 8, 2010, at 5:24 PM, Gisle Aas wrote:

> On Oct 8, 2010, at 9:22 , Jeroen Ruigrok van der Werven wrote:
> 
>> +1 from me. I sincerely dislike the Perl-esque -m stuff.
> 
> As a Perl/Python guy I have to object to calling the -m stuff Perl-esque.  
> This is a very Pythonish thing.  In the Perl world we never treat modules as 
> scripts; they are separate concepts written separately and installed in 
> separate locations.  There is no feature of perl similar to the Pythonish -m 
> stuff.


Yes there is. -m and -M.

E.g., the widely advertised perl -MCPAN -e install. It's not identical to 
python's -m, to be sure, but it's *similar*.

James
___
Python-Dev mailing list
Python-Dev@python.org
http://mail.python.org/mailman/listinfo/python-dev
Unsubscribe: 
http://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com


Re: [Python-Dev] Distutils2 scripts

2010-10-08 Thread Brett Cannon
On Fri, Oct 8, 2010 at 14:44, Tarek Ziadé  wrote:
> On Fri, Oct 8, 2010 at 9:31 PM, Brett Cannon  wrote:
>> On Fri, Oct 8, 2010 at 09:25, Tarek Ziadé  wrote:
>>> On Fri, Oct 8, 2010 at 5:53 PM, Toshio Kuratomi  wrote:
 On Fri, Oct 08, 2010 at 05:12:44PM +0200, Antoine Pitrou wrote:
>>> ...
> > pysetup is shorter
>>>
>>> Let's use pysetup !
>>>
>>> ...
 I won't bikeshed as long as we stay away from conflicting names.
>>>
>>> +1.
>>>
>>> So. Let's add pysetup in distutils2, that will be installed as a
>>> classical script. Once we move distutils2 back in the stdlib, it will
>>> be provided in Python's bin dir, so people will have the same
>>> "pysetup" name everywhere,
>>
>> I am not about to bikeshed on the name, but I would like to publicly
>> shed a single tear for no one even suggesting a Monty Python name
>> closer than "quiche". I think going with PyPI over Cheeseshop helped
>> put an end to that naming scheme, and that's a shame.
>>
>> Anyway, I can always alias pysetup to cheeseshop or ohmightytim on my
>> machine and reminisce.
>
> Hehe. What's the story behind changing the name from Cheeseshop to PyPI btw ?
> I found the first one much nicer

Richard Jones is the authority on the story, but from what I can
remember from the discussion it was decided that managers would have
had issues with using a service called the Cheeseshop. So basically
the idea of professional-sounding name won out. I still use
cheeseshop.python.org to access the package index.
___
Python-Dev mailing list
Python-Dev@python.org
http://mail.python.org/mailman/listinfo/python-dev
Unsubscribe: 
http://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com


Re: [Python-Dev] Distutils2 scripts

2010-10-08 Thread Tarek Ziadé
On Fri, Oct 8, 2010 at 9:31 PM, Brett Cannon  wrote:
> On Fri, Oct 8, 2010 at 09:25, Tarek Ziadé  wrote:
>> On Fri, Oct 8, 2010 at 5:53 PM, Toshio Kuratomi  wrote:
>>> On Fri, Oct 08, 2010 at 05:12:44PM +0200, Antoine Pitrou wrote:
>> ...
 > pysetup is shorter
>>
>> Let's use pysetup !
>>
>> ...
>>> I won't bikeshed as long as we stay away from conflicting names.
>>
>> +1.
>>
>> So. Let's add pysetup in distutils2, that will be installed as a
>> classical script. Once we move distutils2 back in the stdlib, it will
>> be provided in Python's bin dir, so people will have the same
>> "pysetup" name everywhere,
>
> I am not about to bikeshed on the name, but I would like to publicly
> shed a single tear for no one even suggesting a Monty Python name
> closer than "quiche". I think going with PyPI over Cheeseshop helped
> put an end to that naming scheme, and that's a shame.
>
> Anyway, I can always alias pysetup to cheeseshop or ohmightytim on my
> machine and reminisce.

Hehe. What's the story behind changing the name from Cheeseshop to PyPI btw ?
I found the first one much nicer

>



-- 
Tarek Ziadé | http://ziade.org
___
Python-Dev mailing list
Python-Dev@python.org
http://mail.python.org/mailman/listinfo/python-dev
Unsubscribe: 
http://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com


Re: [Python-Dev] Distutils2 scripts

2010-10-08 Thread Gisle Aas
On Oct 8, 2010, at 9:22 , Jeroen Ruigrok van der Werven wrote:

> +1 from me. I sincerely dislike the Perl-esque -m stuff.

As a Perl/Python guy I have to object to calling the -m stuff Perl-esque.  This 
is a very Pythonish thing.  In the Perl world we never treat modules as 
scripts; they are separate concepts written separately and installed in 
separate locations.  There is no feature of perl similar to the Pythonish -m 
stuff.

Regards,
Gisle

___
Python-Dev mailing list
Python-Dev@python.org
http://mail.python.org/mailman/listinfo/python-dev
Unsubscribe: 
http://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com


Re: [Python-Dev] Distutils2 scripts

2010-10-08 Thread R. David Murray
On Fri, 08 Oct 2010 12:31:07 -0700, Brett Cannon  wrote:
> I am not about to bikeshed on the name, but I would like to publicly
> shed a single tear for no one even suggesting a Monty Python name
> closer than "quiche". I think going with PyPI over Cheeseshop helped
> put an end to that naming scheme, and that's a shame.
> 
> Anyway, I can always alias pysetup to cheeseshop or ohmightytim on my
> machine and reminisce.

Or thebookofarmaments.

--
R. David Murray  www.bitdance.com
___
Python-Dev mailing list
Python-Dev@python.org
http://mail.python.org/mailman/listinfo/python-dev
Unsubscribe: 
http://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com


Re: [Python-Dev] Distutils2 scripts

2010-10-08 Thread Brett Cannon
On Fri, Oct 8, 2010 at 09:25, Tarek Ziadé  wrote:
> On Fri, Oct 8, 2010 at 5:53 PM, Toshio Kuratomi  wrote:
>> On Fri, Oct 08, 2010 at 05:12:44PM +0200, Antoine Pitrou wrote:
> ...
>>> > pysetup is shorter
>
> Let's use pysetup !
>
> ...
>> I won't bikeshed as long as we stay away from conflicting names.
>
> +1.
>
> So. Let's add pysetup in distutils2, that will be installed as a
> classical script. Once we move distutils2 back in the stdlib, it will
> be provided in Python's bin dir, so people will have the same
> "pysetup" name everywhere,

I am not about to bikeshed on the name, but I would like to publicly
shed a single tear for no one even suggesting a Monty Python name
closer than "quiche". I think going with PyPI over Cheeseshop helped
put an end to that naming scheme, and that's a shame.

Anyway, I can always alias pysetup to cheeseshop or ohmightytim on my
machine and reminisce.
___
Python-Dev mailing list
Python-Dev@python.org
http://mail.python.org/mailman/listinfo/python-dev
Unsubscribe: 
http://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com


Re: [Python-Dev] Distutils2 scripts

2010-10-08 Thread Eric Smith

On 10/8/10 2:41 PM, Tarek Ziadé wrote:

On Fri, Oct 8, 2010 at 4:49 PM, Eric Smith  wrote:
...


On Windows it can't be a shell script or batch file, but needs to be an
executable. setuptools already deals with this.


Why ? The script-wrapping feature Setuptools has is on my radar for
d2, but I am not sure why it's an advantage in that case.


It can't be a batch file because then it can't be called from other 
batch files (without using the "call" syntax). I guess there are other 
options like using WSH (or newer technology), but then you have to pick 
your target OS carefully.


I think the setuptools approach is the preferred solution, although of 
course it's a hassle.


--
Eric.
___
Python-Dev mailing list
Python-Dev@python.org
http://mail.python.org/mailman/listinfo/python-dev
Unsubscribe: 
http://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com


Re: [Python-Dev] Distutils2 scripts

2010-10-08 Thread Tarek Ziadé
On Fri, Oct 8, 2010 at 4:49 PM, Eric Smith  wrote:
...
>
> On Windows it can't be a shell script or batch file, but needs to be an
> executable. setuptools already deals with this.

Why ? The script-wrapping feature Setuptools has is on my radar for
d2, but I am not sure why it's an advantage in that case.

Tarek

-- 
Tarek Ziadé | http://ziade.org
___
Python-Dev mailing list
Python-Dev@python.org
http://mail.python.org/mailman/listinfo/python-dev
Unsubscribe: 
http://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com


Re: [Python-Dev] Distutils2 scripts

2010-10-08 Thread Eric Smith

On 10/8/10 10:26 AM, Barry Warsaw wrote:


No underscores, please. :)


Indeed!


In any case, these could be a simple shell script wrapping 'python -m setup'.
It could even take a --use-python-version option to select the pythonX.Y it
used, without having to encode the Python version number in the script name.


On Windows it can't be a shell script or batch file, but needs to be an 
executable. setuptools already deals with this.


--
Eric.
___
Python-Dev mailing list
Python-Dev@python.org
http://mail.python.org/mailman/listinfo/python-dev
Unsubscribe: 
http://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com


Re: [Python-Dev] Distutils2 scripts

2010-10-08 Thread Tarek Ziadé
On Fri, Oct 8, 2010 at 7:01 PM, Fred Drake  wrote:
> On Fri, Oct 8, 2010 at 9:22 AM, Tarek Ziadé  wrote:
>> pkg_manager ?
>
> 1. Underscores are evil.  Don't do that.
>
> 2. Mixed shortened + written-out names are just nasty.
>
>> Mmm.. setup.py is gone in D2, and setup.py will be the marker of d1.
>
> Did we finally decide it could be done without setup.py entirely, in
> all cases?  I guess I've been busy elsewhere lately.

You mean like, having a distutils1 project without setup.py ?

>
>> Some project might want to provide both setups for backward
>> compatibility:
>>
>> - a setup.py (d1)
>> - a setup,cfg (d2 and optionally some d1 options)
>
> If a project requites setup.py for any reason, it can include the
> compatibility it needs there, even if there is sometimes a need for d2
> to use a setup.py:
>
>
>    try:
>        import distutils2
>    except ImportError:
>        import distutils.core
>        distutils.core.setup(...)
>    else:
>        distutils2.core.setup()

At the last sprint, we ended up thinking that it would be better to
have a setup.py that work only with distutils, and let people using
setup.cfg for d2 (and if needed, hooks)

This is way simpler for people because we can tell them: leave your
setup.py as it is so you are compatible with installers like pip and
easy_install for the time being, and add stuff in your .cfg. That way,
they don't have to throw distutils2 code in the mix in setup.py, and
be confused with all the subtle differences. And they'll follow that
way the "no-setup.py" philosophy

Tarek
___
Python-Dev mailing list
Python-Dev@python.org
http://mail.python.org/mailman/listinfo/python-dev
Unsubscribe: 
http://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com


Re: [Python-Dev] Distutils2 scripts

2010-10-08 Thread Fred Drake
On Fri, Oct 8, 2010 at 9:22 AM, Tarek Ziadé  wrote:
> pkg_manager ?

1. Underscores are evil.  Don't do that.

2. Mixed shortened + written-out names are just nasty.

> Mmm.. setup.py is gone in D2, and setup.py will be the marker of d1.

Did we finally decide it could be done without setup.py entirely, in
all cases?  I guess I've been busy elsewhere lately.

> Some project might want to provide both setups for backward
> compatibility:
>
> - a setup.py (d1)
> - a setup,cfg (d2 and optionally some d1 options)

If a project requites setup.py for any reason, it can include the
compatibility it needs there, even if there is sometimes a need for d2
to use a setup.py:


try:
import distutils2
except ImportError:
import distutils.core
distutils.core.setup(...)
else:
distutils2.core.setup()

Anyway, the pysetup name offered in tis thread works for me as well.


  -Fred

--
Fred L. Drake, Jr.    
"A storm broke loose in my mind."  --Albert Einstein
___
Python-Dev mailing list
Python-Dev@python.org
http://mail.python.org/mailman/listinfo/python-dev
Unsubscribe: 
http://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com


Re: [Python-Dev] Distutils2 scripts

2010-10-08 Thread Alexis Métaireau
Le 10/08/2010 04:31 PM, Jon Ribbens a écrit :
> On Fri, Oct 08, 2010 at 11:04:35AM -0400, Toshio Kuratomi wrote:
>> In the larger universe of programs, it might make for more intuitive
>> remembering of the command to use a prefix (either py or python) though.
>>
>> python-setup  is a lot like python setup.py
>> pysetup is shorter
>> pyegg is even shorter :-)
> 
> I'd just like to say "pypackage" again.
> 
> pypackage install thingy
> pypackage remove thingy
> pypackage update thingy
Btw, we are not talking about "packages", as packages are already used
in the python concepts (See
http://guide.python-distribute.org/glossary.html)

So, it would be better to have something like "pydist", but seems to be
less obvious than "pysetup".

Alexis


> 
> etc
> ___
> Python-Dev mailing list
> Python-Dev@python.org
> http://mail.python.org/mailman/listinfo/python-dev
> Unsubscribe: 
> http://mail.python.org/mailman/options/python-dev/alexis%40notmyidea.org

___
Python-Dev mailing list
Python-Dev@python.org
http://mail.python.org/mailman/listinfo/python-dev
Unsubscribe: 
http://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com


Re: [Python-Dev] Distutils2 scripts

2010-10-08 Thread Alexis Métaireau
Le 10/08/2010 05:25 PM, Tarek Ziadé a écrit :
> On Fri, Oct 8, 2010 at 5:53 PM, Toshio Kuratomi  wrote:
>> On Fri, Oct 08, 2010 at 05:12:44PM +0200, Antoine Pitrou wrote:
> ...
 pysetup is shorter
> 
> Let's use pysetup !
+1 on pysetup. Reusing the well known "setup" and adding py as a prefix
will avoid any conflict.

> 
> ...
>> I won't bikeshed as long as we stay away from conflicting names.
> 
> +1.
> 
> So. Let's add pysetup in distutils2, that will be installed as a
> classical script. Once we move distutils2 back in the stdlib, it will
> be provided in Python's bin dir, so people will have the same
> "pysetup" name everywhere,
> 
> 
> Tarek
> 

___
Python-Dev mailing list
Python-Dev@python.org
http://mail.python.org/mailman/listinfo/python-dev
Unsubscribe: 
http://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com


Re: [Python-Dev] Distutils2 scripts

2010-10-08 Thread Tarek Ziadé
On Fri, Oct 8, 2010 at 5:53 PM, Toshio Kuratomi  wrote:
> On Fri, Oct 08, 2010 at 05:12:44PM +0200, Antoine Pitrou wrote:
...
>> > pysetup is shorter

Let's use pysetup !

...
> I won't bikeshed as long as we stay away from conflicting names.

+1.

So. Let's add pysetup in distutils2, that will be installed as a
classical script. Once we move distutils2 back in the stdlib, it will
be provided in Python's bin dir, so people will have the same
"pysetup" name everywhere,


Tarek

-- 
Tarek Ziadé | http://ziade.org
___
Python-Dev mailing list
Python-Dev@python.org
http://mail.python.org/mailman/listinfo/python-dev
Unsubscribe: 
http://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com


Re: [Python-Dev] Distutils2 scripts

2010-10-08 Thread Tarek Ziadé
On Fri, Oct 8, 2010 at 4:54 PM, Georg Brandl  wrote:
> Am 08.10.2010 16:26, schrieb Barry Warsaw:
>
>>>- query pypi
>>>- browse what's installed
>>>- install/remove projects
>>>- create releases and upload them
>>>
>>>pkg_manager ?
>>
>> No underscores, please. :)
>>
>> Actually, a decent wrapper script could just be called 'setup'.  My
>> command-not-found on Ubuntu doesn't find a collision, or even close
>> similarities.
>
> No generic name, *please*.  easy_install was bad enough, no need to repeat
> that mistake.  "egg" would be better, but weren't we phasing out the egg
> format?

-1 on anything containing the word 'egg'. It'll add confusion with
egg-the-format


>
> Georg
>
>
> --
> Thus spake the Lord: Thou shalt indent with four spaces. No more, no less.
> Four shall be the number of spaces thou shalt indent, and the number of thy
> indenting shall be four. Eight shalt thou not indent, nor either indent thou
> two, excepting that thou then proceed to four. Tabs are right out.
>
> ___
> Python-Dev mailing list
> Python-Dev@python.org
> http://mail.python.org/mailman/listinfo/python-dev
> Unsubscribe: 
> http://mail.python.org/mailman/options/python-dev/ziade.tarek%40gmail.com
>



-- 
Tarek Ziadé | http://ziade.org
___
Python-Dev mailing list
Python-Dev@python.org
http://mail.python.org/mailman/listinfo/python-dev
Unsubscribe: 
http://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com


Re: [Python-Dev] Distutils2 scripts

2010-10-08 Thread Éric Araujo
Le 08/10/2010 17:31, Jon Ribbens a écrit :
> I'd just like to say "pypackage" again.

In the Python world, a package is a directory with an __init__.py file.
 Distutils and distutils2 try to avoid confusion and call the other
things “distributions”.

Of course, everyone outside of the Python world thinks a distribution is
an operating system that has a free kernel and a package manager.  Maybe
we should trade “distributions” for “bundles”.

Regards

___
Python-Dev mailing list
Python-Dev@python.org
http://mail.python.org/mailman/listinfo/python-dev
Unsubscribe: 
http://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com


Re: [Python-Dev] Distutils2 scripts

2010-10-08 Thread Toshio Kuratomi
On Fri, Oct 08, 2010 at 05:12:44PM +0200, Antoine Pitrou wrote:
> On Fri, 8 Oct 2010 11:04:35 -0400
> Toshio Kuratomi  wrote:
> > 
> > In the larger universe of programs, it might make for more intuitive
> > remembering of the command to use a prefix (either py or python) though.
> > 
> > python-setup  is a lot like python setup.py
> > pysetup is shorter
> > pyegg is even shorter :-)
> 
> Wouldn't "quiche" be a better alternative for "pyegg"?
> 
I won't bikeshed as long as we stay away from conflicting names.

-Toshio


pgpk9LAmigC2q.pgp
Description: PGP signature
___
Python-Dev mailing list
Python-Dev@python.org
http://mail.python.org/mailman/listinfo/python-dev
Unsubscribe: 
http://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com


Re: [Python-Dev] Distutils2 scripts

2010-10-08 Thread Jon Ribbens
On Fri, Oct 08, 2010 at 11:04:35AM -0400, Toshio Kuratomi wrote:
> In the larger universe of programs, it might make for more intuitive
> remembering of the command to use a prefix (either py or python) though.
> 
> python-setup  is a lot like python setup.py
> pysetup is shorter
> pyegg is even shorter :-)

I'd just like to say "pypackage" again.

pypackage install thingy
pypackage remove thingy
pypackage update thingy

etc
___
Python-Dev mailing list
Python-Dev@python.org
http://mail.python.org/mailman/listinfo/python-dev
Unsubscribe: 
http://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com


Re: [Python-Dev] Distutils2 scripts

2010-10-08 Thread Michael Foord

 On 08/10/2010 16:07, Barry Warsaw wrote:

On Oct 08, 2010, at 11:04 AM, Toshio Kuratomi wrote:


python-setup  is a lot like python setup.py
pysetup is shorter
pyegg is even shorter :-)

wfm!


To avoid any potential confusion, wfm is a common tla for the following 
phrases:


Whole Foods Market
Western Federation of Miners
Window Fitters Mate
Workforce Management

Although wfm is possibly being used here as "works for me" given the 
context... ;-)


Michael


-Barry


___
Python-Dev mailing list
Python-Dev@python.org
http://mail.python.org/mailman/listinfo/python-dev
Unsubscribe: 
http://mail.python.org/mailman/options/python-dev/fuzzyman%40voidspace.org.uk



--

http://www.voidspace.org.uk/

READ CAREFULLY. By accepting and reading this email you agree,
on behalf of your employer, to release me from all obligations
and waivers arising from any and all NON-NEGOTIATED agreements,
licenses, terms-of-service, shrinkwrap, clickwrap, browsewrap,
confidentiality, non-disclosure, non-compete and acceptable use
policies ("BOGUS AGREEMENTS") that I have entered into with your
employer, its partners, licensors, agents and assigns, in
perpetuity, without prejudice to my ongoing rights and privileges.
You further represent that you have the authority to release me
from any BOGUS AGREEMENTS on behalf of your employer.

___
Python-Dev mailing list
Python-Dev@python.org
http://mail.python.org/mailman/listinfo/python-dev
Unsubscribe: 
http://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com


Re: [Python-Dev] Distutils2 scripts

2010-10-08 Thread Antoine Pitrou
On Fri, 8 Oct 2010 11:04:35 -0400
Toshio Kuratomi  wrote:
> 
> In the larger universe of programs, it might make for more intuitive
> remembering of the command to use a prefix (either py or python) though.
> 
> python-setup  is a lot like python setup.py
> pysetup is shorter
> pyegg is even shorter :-)

Wouldn't "quiche" be a better alternative for "pyegg"?



___
Python-Dev mailing list
Python-Dev@python.org
http://mail.python.org/mailman/listinfo/python-dev
Unsubscribe: 
http://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com


Re: [Python-Dev] Distutils2 scripts

2010-10-08 Thread Barry Warsaw
On Oct 08, 2010, at 11:04 AM, Toshio Kuratomi wrote:

>python-setup  is a lot like python setup.py
>pysetup is shorter
>pyegg is even shorter :-)

wfm!
-Barry


signature.asc
Description: PGP signature
___
Python-Dev mailing list
Python-Dev@python.org
http://mail.python.org/mailman/listinfo/python-dev
Unsubscribe: 
http://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com


Re: [Python-Dev] Distutils2 scripts

2010-10-08 Thread Toshio Kuratomi
On Fri, Oct 08, 2010 at 10:26:36AM -0400, Barry Warsaw wrote:
> On Oct 08, 2010, at 03:22 PM, Tarek Ziadé wrote:
> 
> >Yes that what I was thinking about -- I am not too worried about this,
> >since every Linux  deals with the 'more than one python installed'
> >case.
> 
> Kind of.   but anyway...
> 
> >> I'm in favor of add a top-level setup module that can be invoked using
> >> "python -m setup ...".  There will be three cases:
> >
> >Nice idea ! I wouldn't call it setup though, since it does many other
> >things. I can't think of a good name yet, but I'd like such a script
> >to express the idea that it can be used to:
> 
> I like 'python -m setup' too.  It's a small step from the familiar thing
> (python setup.py) to the new and shiny thing, without being confusing.  And
> you won't have to worry about things like version numbers because the Python
> executable will already have that baked in.
> 
> >- query pypi
> >- browse what's installed
> >- install/remove projects
> >- create releases and upload them
> >
> >pkg_manager ?
> 
> No underscores, please. :)
> 
> Actually, a decent wrapper script could just be called 'setup'.  My
> command-not-found on Ubuntu doesn't find a collision, or even close
> similarities.
> 
Simple English names like this are almost never a good idea for commands.
A quick google for "/usr/bin/setup" finds that Fedora-derived distros have
a /usr/bin/setup as a wrapper for all the text-mode configuration tools.
And there's a derivative of opensolaris that has a /usr/bin/setup for
configuring the system the first time.

> I still like 'egg' as a command too.  There are no collisions that I can see.
> I know this has been thrown around for years, and it's always been rejected
> because I think setuptools wanted to claim it, but since it still doesn't
> exist afaict, distutils2 could easily use it.
> 
There's a 2D graphics library that provides a /usr/bin/egg command:
  http://www.ir.isas.jaxa.jp/~cyamauch/eggx_procall/
Latest Stable Version 0.93r3 (released 2010/4/14)

In the larger universe of programs, it might make for more intuitive
remembering of the command to use a prefix (either py or python) though.

python-setup  is a lot like python setup.py
pysetup is shorter
pyegg is even shorter :-)

-Toshio


pgpVyH77xDEyw.pgp
Description: PGP signature
___
Python-Dev mailing list
Python-Dev@python.org
http://mail.python.org/mailman/listinfo/python-dev
Unsubscribe: 
http://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com


Re: [Python-Dev] Distutils2 scripts

2010-10-08 Thread Antoine Pitrou
On Fri, 8 Oct 2010 10:26:36 -0400
Barry Warsaw  wrote:
> >- query pypi
> >- browse what's installed
> >- install/remove projects
> >- create releases and upload them
> >
> >pkg_manager ?
> 
> No underscores, please. :)
> 
> Actually, a decent wrapper script could just be called 'setup'.  My
> command-not-found on Ubuntu doesn't find a collision, or even close
> similarities.

pysetup perhaps? I think "setup" is such a generic name that being a
Python-specific tool sounds wrong. I also had that reaction towards
easy_install at the beginning.

> I still like 'egg' as a command too.  There are no collisions that I can see.
> I know this has been thrown around for years, and it's always been rejected
> because I think setuptools wanted to claim it, but since it still doesn't
> exist afaict, distutils2 could easily use it.

'egg' is already the name of a file format, so re-using that name for
something more general would be confusing.
What would you think if 'tar' allowed you to resize JPEGs? :)


___
Python-Dev mailing list
Python-Dev@python.org
http://mail.python.org/mailman/listinfo/python-dev
Unsubscribe: 
http://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com


Re: [Python-Dev] Distutils2 scripts

2010-10-08 Thread Georg Brandl
Am 08.10.2010 16:26, schrieb Barry Warsaw:

>>- query pypi
>>- browse what's installed
>>- install/remove projects
>>- create releases and upload them
>>
>>pkg_manager ?
> 
> No underscores, please. :)
> 
> Actually, a decent wrapper script could just be called 'setup'.  My
> command-not-found on Ubuntu doesn't find a collision, or even close
> similarities.

No generic name, *please*.  easy_install was bad enough, no need to repeat
that mistake.  "egg" would be better, but weren't we phasing out the egg
format?

Georg


-- 
Thus spake the Lord: Thou shalt indent with four spaces. No more, no less.
Four shall be the number of spaces thou shalt indent, and the number of thy
indenting shall be four. Eight shalt thou not indent, nor either indent thou
two, excepting that thou then proceed to four. Tabs are right out.

___
Python-Dev mailing list
Python-Dev@python.org
http://mail.python.org/mailman/listinfo/python-dev
Unsubscribe: 
http://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com


Re: [Python-Dev] Distutils2 scripts

2010-10-08 Thread Barry Warsaw
On Oct 08, 2010, at 03:22 PM, Tarek Ziadé wrote:

>Yes that what I was thinking about -- I am not too worried about this,
>since every Linux  deals with the 'more than one python installed'
>case.

Kind of.   but anyway...

>> I'm in favor of add a top-level setup module that can be invoked using
>> "python -m setup ...".  There will be three cases:
>
>Nice idea ! I wouldn't call it setup though, since it does many other
>things. I can't think of a good name yet, but I'd like such a script
>to express the idea that it can be used to:

I like 'python -m setup' too.  It's a small step from the familiar thing
(python setup.py) to the new and shiny thing, without being confusing.  And
you won't have to worry about things like version numbers because the Python
executable will already have that baked in.

>- query pypi
>- browse what's installed
>- install/remove projects
>- create releases and upload them
>
>pkg_manager ?

No underscores, please. :)

Actually, a decent wrapper script could just be called 'setup'.  My
command-not-found on Ubuntu doesn't find a collision, or even close
similarities.

I still like 'egg' as a command too.  There are no collisions that I can see.
I know this has been thrown around for years, and it's always been rejected
because I think setuptools wanted to claim it, but since it still doesn't
exist afaict, distutils2 could easily use it.

In any case, these could be a simple shell script wrapping 'python -m setup'.
It could even take a --use-python-version option to select the pythonX.Y it
used, without having to encode the Python version number in the script name.

-Barry


signature.asc
Description: PGP signature
___
Python-Dev mailing list
Python-Dev@python.org
http://mail.python.org/mailman/listinfo/python-dev
Unsubscribe: 
http://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com


Re: [Python-Dev] Distutils2 scripts

2010-10-08 Thread Tarek Ziadé
2010/10/8 Michael Foord :
>  On 08/10/2010 14:28, Dirkjan Ochtman wrote:
>>
>> On Fri, Oct 8, 2010 at 15:22, Tarek Ziadé  wrote:
>>>
>>> Mmm.. setup.py is gone in D2, and setup.py will be the marker of d1.
>>
>> So, sorry for backing up to this, but isn't it true that many projects
>> do custom stuff in their setup.py that they wouldn't be able to do in
>> setup.cfg? Is the goal really to make that impossible/unnecessary?
>
> The goal is to make it unnecessary. My understanding is that it will still
> be possible to use a setup.py, just unnecessary for the vast majority of
> cases.

Yes. And to make it possible to keep a d1 setup.py, which works with
all installers out there, we decided that d2 would ignore that file,
and provide other ways to hook code if necessary.

IOW one project may provide a d1 setup.py and a d2 configuration in
the same release.

>
> All the best,
>
> Michael
>
>>  In
>> Mercurial, for example, we have a fairly large setup.py that helps us
>> deal with many kinds of issues: incomplete Python installations on
>> different platforms, adding packages depending on the platform, do
>> custom stuff to compile gettext files, etc...
>>
>> Cheers,
>>
>> Dirkjan
>> ___
>> Python-Dev mailing list
>> Python-Dev@python.org
>> http://mail.python.org/mailman/listinfo/python-dev
>> Unsubscribe:
>> http://mail.python.org/mailman/options/python-dev/fuzzyman%40voidspace.org.uk
>
>
> --
>
> http://www.voidspace.org.uk/
>
> READ CAREFULLY. By accepting and reading this email you agree,
> on behalf of your employer, to release me from all obligations
> and waivers arising from any and all NON-NEGOTIATED agreements,
> licenses, terms-of-service, shrinkwrap, clickwrap, browsewrap,
> confidentiality, non-disclosure, non-compete and acceptable use
> policies (”BOGUS AGREEMENTS”) that I have entered into with your
> employer, its partners, licensors, agents and assigns, in
> perpetuity, without prejudice to my ongoing rights and privileges.
> You further represent that you have the authority to release me
> from any BOGUS AGREEMENTS on behalf of your employer.
>
>



-- 
Tarek Ziadé | http://ziade.org
___
Python-Dev mailing list
Python-Dev@python.org
http://mail.python.org/mailman/listinfo/python-dev
Unsubscribe: 
http://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com


Re: [Python-Dev] Distutils2 scripts

2010-10-08 Thread Tarek Ziadé
On Fri, Oct 8, 2010 at 3:28 PM, Dirkjan Ochtman  wrote:
> On Fri, Oct 8, 2010 at 15:22, Tarek Ziadé  wrote:
>> Mmm.. setup.py is gone in D2, and setup.py will be the marker of d1.
>
> So, sorry for backing up to this, but isn't it true that many projects
> do custom stuff in their setup.py that they wouldn't be able to do in
> setup.cfg?

They will still be able to do it by using hooks.

> Is the goal really to make that impossible/unnecessary? In
> Mercurial, for example, we have a fairly large setup.py that helps us
> deal with many kinds of issues: incomplete Python installations on
> different platforms, adding packages depending on the platform, do
> custom stuff to compile gettext files, etc...

No the goal is to stop having setup.py as the standard for getting
metadata from a project.
There will always be ways to call some code in the various steps.

setup.py is currently called for everything : building, installing,
providing metadata etc.
We want to break that and make it possible for people to express their
metadata into a static file, and offer ways to express them
differently depending on the platforms. See PEP 345. So you should
have what you need.

Now, we are still in early stages in providing these features, and I'd
be happy to work on the Mercurial setup.py conversion, if it's a
complex use case. So we can see how things go.


Tarek



>
> Cheers,
>
> Dirkjan
>



-- 
Tarek Ziadé | http://ziade.org
___
Python-Dev mailing list
Python-Dev@python.org
http://mail.python.org/mailman/listinfo/python-dev
Unsubscribe: 
http://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com


Re: [Python-Dev] Distutils2 scripts

2010-10-08 Thread Michael Foord

 On 08/10/2010 14:28, Dirkjan Ochtman wrote:

On Fri, Oct 8, 2010 at 15:22, Tarek Ziadé  wrote:

Mmm.. setup.py is gone in D2, and setup.py will be the marker of d1.

So, sorry for backing up to this, but isn't it true that many projects
do custom stuff in their setup.py that they wouldn't be able to do in
setup.cfg? Is the goal really to make that impossible/unnecessary?
The goal is to make it unnecessary. My understanding is that it will 
still be possible to use a setup.py, just unnecessary for the vast 
majority of cases.


All the best,

Michael


  In
Mercurial, for example, we have a fairly large setup.py that helps us
deal with many kinds of issues: incomplete Python installations on
different platforms, adding packages depending on the platform, do
custom stuff to compile gettext files, etc...

Cheers,

Dirkjan
___
Python-Dev mailing list
Python-Dev@python.org
http://mail.python.org/mailman/listinfo/python-dev
Unsubscribe: 
http://mail.python.org/mailman/options/python-dev/fuzzyman%40voidspace.org.uk



--

http://www.voidspace.org.uk/

READ CAREFULLY. By accepting and reading this email you agree,
on behalf of your employer, to release me from all obligations
and waivers arising from any and all NON-NEGOTIATED agreements,
licenses, terms-of-service, shrinkwrap, clickwrap, browsewrap,
confidentiality, non-disclosure, non-compete and acceptable use
policies (”BOGUS AGREEMENTS”) that I have entered into with your
employer, its partners, licensors, agents and assigns, in
perpetuity, without prejudice to my ongoing rights and privileges.
You further represent that you have the authority to release me
from any BOGUS AGREEMENTS on behalf of your employer.

___
Python-Dev mailing list
Python-Dev@python.org
http://mail.python.org/mailman/listinfo/python-dev
Unsubscribe: 
http://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com


Re: [Python-Dev] Distutils2 scripts

2010-10-08 Thread Dirkjan Ochtman
On Fri, Oct 8, 2010 at 15:22, Tarek Ziadé  wrote:
> Mmm.. setup.py is gone in D2, and setup.py will be the marker of d1.

So, sorry for backing up to this, but isn't it true that many projects
do custom stuff in their setup.py that they wouldn't be able to do in
setup.cfg? Is the goal really to make that impossible/unnecessary? In
Mercurial, for example, we have a fairly large setup.py that helps us
deal with many kinds of issues: incomplete Python installations on
different platforms, adding packages depending on the platform, do
custom stuff to compile gettext files, etc...

Cheers,

Dirkjan
___
Python-Dev mailing list
Python-Dev@python.org
http://mail.python.org/mailman/listinfo/python-dev
Unsubscribe: 
http://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com


Re: [Python-Dev] Distutils2 scripts

2010-10-08 Thread Tarek Ziadé
2010/10/8 Fred Drake :
> On Fri, Oct 8, 2010 at 7:24 AM, Dirkjan Ochtman  wrote:
>> It doesn't seem very nice to have a version in the script. Can we just
>> call it distutils? Or py-dist?
>
> If we go this route, then
>
> - "make altinstall" should include the version number in the name of *any*
>  scripts it installs.
>
> - "make install" would then add links without the version numbers.
>
> This mirrors the name of the Python executable, so is likely as "right" as
> it's going to get (*if* we install separate scripts).

Yes that what I was thinking about -- I am not too worried about this,
since every Linux  deals with the 'more than one python installed'
case.

>
> Georg:
>> What happened to "python setup.py action"?  Or is this a step towards
>> not requiring setup.py at all?
>
> I'm in favor of add a top-level setup module that can be invoked using
> "python -m setup ...".  There will be three cases:

Nice idea ! I wouldn't call it setup though, since it does many other
things. I can't think of a good name yet, but I'd like such a script
to express the idea that it can be used to:

- query pypi
- browse what's installed
- install/remove projects
- create releases and upload them

pkg_manager ?

>
> - d2 projects without a setup.py, where this will invoke the module from
>  the standard library,

Yes !

>
> - d2 projects with a setup.py, where the local setup.py will be invoked,
>  and

Mmm.. setup.py is gone in D2, and setup.py will be the marker of d1.
Some project might want to provide both setups for backward
compatibility:

- a setup.py (d1)
- a setup,cfg (d2 and optionally some d1 options)

It's easy enough in that case to detect if the .cfg has what d2
requires (like the [metadata] section)

>
> - d1 projects, which always have a setup.py, which will be invoked.

Yes

>
> This would provide the most consistent story for package users, where the
> only command they'll need to remember (for Python versions with the setup
> module) will be
>
>    python -m setup ...

Nice !  And I'd like to extend this idea with what we said at the last
Summit. What if a project like Pip is able to replace d1 and or d2
when it comes to install a package. As long as we agree on the same
command line interface, we could provide a way for pip to be called by
this global script.

Tarek

-- 
Tarek Ziadé | http://ziade.org
___
Python-Dev mailing list
Python-Dev@python.org
http://mail.python.org/mailman/listinfo/python-dev
Unsubscribe: 
http://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com


Re: [Python-Dev] Distutils2 scripts

2010-10-08 Thread Tarek Ziadé
On Fri, Oct 8, 2010 at 12:24 PM, Georg Brandl  wrote:
> Am 08.10.2010 09:05, schrieb Tarek Ziadé:
>> Hello,
>>
>> In the Distutils2 project, we'll have quite a few scripts that can be
>> called via -m
>>
>> $ python -m distutils2.depgraph : shows a dependency graph
>> $ python -m distutils2.install : installs a project
>> $ python -m distutils2.run command : runs a distutils2 command
>>
>> etc..
>
> What happened to "python setup.py action"?  Or is this a step towards
> not requiring setup.py at all?

Yes, setup.py is gone and everything is driven by scripts, that read
setup.cfg. There are some configurable hooks to call code when wanted
bu the idea is that those are restricted to the build part of the
process, so a release made at PyPI provides static metadata.

Tarek
-- 
Tarek Ziadé | http://ziade.org
___
Python-Dev mailing list
Python-Dev@python.org
http://mail.python.org/mailman/listinfo/python-dev
Unsubscribe: 
http://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com


Re: [Python-Dev] Distutils2 scripts

2010-10-08 Thread Georg Brandl
Am 08.10.2010 14:02, schrieb Fred Drake:

> Georg:
>> What happened to "python setup.py action"?  Or is this a step towards
>> not requiring setup.py at all?
> 
> I'm in favor of add a top-level setup module that can be invoked using
> "python -m setup ...".  There will be three cases:
> 
> - d2 projects without a setup.py, where this will invoke the module from
>   the standard library,
> 
> - d2 projects with a setup.py, where the local setup.py will be invoked,
>   and
> 
> - d1 projects, which always have a setup.py, which will be invoked.
> 
> This would provide the most consistent story for package users, where the
> only command they'll need to remember (for Python versions with the setup
> module) will be
> 
> python -m setup ...

That's actually a very nice trick, *probably* together for a "shortcut" for
"python -m setup".

Georg

-- 
Thus spake the Lord: Thou shalt indent with four spaces. No more, no less.
Four shall be the number of spaces thou shalt indent, and the number of thy
indenting shall be four. Eight shalt thou not indent, nor either indent thou
two, excepting that thou then proceed to four. Tabs are right out.

___
Python-Dev mailing list
Python-Dev@python.org
http://mail.python.org/mailman/listinfo/python-dev
Unsubscribe: 
http://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com


Re: [Python-Dev] Distutils2 scripts

2010-10-08 Thread Dirkjan Ochtman
2010/10/8 Fred Drake :
> Georg:
>> What happened to "python setup.py action"?  Or is this a step towards
>> not requiring setup.py at all?
>
> I'm in favor of add a top-level setup module that can be invoked using
> "python -m setup ...".  There will be three cases:
>
> - d2 projects without a setup.py, where this will invoke the module from
>  the standard library,
>
> - d2 projects with a setup.py, where the local setup.py will be invoked,
>  and
>
> - d1 projects, which always have a setup.py, which will be invoked.
>
> This would provide the most consistent story for package users, where the
> only command they'll need to remember (for Python versions with the setup
> module) will be
>
>    python -m setup ...

That seems like a fairly elegant solution.

Cheers,

Dirkjan
___
Python-Dev mailing list
Python-Dev@python.org
http://mail.python.org/mailman/listinfo/python-dev
Unsubscribe: 
http://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com


Re: [Python-Dev] Distutils2 scripts

2010-10-08 Thread Fred Drake
On Fri, Oct 8, 2010 at 7:24 AM, Dirkjan Ochtman  wrote:
> It doesn't seem very nice to have a version in the script. Can we just
> call it distutils? Or py-dist?

If we go this route, then

- "make altinstall" should include the version number in the name of *any*
  scripts it installs.

- "make install" would then add links without the version numbers.

This mirrors the name of the Python executable, so is likely as "right" as
it's going to get (*if* we install separate scripts).

Georg:
> What happened to "python setup.py action"?  Or is this a step towards
> not requiring setup.py at all?

I'm in favor of add a top-level setup module that can be invoked using
"python -m setup ...".  There will be three cases:

- d2 projects without a setup.py, where this will invoke the module from
  the standard library,

- d2 projects with a setup.py, where the local setup.py will be invoked,
  and

- d1 projects, which always have a setup.py, which will be invoked.

This would provide the most consistent story for package users, where the
only command they'll need to remember (for Python versions with the setup
module) will be

python -m setup ...


  -Fred

--
Fred L. Drake, Jr.    
"A storm broke loose in my mind."  --Albert Einstein
___
Python-Dev mailing list
Python-Dev@python.org
http://mail.python.org/mailman/listinfo/python-dev
Unsubscribe: 
http://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com


Re: [Python-Dev] Distutils2 scripts

2010-10-08 Thread Jon Ribbens
On Fri, Oct 08, 2010 at 01:24:09PM +0200, Dirkjan Ochtman wrote:
> On Fri, Oct 8, 2010 at 09:05, Tarek Ziadé  wrote:
> > The feedback I received for this is pretty clear: people want a single
> > script that can be called directly. e.g.
> >
> > $ distutils2 depgraph
> > $ distutils2 install
> > $ distutils2 run command
> >
> > Fair enough, I can add that script in the project and get it installed
> > when people install the project.
> 
> It doesn't seem very nice to have a version in the script. Can we just
> call it distutils? Or py-dist?

pypackage?
___
Python-Dev mailing list
Python-Dev@python.org
http://mail.python.org/mailman/listinfo/python-dev
Unsubscribe: 
http://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com


Re: [Python-Dev] Distutils2 scripts

2010-10-08 Thread Dirkjan Ochtman
On Fri, Oct 8, 2010 at 09:05, Tarek Ziadé  wrote:
> The feedback I received for this is pretty clear: people want a single
> script that can be called directly. e.g.
>
> $ distutils2 depgraph
> $ distutils2 install
> $ distutils2 run command
>
> Fair enough, I can add that script in the project and get it installed
> when people install the project.

It doesn't seem very nice to have a version in the script. Can we just
call it distutils? Or py-dist?

paint-it-some-other-color-ly yours,

Dirkjan
___
Python-Dev mailing list
Python-Dev@python.org
http://mail.python.org/mailman/listinfo/python-dev
Unsubscribe: 
http://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com


Re: [Python-Dev] Distutils2 scripts

2010-10-08 Thread Nick Coghlan
On Fri, Oct 8, 2010 at 5:22 PM, Jeroen Ruigrok van der Werven
 wrote:
> +1 from me. I sincerely dislike the Perl-esque -m stuff.

-m is generally for developer utilities, or "incidental" utilities
provided by modules that are mainly intended for use as library
modules. It's also very handy for running stuff out of an uninstalled
Python (such as an svn checkout).

For actual end-user facing scripts, a proper script on the system path
is a better option.

Cheers,
Nick.

-- 
Nick Coghlan   |   ncogh...@gmail.com   |   Brisbane, Australia
___
Python-Dev mailing list
Python-Dev@python.org
http://mail.python.org/mailman/listinfo/python-dev
Unsubscribe: 
http://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com


Re: [Python-Dev] Distutils2 scripts

2010-10-08 Thread Georg Brandl
Am 08.10.2010 09:05, schrieb Tarek Ziadé:
> Hello,
> 
> In the Distutils2 project, we'll have quite a few scripts that can be
> called via -m
> 
> $ python -m distutils2.depgraph : shows a dependency graph
> $ python -m distutils2.install : installs a project
> $ python -m distutils2.run command : runs a distutils2 command
> 
> etc..

What happened to "python setup.py action"?  Or is this a step towards
not requiring setup.py at all?

> The feedback I received for this is pretty clear: people want a single
> script that can be called directly. e.g.
> 
> $ distutils2 depgraph
> $ distutils2 install
> $ distutils2 run command
> 
> Fair enough, I can add that script in the project and get it installed
> when people install the project.
> 
> I just wanted to make sure that once distutils2 is back in the stdlib,
> it's OK for us to add that script in the distribution.
> I remember that people did not want "yet another script" in there, so
> I just wanted to double-check before I take this path

This is certainly preferable to memorizing the modules you can call with
-m, because it's easier to provide help functions.

Georg

-- 
Thus spake the Lord: Thou shalt indent with four spaces. No more, no less.
Four shall be the number of spaces thou shalt indent, and the number of thy
indenting shall be four. Eight shalt thou not indent, nor either indent thou
two, excepting that thou then proceed to four. Tabs are right out.

___
Python-Dev mailing list
Python-Dev@python.org
http://mail.python.org/mailman/listinfo/python-dev
Unsubscribe: 
http://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com


Re: [Python-Dev] Distutils2 scripts

2010-10-08 Thread Tarek Ziadé
On Fri, Oct 8, 2010 at 9:50 AM, Tarek Ziadé  wrote:
...
> e.g. a -MINOR.MINOR

MAJOR.MINOR
___
Python-Dev mailing list
Python-Dev@python.org
http://mail.python.org/mailman/listinfo/python-dev
Unsubscribe: 
http://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com


Re: [Python-Dev] Distutils2 scripts

2010-10-08 Thread Tarek Ziadé
On Fri, Oct 8, 2010 at 9:25 AM, Jeroen Ruigrok van der Werven
 wrote:
> -On [20101008 09:07], Tarek Ziadé (ziade.ta...@gmail.com) wrote:
>>I just wanted to make sure that once distutils2 is back in the stdlib,
>>it's OK for us to add that script in the distribution.
>
> Ah, one thing that came to mind:
>
> is this script supposed to be installed in /usr{/local}/bin? If so, how
> would it look like for multiple Python distributions that are installed?

This script will be installed besides the Python executable, so it
should follow the same naming rules depending on the OSes.
e.g. a -MINOR.MINOR suffix is appended *or* each python version has
its own bin/ location etc.

-- 
Tarek Ziadé | http://ziade.org
___
Python-Dev mailing list
Python-Dev@python.org
http://mail.python.org/mailman/listinfo/python-dev
Unsubscribe: 
http://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com


Re: [Python-Dev] Distutils2 scripts

2010-10-08 Thread Jeroen Ruigrok van der Werven
-On [20101008 09:07], Tarek Ziadé (ziade.ta...@gmail.com) wrote:
>I just wanted to make sure that once distutils2 is back in the stdlib,
>it's OK for us to add that script in the distribution.

Ah, one thing that came to mind:

is this script supposed to be installed in /usr{/local}/bin? If so, how
would it look like for multiple Python distributions that are installed?

-- 
Jeroen Ruigrok van der Werven  / asmodai
イェルーン ラウフロック ヴァン デル ウェルヴェン
http://www.in-nomine.org/ | http://www.rangaku.org/ | GPG: 2EAC625B
To the dull mind nature is leaden. To the illumined mind the whole world
burns and sparkles with light...
___
Python-Dev mailing list
Python-Dev@python.org
http://mail.python.org/mailman/listinfo/python-dev
Unsubscribe: 
http://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com


Re: [Python-Dev] Distutils2 scripts

2010-10-08 Thread Jeroen Ruigrok van der Werven
-On [20101008 09:07], Tarek Ziadé (ziade.ta...@gmail.com) wrote:
>The feedback I received for this is pretty clear: people want a single
>script that can be called directly. e.g.
>
>$ distutils2 depgraph
>$ distutils2 install
>$ distutils2 run command

+1 from me. I sincerely dislike the Perl-esque -m stuff.

>I just wanted to make sure that once distutils2 is back in the stdlib,
>it's OK for us to add that script in the distribution.

No problem from my side, I do, however, not speak for the developers at
large of course. ;)

-- 
Jeroen Ruigrok van der Werven  / asmodai
イェルーン ラウフロック ヴァン デル ウェルヴェン
http://www.in-nomine.org/ | http://www.rangaku.org/ | GPG: 2EAC625B
Care-charmer Sleep, son of the sable Night, Brother to Death, in silent
darkness born...
___
Python-Dev mailing list
Python-Dev@python.org
http://mail.python.org/mailman/listinfo/python-dev
Unsubscribe: 
http://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com