Account Options

  1. Sign in
The old Google Groups will be going away soon, but your browser is incompatible with the new version.
Google Groups Home
« Groups Home
python setup.py sdist - include pxd files
There are currently too many topics in this group that display first. To make this topic appear first, remove this option from another topic.
There was an error processing your request. Please try again.
flag
  14 messages - Collapse all  -  Translate all to Translated (View all originals)
The group you are posting to is a Usenet group. Messages posted to this group will make your email address visible to anyone on the Internet.
Your reply message has not been sent.
Your post was successful
 
From:
To:
Cc:
Followup To:
Add Cc | Add Followup-to | Edit Subject
Subject:
Validation:
For verification purposes please type the characters you see in the picture below or the numbers you hear by clicking the accessibility icon. Listen and type the numbers you hear
 
Robert Cimrman  
View profile  
 More options Nov 29 2011, 10:38 am
From: Robert Cimrman <cimrm...@ntc.zcu.cz>
Date: Tue, 29 Nov 2011 16:38:07 +0100
Local: Tues, Nov 29 2011 10:38 am
Subject: python setup.py sdist - include pxd files
Hi,

I googled a bit how to properly make 'python setup.py sdist' include the pxd
files, and found not much. So I have solved my problem by including them
manually as data files, but I wonder - is there a cleaner way?

r.


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Robert Bradshaw  
View profile  
 More options Nov 29 2011, 12:15 pm
From: Robert Bradshaw <rober...@math.washington.edu>
Date: Tue, 29 Nov 2011 09:15:20 -0800
Local: Tues, Nov 29 2011 12:15 pm
Subject: Re: [cython-users] python setup.py sdist - include pxd files
That's probably the best way to do it; distutils doesn't know anything
about .pxd files.


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Lisandro Dalcin  
View profile  
 More options Nov 29 2011, 1:34 pm
From: Lisandro Dalcin <dalc...@gmail.com>
Date: Tue, 29 Nov 2011 15:34:50 -0300
Local: Tues, Nov 29 2011 1:34 pm
Subject: Re: [cython-users] python setup.py sdist - include pxd files
On 29 November 2011 14:15, Robert Bradshaw <rober...@math.washington.edu> wrote:

> That's probably the best way to do it; distutils doesn't know anything
> about .pxd files.

> On Tue, Nov 29, 2011 at 7:38 AM, Robert Cimrman <cimrm...@ntc.zcu.cz> wrote:
>> Hi,

>> I googled a bit how to properly make 'python setup.py sdist' include the pxd
>> files, and found not much. So I have solved my problem by including them
>> manually as data files, but I wonder - is there a cleaner way?

I usually add them to MANIFEST.in with a line like below:

recursive-include your_source_dir  *.pyx *.px[di] *.h *.c

--
Lisandro Dalcin
---------------
CIMEC (INTEC/CONICET-UNL)
Predio CONICET-Santa Fe
Colectora RN 168 Km 472, Paraje El Pozo
3000 Santa Fe, Argentina
Tel: +54-342-4511594 (ext 1011)
Tel/Fax: +54-342-4511169


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Robert Cimrman  
View profile  
 More options Nov 29 2011, 6:49 pm
From: Robert Cimrman <cimrm...@ntc.zcu.cz>
Date: Wed, 30 Nov 2011 00:49:27 +0100 (CET)
Local: Tues, Nov 29 2011 6:49 pm
Subject: Re: [cython-users] python setup.py sdist - include pxd files

That would work for me too, thanks!

r.


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Robert Kern  
View profile  
 More options Nov 30 2011, 5:29 am
From: Robert Kern <robert.k...@gmail.com>
Date: Wed, 30 Nov 2011 10:29:58 +0000
Local: Wed, Nov 30 2011 5:29 am
Subject: Re: python setup.py sdist - include pxd files
On 11/29/11 3:38 PM, Robert Cimrman wrote:

> Hi,

> I googled a bit how to properly make 'python setup.py sdist' include the pxd
> files, and found not much. So I have solved my problem by including them
> manually as data files, but I wonder - is there a cleaner way?

If you want them as part of the installed package like Cython/Include/ does,
they should be included in the package_data. If they are just to be distributed
in the source tarball outside of the package itself, Lisandro's MANIFEST.in line
is appropriate.

