Re: Request for Review - Nuitka the Python compiler (status update, more questions)

2011-11-16 Thread Kay Hayen



Hello,


I created an ITP for Nuitka here:

http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=648489


Should I add some link to the debian packages there?


1. The "dch" is not picking up my email address, unlike "reportbug",
kind of annoying.


Solved.


2. I would like to remove the "inline_copy" directory with a patched
scons from the package, as it's not necessary with Debian when having
the dependency.


Solved.


3. My documentation is ".rst", so I guess, i should build-depend on
docutils, and so something, but what? Maybe that's really a distutils
question, but I wonder where to put the resulting pdf.


Solved. In /usr/share/doc/nuitka/README.pdf now.


I will add a copyright file later.


Solved.


6. The changelog talks of "unstable". Is that OK if I am building
against "testing" ?


Still not clear. I didn't setup a pbuilder yet (the command failed with 
some broken dependencies I last tried). My only build time dependency is 
really python at this time. It makes no sense, because I assume, I am 
somehow to provide a source deb to a sponsor anyway, right?


I also renamed the "act alike python" binary "/usr/bin/Python" to 
"/usr/bin/nuitka-python" as a result of the review.


So that is it, I don't know anymore of things to do. What about a 
manpage, is it considered mandatory?


What should be my next step? :-)

Yours,
Kay


--
To UNSUBSCRIBE, email to debian-python-requ...@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org
Archive: http://lists.debian.org/4ec378d5.6050...@gmx.de



ImportError: No module named multiarray

2011-11-16 Thread Mathieu Malaterre
[CC me please]

Hi all,

  I am trying to package a tiny python module:

http://mentors.debian.net/debian/pool/main/t/tifffile/tifffile_2012-1.dsc

  I thought I did it right, but I cannot load the python module
properly when installed, it fails with:

$ python /usr/share/pyshared/tifffile.py
Traceback (most recent call last):
  File "/usr/share/pyshared/tifffile.py", line 117, in 
import numpy
  File "/usr/share/pyshared/numpy/__init__.py", line 132, in 
import add_newdocs
  File "/usr/share/pyshared/numpy/add_newdocs.py", line 9, in 
from lib import add_newdoc
  File "/usr/share/pyshared/numpy/lib/__init__.py", line 4, in 
from type_check import *
  File "/usr/share/pyshared/numpy/lib/type_check.py", line 8, in 
import numpy.core.numeric as _nx
  File "/usr/share/pyshared/numpy/core/__init__.py", line 5, in 
import multiarray
ImportError: No module named multiarray


  However doing the following works nicely:

$ cd /tmp
$ cp /usr/share/pyshared/tifffile.py .
$ python tifffile.py --version
tifffile.py 2011.11.12

Thanks for suggestion,
-- 
Mathieu


-- 
To UNSUBSCRIBE, email to debian-python-requ...@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org
Archive: 
http://lists.debian.org/ca+7wusy4azc5lsgqpbcypr7sb3w8nur8tep4m+1nwvdrs36...@mail.gmail.com



Re: Request for Review - Nuitka the Python compiler (status update, more questions)

2011-11-16 Thread Nicolas Chauvat
Hello,

On Wed, Nov 16, 2011 at 09:48:21AM +0100, Kay Hayen wrote:
> I also renamed the "act alike python" binary "/usr/bin/Python" to
> "/usr/bin/nuitka-python" as a result of the review.

Nice.

> So that is it, I don't know anymore of things to do. What about a
> manpage, is it considered mandatory?

It is always better to have one. Do you know about rst2man that can
generate a man page from restructuredtext ?

-- 
Nicolas Chauvat

logilab.fr - services en informatique scientifique et gestion de connaissances  


-- 
To UNSUBSCRIBE, email to debian-python-requ...@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org
Archive: http://lists.debian.org/2016094141.ga10...@volans.logilab.fr



Re: ImportError: No module named multiarray

2011-11-16 Thread Zbigniew Jędrzejewski-Szmek

On 11/16/2011 10:03 AM, Mathieu Malaterre wrote:

[CC me please]

Hi all,

   I am trying to package a tiny python module:

http://mentors.debian.net/debian/pool/main/t/tifffile/tifffile_2012-1.dsc

   I thought I did it right, but I cannot load the python module
properly when installed, it fails with:


Hi Mathieu,
the problem is that numpy import fails. Numpy has both pure-python and 
compiled (e.g. multiarray.so) parts. When running a script, Python adds 
the directory containing the script to sys.path. Numpy is supposed to be 
imported from /usr/lib/pymodules/python2.7/numpy. 
/usr/lib/pymodules/python2.7/numpy contains links to 
/usr/share/pyshared/. Not all of numpy is is /usr/share/pyshared, but 
only the architecture-independent parts. The end result is that it is 
not possible to run a python script from /usr/share/pyshared.


