Distutils-SIG - Comments and ideas on current PEP drafts

2009-11-16 Thread Wolodja Wentland
Dear Debian Python maintainers,

the distutils SIG is currently working on a number of PEPs that will
determine how Python distributions will be packaged in the future. One
goal of the PEPs is to make the life of linux distribution package
maintainers a little easier. :-)

Have a look at [1] where you can find an overview of the PEP drafts that
are related to Python packaging and some proposals that are currently
under consideration. The page is pretty new and incomplete, but you are
welcome to add whatever proposal/idea you have.

Most of the  proposals right now are related to the way data files will
be installed and handled once the PEPs are accepted and implemented.

It would be great if you could:

* Review the PEPs and proposals and provide comments

* Describe use cases or ideas that you would like to see implemented in
  distutils/Distribute

  Especially problems you have in your daily work with
  distutils/distribute/setuptools packaged distributions are of
  interest and now is the time to voice a proposal on how to handle this
  in the future.

Essentially: What has to change to make your packaging experience an
even better one?

[1] http://wiki.python.org/moin/Distutils/DiscussionOverview
-- 
  .''`. Wolodja Wentland 
 : :'  :
 `. `'` 4096R/CAF14EFC 
   `-   081C B7CD FF04 2BA9 94EA  36B2 8B7F 7D30 CAF1 4EFC


signature.asc
Description: Digital signature


Request to join PMPT and add python-lzma

2009-11-16 Thread Richard Darst
Hello,

I'd like to join the DPMT.  My alioth username is mrbeige-guest.

This is in response to #556451, an ITP I just filed for python-lzma
(https://launchpad.net/pyliblzma).  Thanks to the help of Kumar
Appaiah, Clint Adams, and others in #debian-nyc, I have a package
ready here:
  http://rkd.zgib.net/debian/

They've gone over it fairly thoroughly, but please let me know any
other comments on the package.  I'd like to add this to group
maintenance, with maintainer set to DPMT (but I will still take
responsibility for keeping it up to date).

I know, at the least, that the copyright file needs the special form
added.

Thank you,

- Richard

-- 
| Richard Darst  -  rkd@  -  boltzmann: up 118 days, 11:22
|http://rkd.zgib.net  -  pgp 0xBD356740
| "Ye shall know the truth and -- the truth shall make you free"


signature.asc
Description: Digital signature


Re: Python 2.6 in unstable [symeig: resolved]

2009-11-16 Thread Yaroslav Halchenko

On Sat, 14 Nov 2009, Jakub Wilk wrote:
> 3) These packages failed likely because one of build-deps didn't
> support python2.6:
> ... symeig

symeig functionality was absorbed into scipy.

Thanks to the kind reminder/pointer made by upstream (Tiziano Zito) I've
just uploaded -2 revision of symeig which has nothing in binary packages
besides NEWS and description adjustments to point to this fact, so
anyone using it (do not see explicit Depends/Recommends within Debian
packages, mdp was adjusted long ago).

So you can consider 'symeig' python-2.6 issue resolved ;)

Thanks!
-- 
  .-.
=--   /v\  =
Keep in touch// \\ (yoh@|www.)onerussian.com
Yaroslav Halchenko  /(   )\   ICQ#: 60653192
   Linux User^^-^^[17]



-- 
To UNSUBSCRIBE, email to debian-python-requ...@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org



importer des modules au démarrage d'IDLE

2009-11-16 Thread Frederic Baldit
Bonjour,
je travaille sous lenny et gnome avec python 2.5.2 et IDLE, que
j'utilise pour une introduction à l'algorithmique au lycée (en maths).
Voilà mon problème:

1) J'ai créé un fichier .pythonrc.py file contenant les deux lignes

from __future__ import division
from math import *

2) Dans mon .bashrc j'ai rajouté

PYTHONSTARTUP = "/home/fred/.pythonrc.py"
export PYTHONSTARTUP

3) Quand je lance python de façon interactive dans une console tout va
bien:

>>> 1/3
0.1
>>> sqrt(5)
2.2360679774997898

4) J'ai écrit un petit script test.py qui contient

print sqrt(2)
print 1/3

Quand j'édite/teste ce script avec IDLE en lancant IDLE en ligne de
commande par

idle-python2.5 -n -s test.py

et que j'exécute avec F5 je n'ai pas d'erreur mais la division n'est pas
flottante:

IDLE 1.2.2   No Subprocess 
>>> 
>>> 
1.41421356237
0


5) Plus embêtant, si je lance IDLE par la souris en utilisant le menu
gnome Applications-->Programmation-->IDLE, puis que j'ouvre mon fichier
test.py et que je l'exécute (F5) j'ai une erreur avec sqrt(2) qui n'est
pas connu (NameError: name 'sqrt'is not defined). Pourtant j'ai vérifié
(Système-->Préférences-->Menu Principal) que l'application est lancée
par la commande /usr/bin/idle-python2.5 -n -s qui devrait donc exécuter
mon fichier de démarrage.

Quelqu'un peut-il m'aider?? Je sais que je pourrais (pour la division)
faire 1./3, ou passer à la version 3. Mais de toute façon je veux aussi
une solution permettant d'avoir par défaut accès aux fonctions
mathématiques usuelles, sans que les élèves aient à écrire la ligne from
math import * en tête de leur script.

Merci d'avance pour toute aide.
Cordialement,
Frédéric.


--
To UNSUBSCRIBE, email to debian-python-requ...@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org



Re: importer des modules au démarrage d'IDLE

2009-11-16 Thread Kumar Appaiah
Hi! This is an English list, so please frame your queries in
English. But since I could translate your query, I'll try to answer
below, please translate if needed.

On Mon, Nov 16, 2009 at 05:43:09PM +0100, Frederic Baldit wrote:
> je travaille sous lenny et gnome avec python 2.5.2 et IDLE, que
> j'utilise pour une introduction à l'algorithmique au lycée (en maths).
> Voilà mon problème:
> 
> 1) J'ai créé un fichier .pythonrc.py file contenant les deux lignes
> 
> from __future__ import division
> from math import *
> 
> 2) Dans mon .bashrc j'ai rajouté
> 
> PYTHONSTARTUP = "/home/fred/.pythonrc.py"
> export PYTHONSTARTUP
> 
> 3) Quand je lance python de façon interactive dans une console tout va
> bien:
> 
> >>> 1/3
> 0.1
> >>> sqrt(5)
> 2.2360679774997898
> 
> 4) J'ai écrit un petit script test.py qui contient
> 
> print sqrt(2)
> print 1/3
> 
> Quand j'édite/teste ce script avec IDLE en lancant IDLE en ligne de
> commande par

Sadly, python --help says this:

PYTHONSTARTUP: file executed on interactive startup (no default)

So, this implies that the file is executed ONLY if Python is started
interactively as:

python

rather than Python 

> idle-python2.5 -n -s test.py
> 
> et que j'exécute avec F5 je n'ai pas d'erreur mais la division n'est pas
> flottante:
> 
> IDLE 1.2.2   No Subprocess 
> >>> 
> >>> 
> 1.41421356237
> 0

I would guess the same thing would happen even in this case. The
reason why this is NOT possible in Python is because if you effect
such changes, the moment the script is run on another machine, it'll
break. So, other than a hackish solution which someone could suggest,
I can't think of a way to achieve this effect (elegantly).

> 5) Plus embêtant, si je lance IDLE par la souris en utilisant le menu
> gnome Applications-->Programmation-->IDLE, puis que j'ouvre mon fichier
> test.py et que je l'exécute (F5) j'ai une erreur avec sqrt(2) qui n'est
> pas connu (NameError: name 'sqrt'is not defined). Pourtant j'ai vérifié
> (Système-->Préférences-->Menu Principal) que l'application est lancée
> par la commande /usr/bin/idle-python2.5 -n -s qui devrait donc exécuter
> mon fichier de démarrage.
> 
> Quelqu'un peut-il m'aider?? Je sais que je pourrais (pour la division)
> faire 1./3, ou passer à la version 3. Mais de toute façon je veux aussi
> une solution permettant d'avoir par défaut accès aux fonctions
> mathématiques usuelles, sans que les élèves aient à écrire la ligne from
> math import * en tête de leur script.

Someone else might have better suggestions, but when I asked a Python
expert, I was told NOT to do this; the students should write the
import lines at the top; consider it something akin to including
headers in C programs! (Yes, I know I am not giving useful
suggestions, but just trying to explain why this "feature" isn't
really present in Python.).

Sorry for not being much help.

Kumar


-- 
To UNSUBSCRIBE, email to debian-python-requ...@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org



Re: importing modules at IDLE strartup

2009-11-16 Thread Frederic Baldit
Hi,
first of all sorry for writing my first post in french. Hereafter is the
english version of my text:

I'm using python (version 2.5.2, under debian lenny for personnal use on
my notebook, and  version 2.6 under Windows XP with my students) for
teaching an introduction to algorithmic at High School (in France). I'm
also using IDLE as IDE.
Here is my problem (I try to solve it under linux fisrt):

1) I wrote a .pythonrc.py file with the two lines

from __future__ import division
from math import *

2) in my .bashrc file I wrote

PYTHONSTARTUP = "/home/fred/.pythonrc.py"
export PYTHONSTARTUP

3) when invoking python interactively in a terminal, it works fine:

>>> 1/3
0.1
>>> sqrt(5)
2.2360679774997898

4) I wrote a small script file test.py which contains

print sqrt(2)
print 1/3

Editing/testing this file with IDLE with the following command line:

idle-python2.5 -n -s test.py

and executing it with F5 gives the lines

IDLE 1.2.2   No Subprocess 
>>> 
>>> 
1.41421356237
0

So I have here a first problem with 1/3 division that should give a
float result (according to the startup file import from __future__).

5) More annoying yet, when launching IDLE through the menu (under
gnome), even the sqrt(2) command is not accepted (NameError: name 'sqrt'
is not defined). I have checked that IDLE is launched with the
command /usr/bin/idle-python2.5 -n -s

Does anyone know how to solve this ? (of course I know that I could
write 1.0/3, or also I could migrate to python 3).  I simply want to
"simplify" the python syntax for my students, so that "/" operator is
always for them the usual (float) division, and usual math functions are
available, this WITHOUT having to write any import at the top of their
script. I also know that such scripts could easily be broken when
changing the environment. This is not indeed a problem for me, since I'm
not here teaching how to produce good programs.

Thank's in advance for any valuable help.
Frederic.




-- 
To UNSUBSCRIBE, email to debian-python-requ...@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org



Re: python-central NMU (python2.6 related)

2009-11-16 Thread Matthias Klose
Fyi, I replaced your NMU with my merge from Ubuntu, which already had these 
changes. I may have missed the "indentation problems", please file separate bug 
reports for these.


  Matthias

On 03.11.2009 16:07, Piotr Ożarowski wrote:

Hi Matthias,

You uploaded new python-central package that fixed one indentation error
in pycentral.py (which is ok, this bug had Severity=important in BTS).
Since my NMU of python-central was still waiting in DELAYED (queue was
disabled by ftpmasters) at that time, it didn't make it into unstable.
Please let me know if it was just a coincidence and I can upload my
changes again (I assume that if you would want to reject it, you'd add a
comment over a month ago when I sent you my patch or you'd upload a new
version before Thursday, when my 0.6.11+nmu1 was supposed to be uploaded
to unstable). If it's ok with you, I'll upload my changes again this
Thursday.

Please note that when python-central will be fixed, we will be almost
ready for your upload of python2.6 to unstable - the only remaining
changes will be python-central based packages that do not define
XB-Python-Version - let me know if you want me to change python-central
to detect such packages and fix it in pycentral instead - I'll send you
a patch.



--
To UNSUBSCRIBE, email to debian-python-requ...@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org



Re: importer des modules au démarrage d'IDLE

2009-11-16 Thread Mark Voorhies
On Monday 16 November 2009 9:15 am Kumar Appaiah wrote:

> > idle-python2.5 -n -s test.py
> > 
> > et que j'exécute avec F5 je n'ai pas d'erreur mais la division n'est pas
> > flottante:
> > 
> > IDLE 1.2.2   No Subprocess 
> > >>> 
> > >>> 
> > 1.41421356237
> > 0
> 
> I would guess the same thing would happen even in this case. The
> reason why this is NOT possible in Python is because if you effect
> such changes, the moment the script is run on another machine, it'll
> break. So, other than a hackish solution which someone could suggest,
> I can't think of a way to achieve this effect (elegantly).

One such hackish solution is to use a modified version 
of /usr/bin/idle-python2.5 that invokes the python interpreter with "new" 
division, e.g.:

#!/usr/bin/python2.5 -Qnew

from idlelib.PyShell import main
if __name__ == '__main__':
main()
-
idlelib.PyShell.main will parse command line arguments, so invoking with -s 
will still see your PYTHONSTARTUP script.

To have PYTHONSTARTUP set correctly in Gnome on Lenny, I think you need to 
edit ~/.xsession rather than ~/.bashrc, c.f.:
http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=242507
(I don't have a desktop copy of Lenny, so I can't verify directly).

I do agree with Kumar that it might be best to teach students to do set up the 
environment themselves at the top of their scripts.

--Mark


--
To UNSUBSCRIBE, email to debian-python-requ...@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org



Re: python-central NMU (python2.6 related)

2009-11-16 Thread Piotr Ożarowski
[Matthias Klose, 2009-11-16]
> Fyi, I replaced your NMU with my merge from Ubuntu, which already had
> these changes. I may have missed the "indentation problems", please
> file separate bug reports for these.

srctop related lines were broken in Ubuntu, if you used Luca's merge
then it's fine, though (he even ported my changes in -dbg hack)

Did you upload new version somewhere?
-- 
Piotr Ożarowski Debian GNU/Linux Developer
www.ozarowski.pl  www.griffith.cc   www.debian.org
GPG Fingerprint: 1D2F A898 58DA AF62 1786 2DF7 AEF6 F1A2 A745 7645


signature.asc
Description: Digital signature


mercurial: python-docutils builddep should? be (>= 0.5)

2009-11-16 Thread Max Bowsher
Mercurial 1.4 adds a builddep on python-docutils, which has been added
in PAPT svn. Owing to the use of --strip-elements-with-class, this
actually requires >= 0.5.

Given that 0.5 is already present in all but oldstable, I'm not sure
whether the builddep _should_ be changed, but I would imagine
backporters would thank you if you did give it an accurate version.

Max.



signature.asc
Description: OpenPGP digital signature


importing modules at IDLE startup

2009-11-16 Thread Frederic Baldit
Le lundi 16 novembre 2009 à 13:15 -0800, Mark Voorhies a écrit :

> One such hackish solution is to use a modified version 
> of /usr/bin/idle-python2.5 that invokes the python interpreter with "new" 
> division, e.g.:
> 
> #!/usr/bin/python2.5 -Qnew
> 
> from idlelib.PyShell import main
> if __name__ == '__main__':
> main()
> --
> idlelib.PyShell.main will parse command line arguments, so invoking with -s 
> will still see your PYTHONSTARTUP script.
OK, now I have the "new" division active, both when starting idle
through  the command line and with gnome menu! Unfortunately, when
starting idle with gnome menu, I cannot use sqrt(2) (but it works when
runing idle in a command line with -s option). I hardly believe that
PYTHONSTARTUP is not set up, because according to env PYTHONSTARTUP is
set to /home/fred/.pythonrc.py. I tried to create an .xsession file in
my home (after reading the link you gave), but had to remove it because
X could not start.

I really don't understand this difference between running idle-python2.5
through command line (which works) and through gnome menu. Fixing this
would definitively solve my problem... I still try to fix this point.
 
Thank you very much for your help. I fully understand that it is best to
teach students setting up the environment at the beginning of their
script, but here my goal is really not to teach programming, only the
first steps in a introductory (and very basic) course on algorithmic.

  Frédéric.


--
To UNSUBSCRIBE, email to debian-python-requ...@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org



PING: mercurial: Fixing quilt dependency

2009-11-16 Thread Max Bowsher
[I posted this a few months ago, but no one responded. Reposting.]

Hi Vincent (and others),

Regarding your change to the mercurial packaging:

+mercurial (1.3.1-2) UNRELEASED; urgency=low
+
+  * adjust quilt dependency so that it works with backports
+(ie quilt >> 0.46-6 instead of quilt >= 0.46-7)
+
+ -- Vincent Danjean   Tue, 18 Aug 2009 12:44:51 +0200
+


It is better to use quilt (>= 0.46-7~) for this sort of thing - quilt
(>> 0.46-6) is too loose.

Using the ~-suffixed form will allow backports, whilst avoiding being
satisfied by versions looking like 0.46-6rebuild1, which would be wrong.
It more clearly communicates the actual important version too.


Max.





signature.asc
Description: OpenPGP digital signature


Re: python-central NMU (python2.6 related)

2009-11-16 Thread Piotr Ożarowski
[Matthias Klose, 2009-11-16]
> Fyi, I replaced your NMU with my merge from Ubuntu, which already had
> these changes. I may have missed the "indentation problems", please
> file separate bug reports for these.

Indentation problems and typos were so obvious that I know now that you
didn't even read my debdiff. The most important change (srctop related)
is gone as well.

/me wasted lots of time testing these few lines :-(
-- 
Piotr Ożarowski Debian GNU/Linux Developer
www.ozarowski.pl  www.griffith.cc   www.debian.org
GPG Fingerprint: 1D2F A898 58DA AF62 1786 2DF7 AEF6 F1A2 A745 7645


signature.asc
Description: Digital signature


Re: importing modules at IDLE startup

2009-11-16 Thread Mark Voorhies
On Monday 16 November 2009 2:27 pm Frederic Baldit wrote:
> Le lundi 16 novembre 2009 à 13:15 -0800, Mark Voorhies a écrit :
> 
> > One such hackish solution is to use a modified version 
> > of /usr/bin/idle-python2.5 that invokes the python interpreter with "new" 
> > division, e.g.:
> > 
> > #!/usr/bin/python2.5 -Qnew
> > 
> > from idlelib.PyShell import main
> > if __name__ == '__main__':
> > main()
> > --
> > idlelib.PyShell.main will parse command line arguments, so invoking 
with -s 
> > will still see your PYTHONSTARTUP script.
> OK, now I have the "new" division active, both when starting idle
> through  the command line and with gnome menu! Unfortunately, when
> starting idle with gnome menu, I cannot use sqrt(2) (but it works when
> runing idle in a command line with -s option). I hardly believe that
> PYTHONSTARTUP is not set up, because according to env PYTHONSTARTUP is
> set to /home/fred/.pythonrc.py. 

A good way to test the environment that python/idle is seeing is:
import os
os.environ["PYTHONSTARTUP"]

> I tried to create an .xsession file in 
> my home (after reading the link you gave), but had to remove it because
> X could not start.
> 
> I really don't understand this difference between running idle-python2.5
> through command line (which works) and through gnome menu. 

When you start a bash terminal session (e.g., via gnome-terminal) ~/.bashrc is 
sourced and the resulting environment is passed to any programs started from 
that terminal session.  I believe that the environment seen by programs 
launched from the gnome menu is set up through some combination of your login 
manager (e.g., gdm) and Xsession, in a fairly distro dependent way.  In my 
hands, this means that I can see my ~/.bashrc environment from python or idle 
launched from a bash shell, but not from the gnome menu.

> Fixing this 
> would definitively solve my problem... I still try to fix this point.

If you don't want to muck around with Xsession config files, and you're 
hacking the idle-python2.5 script anyway, you can modify the environment from 
within the script:


#! /usr/bin/python2.5 -Qnew
import os
os.environ["PYTHONSTARTUP"] = "/home/fred/.pythonrc.py"
from idlelib.PyShell import main
if __name__ == '__main__':
main()
-

--Mark

>  
> Thank you very much for your help. I fully understand that it is best to
> teach students setting up the environment at the beginning of their
> script, but here my goal is really not to teach programming, only the
> first steps in a introductory (and very basic) course on algorithmic.
> 
>   Frédéric.
> 



--
To UNSUBSCRIBE, email to debian-python-requ...@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org