--
Robert Kern

"I have come to believe that the whole world is an enigma, a harmless enigma
  that is made terrible by our own mad attempt to interpret it as though it had
  an underlying truth."
   -- Umberto Eco


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Lisandro Dalcin  
View profile  
 More options Nov 30 2011, 11:46 am
From: Lisandro Dalcin <dalc...@gmail.com>
Date: Wed, 30 Nov 2011 13:46:23 -0300
Local: Wed, Nov 30 2011 11:46 am
Subject: Re: [cython-users] Re: python setup.py sdist - include pxd files
On 30 November 2011 07:29, Robert Kern <robert.k...@gmail.com> wrote:

> On 11/29/11 3:38 PM, Robert Cimrman wrote:

>> Hi,

>> I googled a bit how to properly make 'python setup.py sdist' include the
>> pxd
>> files, and found not much. So I have solved my problem by including them
>> manually as data files, but I wonder - is there a cleaner way?

> If you want them as part of the installed package like Cython/Include/ does,
> they should be included in the package_data.

And of course, installing *.pxds (and adding a get_include() in your
top package namespace, like NumPy does) is a VERY good idea. That way,
third party Cython code can fast access the internals of your cdef
classes.

> If they are just to be
> distributed in the source tarball outside of the package itself, Lisandro's
> MANIFEST.in line is appropriate.

BTW, It is also also appropriate for *.pyx sources.

--
Lisandro Dalcin
---------------
CIMEC (INTEC/CONICET-UNL)
Predio CONICET-Santa Fe
Colectora RN 168 Km 472, Paraje El Pozo
3000 Santa Fe, Argentina
Tel: +54-342-4511594 (ext 1011)
Tel/Fax: +54-342-4511169


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Robert Kern  
View profile  
 More options Nov 30 2011, 5:09 pm
From: Robert Kern <robert.k...@gmail.com>
Date: Wed, 30 Nov 2011 22:09:37 +0000
Local: Wed, Nov 30 2011 5:09 pm
Subject: Re: python setup.py sdist - include pxd files
On 11/30/11 4:46 PM, Lisandro Dalcin wrote:

> On 30 November 2011 07:29, Robert Kern<robert.k...@gmail.com>  wrote:
>> If they are just to be
>> distributed in the source tarball outside of the package itself, Lisandro's
>> MANIFEST.in line is appropriate.

> BTW, It is also also appropriate for *.pyx sources.

Those *should* already be taken care of since they will be in the sources list
of Extensions.

--
Robert Kern

"I have come to believe that the whole world is an enigma, a harmless enigma
  that is made terrible by our own mad attempt to interpret it as though it had
  an underlying truth."
   -- Umberto Eco


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Robert Cimrman  
View profile  
 More options Dec 1 2011, 4:29 am
From: Robert Cimrman <cimrm...@ntc.zcu.cz>
Date: Thu, 1 Dec 2011 10:29:19 +0100 (CET)
Local: Thurs, Dec 1 2011 4:29 am
Subject: Re: [cython-users] Re: python setup.py sdist - include pxd files

Thanks, Lisandro and Robert, for your feedback.

My primary concern was to have the *.pxd files in the source tarball, not
so much their installation.

I am using numpy.distutils, and so use config.add_data_files() function, which
does the job, and also makes them to be installed along the compiled
modules. I have also (wrongly) added the *.pyx files in the same way,
but there is probably no reason for them to be installed?

Thanks!
r.


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Robert Kern  
View profile  
 More options Dec 1 2011, 5:45 am
From: Robert Kern <robert.k...@gmail.com>
Date: Thu, 01 Dec 2011 10:45:33 +0000
Local: Thurs, Dec 1 2011 5:45 am
Subject: Re: python setup.py sdist - include pxd files
On 12/1/11 9:29 AM, Robert Cimrman wrote:

> I am using numpy.distutils, and so use config.add_data_files() function, which
> does the job, and also makes them to be installed along the compiled modules. I
> have also (wrongly) added the *.pyx files in the same way, but there is probably
> no reason for them to be installed?

Not really, no.

--
Robert Kern