Best,
Zbyszek


$ python /usr/share/pyshared/tifffile.py
Traceback (most recent call last):
   File "/usr/share/pyshared/tifffile.py", line 117, in
 import numpy
   File "/usr/share/pyshared/numpy/__init__.py", line 132, in
 import add_newdocs
   File "/usr/share/pyshared/numpy/add_newdocs.py", line 9, in
 from lib import add_newdoc
   File "/usr/share/pyshared/numpy/lib/__init__.py", line 4, in
 from type_check import *
   File "/usr/share/pyshared/numpy/lib/type_check.py", line 8, in
 import numpy.core.numeric as _nx
   File "/usr/share/pyshared/numpy/core/__init__.py", line 5, in
 import multiarray
ImportError: No module named multiarray
   However doing the following works nicely:

$ cd /tmp
$ cp /usr/share/pyshared/tifffile.py .
$ python tifffile.py --version
tifffile.py 2011.11.12

Thanks for suggestion,



--
To UNSUBSCRIBE, email to debian-python-requ...@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org
Archive: http://lists.debian.org/4ec389bc.20...@in.waw.pl



Re: ImportError: No module named multiarray

2011-11-16 Thread Mathieu Malaterre
2011/11/16 Zbigniew Jędrzejewski-Szmek :
> On 11/16/2011 10:03 AM, Mathieu Malaterre wrote:
>>
>> [CC me please]
>>
>> Hi all,
>>
>>   I am trying to package a tiny python module:
>>
>>
>> http://mentors.debian.net/debian/pool/main/t/tifffile/tifffile_2012-1.dsc
>>
>>   I thought I did it right, but I cannot load the python module
>> properly when installed, it fails with:
>
> Hi Mathieu,
> the problem is that numpy import fails. Numpy has both pure-python and
> compiled (e.g. multiarray.so) parts. When running a script, Python adds the
> directory containing the script to sys.path. Numpy is supposed to be
> imported from /usr/lib/pymodules/python2.7/numpy.
> /usr/lib/pymodules/python2.7/numpy contains links to /usr/share/pyshared/.
> Not all of numpy is is /usr/share/pyshared, but only the
> architecture-independent parts. The end result is that it is not possible to
> run a python script from /usr/share/pyshared.

Thanks for the info ! Does this means I simply need to install the
tifffile.py in /usr/bin then ? The tifffile.so python module will
remains at the same location.

Thanks again,
-- 
Mathieu


--
To UNSUBSCRIBE, email to debian-python-requ...@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org
Archive: 
http://lists.debian.org/ca+7wuswwicrb22gbeusfqs_3eor-o+-kmycmspayf-qp1mz...@mail.gmail.com



Re: ImportError: No module named multiarray

2011-11-16 Thread Zbigniew Jędrzejewski-Szmek

On 11/16/2011 11:06 AM, Mathieu Malaterre wrote:

2011/11/16 Zbigniew Jędrzejewski-Szmek:

On 11/16/2011 10:03 AM, Mathieu Malaterre wrote:


[CC me please]

Hi all,

   I am trying to package a tiny python module:


http://mentors.debian.net/debian/pool/main/t/tifffile/tifffile_2012-1.dsc

   I thought I did it right, but I cannot load the python module
properly when installed, it fails with:


Hi Mathieu,
the problem is that numpy import fails. Numpy has both pure-python and
compiled (e.g. multiarray.so) parts. When running a script, Python adds the
directory containing the script to sys.path. Numpy is supposed to be
imported from /usr/lib/pymodules/python2.7/numpy.
/usr/lib/pymodules/python2.7/numpy contains links to /usr/share/pyshared/.
Not all of numpy is is /usr/share/pyshared, but only the
architecture-independent parts. The end result is that it is not possible to
run a python script from /usr/share/pyshared.


Thanks for the info ! Does this means I simply need to install the
tifffile.py in /usr/bin then ? The tifffile.so python module will
remains at the same location.

It depends :)

If you want tifffile.py to be importable as a python module, than it 
probably should still be installed in /usr/lib/pymodules/... as usual.


Also, you probably the .py extension should be dropped for the 
executable in /usr/bin/.


You probably will need to provide a separate executable file in /usr/bin.

Best,
Zbyszek


--
To UNSUBSCRIBE, email to debian-python-requ...@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org
Archive: http://lists.debian.org/4ec390b3.5090...@in.waw.pl