"I have come to believe that the whole world is an enigma, a harmless enigma
  that is made terrible by our own mad attempt to interpret it as though it had
  an underlying truth."
   -- Umberto Eco


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Robert Bradshaw  
View profile  
 More options Dec 1 2011, 3:18 pm
From: Robert Bradshaw <rober...@math.washington.edu>
Date: Thu, 1 Dec 2011 12:18:22 -0800
Local: Thurs, Dec 1 2011 3:18 pm
Subject: Re: [cython-users] Re: python setup.py sdist - include pxd files

On Thu, Dec 1, 2011 at 2:45 AM, Robert Kern <robert.k...@gmail.com> wrote:
> On 12/1/11 9:29 AM, Robert Cimrman wrote:

>> I am using numpy.distutils, and so use config.add_data_files() function,
>> which
>> does the job, and also makes them to be installed along the compiled
>> modules. I
>> have also (wrongly) added the *.pyx files in the same way, but there is
>> probably
>> no reason for them to be installed?

> Not really, no.

They can be handy for introspection (e.g. ?? in ipython).

- Robert


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Lisandro Dalcin  
View profile  
 More options Dec 1 2011, 7:01 pm
From: Lisandro Dalcin <dalc...@gmail.com>
Date: Thu, 1 Dec 2011 21:01:22 -0300
Local: Thurs, Dec 1 2011 7:01 pm
Subject: Re: [cython-users] Re: python setup.py sdist - include pxd files
On 1 December 2011 17:18, Robert Bradshaw <rober...@math.washington.edu> wrote:

Yes, but I never figured out how to hack Python or IPython to hook the
loading of installed *.pyx files. Have you ever get this working?

--
Lisandro Dalcin
---------------
CIMEC (INTEC/CONICET-UNL)
Predio CONICET-Santa Fe
Colectora RN 168 Km 472, Paraje El Pozo
3000 Santa Fe, Argentina
Tel: +54-342-4511594 (ext 1011)
Tel/Fax: +54-342-4511169


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Robert Bradshaw  
View profile  
 More options Dec 1 2011, 7:03 pm
From: Robert Bradshaw <rober...@math.washington.edu>
Date: Thu, 1 Dec 2011 16:03:57 -0800
Local: Thurs, Dec 1 2011 7:03 pm
Subject: Re: [cython-users] Re: python setup.py sdist - include pxd files
Works in Sage. (Not sure how many hacks that required...)


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
MinRK  
View profile  
 More options Dec 1 2011, 7:11 pm
From: MinRK <benjami...@gmail.com>
Date: Thu, 1 Dec 2011 16:11:24 -0800
Local: Thurs, Dec 1 2011 7:11 pm
Subject: Re: [cython-users] Re: python setup.py sdist - include pxd files

On Thu, Dec 1, 2011 at 16:03, Robert Bradshaw
<rober...@math.washington.edu>wrote:

> Works in Sage. (Not sure how many hacks that required...)

I would love to know how that works, so we could get it into IPython proper
(or Cython - whoever needs patching).

-MinRK


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Robert Kern  
View profile  
 More options Dec 2 2011, 6:06 am
From: Robert Kern <robert.k...@gmail.com>
Date: Fri, 02 Dec 2011 11:06:43 +0000
Local: Fri, Dec 2 2011 6:06 am
Subject: Re: python setup.py sdist - include pxd files
On 12/2/11 12:11 AM, MinRK wrote:

> On Thu, Dec 1, 2011 at 16:03, Robert Bradshaw <rober...@math.washington.edu
> <mailto:rober...@math.washington.edu>> wrote:

>     Works in Sage. (Not sure how many hacks that required...)

> I would love to know how that works, so we could get it into IPython proper (or
> Cython - whoever needs patching).

Sage has its own extensions to the inspect module. I haven't looked through all
of the details, but you can probably extract the Cython-specific hacks for
IPython's extensions to the inspect module.

http://hg.sagemath.org/sage-main/file/tip/sage/misc/sageinspect.py

--
Robert Kern

"I have come to believe that the whole world is an enigma, a harmless enigma
  that is made terrible by our own mad attempt to interpret it as though it had
  an underlying truth."
   -- Umberto Eco


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
End of messages
« Back to Discussions « Newer topic     Older topic »