Re: ImportError: No module named multiarray

2011-11-16 Thread Jakub Wilk

* Mathieu Malaterre , 2011-11-16, 10:03:
I thought I did it right, but I cannot load the python module properly 
when installed, it fails with:


$ python /usr/share/pyshared/tifffile.py
Traceback (most recent call last):
 File "/usr/share/pyshared/tifffile.py", line 117, in 
   import numpy
 File "/usr/share/pyshared/numpy/__init__.py", line 132, in 
   import add_newdocs
 File "/usr/share/pyshared/numpy/add_newdocs.py", line 9, in 
   from lib import add_newdoc
 File "/usr/share/pyshared/numpy/lib/__init__.py", line 4, in 
   from type_check import *
 File "/usr/share/pyshared/numpy/lib/type_check.py", line 8, in 
   import numpy.core.numeric as _nx
 File "/usr/share/pyshared/numpy/core/__init__.py", line 5, in 
   import multiarray
ImportError: No module named multiarray


Short story:

"Doctor, it hurts when I do this!"
"Well, don't do that then..."

Long story:

/usr/share/pyshared/ directory is an implementation detail of Python 
helpers. Don't mess with it if don't know what you are doing. More 
specifically, adding it to sys.path (either explicitly, or by running a 
script from this directory) is doomed to failure.


--
Jakub Wilk


--
To UNSUBSCRIBE, email to debian-python-requ...@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org
Archive: http://lists.debian.org/2016125754.ga9...@jwilk.net



Re: Request for Review - Nuitka the Python compiler (status update, more questions)

2011-11-16 Thread Kay Hayen

Am 16.11.2011 10:41, schrieb Nicolas Chauvat:


So that is it, I don't know anymore of things to do. What about a
manpage, is it considered mandatory?


It is always better to have one. Do you know about rst2man that can
generate a man page from restructuredtext ?


Yes, I will use it. I already used rst2pdf it for the user manual and my 
PyCON DE presentation. Today I discussed at work, unrelated to Nuitka, 
the use of it for configuration data. I guess am a rst fan boy now. :-)


Anybody has any experience with generating manpages from optparse?

Looking at cython(1) man page it appears that there is not much more to 
it than listing the options like "--help" does. But it's duplication to 
maintain it separately, so I would like to generate the "rst" from 
inspecting "nuitka/Options.py" somehow.


If anybody does that already, people on this list likely know.

Yours,
Kay


--
To UNSUBSCRIBE, email to debian-python-requ...@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org
Archive: http://lists.debian.org/4ec41acb.70...@gmx.de



Re: Request for Review - Nuitka the Python compiler (status update, more questions)

2011-11-16 Thread Kay Hayen



I wrote:


Anybody has any experience with generating manpages from optparse?


[...]


If anybody does that already, people on this list likely know.


Looking at cything, I found help2man, which is what cython package uses, 
great stuff. Of course, no need to be any Python specific.


Yours,
Kay


--
To UNSUBSCRIBE, email to debian-python-requ...@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org
Archive: http://lists.debian.org/4ec435a2.4070...@gmx.de



Re: Request for Review - Nuitka the Python compiler (status update, more questions)

2011-11-16 Thread Kay Hayen

Hello,


So that is it, I don't know anymore of things to do. What about a
manpage, is it considered mandatory?


The man page exists and even has an examples section added for the 
typical use cases. I am totally surprised at how easy that was. An 
absolute thumbs up to help2man from here, brilliant.


It's mentioned in the new maintainers guide section about man pages, but 
I was only reading it after I had the manpages created... ;-)


Also, strangely, I have previously removed the sys.path trick for the 
package, because "nuitka" was a public package (which it shouldn't 
really be, but e.g. "mercurial" is too.


It no longer is, but I feel it's not because of anything I did. I 
re-instated the "LIBDIR" trick, because it now is actually useful, and 
am left wondering what happened.


Was there some change that affects Debian Testing and python packaging 
recently? Should I do something about that?


What controls the process of creating links from 
"/usr/share/nuitka/nuitka" as "/usr/lib/python2.7/dist-packages/nuitka"?



What should be my next step? :-)


To me the packaging looks finished now. What files do I need to provide 
for potential sponsors? I suppose, what "debuild -S" gives? I don't get 
that part at all. Of course I would also like to offer a source package 
of nuitka in any case.


Please review the .deb and tell me about it:

http://nuitka.net/releases/nuitka_0.3.15pre3-2_all.deb

Yours,
Kay



--
To UNSUBSCRIBE, email to debian-python-requ...@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org
Archive: http://lists.debian.org/4ec45a5e.1080...@gmx.de