Re: [Distutils] Egg name computation

2013-10-31 Thread Chris Barker
On Mon, Oct 28, 2013 at 3:50 PM, PJ Eby p...@telecommunity.com wrote:

 You could include a dummy extension that does nothing, I suppose.  Or
 which controls the building of your actual extensions.  Setuptools has
 long supported Pyrex and I think that Cython might also work, i.e.,
 that you could just specify your cython modules as extensions in
 setup.py to start with.


Indeed -- recent versions of setuptools do support Cython. You also may
want to use Cython's cythonize on your Extension objects to make it a bit
smarter.

-Chris




-- 

Christopher Barker, Ph.D.
Oceanographer

Emergency Response Division
NOAA/NOS/ORR(206) 526-6959   voice
7600 Sand Point Way NE   (206) 526-6329   fax
Seattle, WA  98115   (206) 526-6317   main reception

chris.bar...@noaa.gov
___
Distutils-SIG maillist  -  Distutils-SIG@python.org
https://mail.python.org/mailman/listinfo/distutils-sig


Re: [Distutils] Egg name computation

2013-10-28 Thread Martin Fiers

On 10/25/2013 04:25 AM, PJ Eby wrote:

On Tue, Oct 15, 2013 at 8:07 AM, Martin Fiers
martin.fi...@intec.ugent.be wrote:

So the platform argument now is
self.distribution.has_ext_modules() and self.plat_name
Shouldn't it just be
self.plat_name
?

No.  The platform name is only included if the distribution has
extension modules, because extension modules are what make the egg
platform-specific.  If there is only Python code and data, then the
egg is considered platform independent.

Ok, I understand the reasoning.




Would there be a workaround?

What do you want to work around this *for*?  If the egg doesn't
contain extension modules, what is platform-specific about it?
Well, the way we build our extensions forces us to do this. We cythonize 
large parts of our modules. This is done in separate build scripts. It 
is included as package_data, which is 'agnostic' of the platform. For 
this reason, we want to force the naming. In any case, no harm is done 
by adding the platform name, as distutils recognizes them. I guess we'll 
have to rename them manually after the setup() function, unless there's 
a way to 'force' setup() to 'think' it has compiled extensions in them?


Thanks,
Martin


___
Distutils-SIG maillist  -  Distutils-SIG@python.org
https://mail.python.org/mailman/listinfo/distutils-sig


Re: [Distutils] Egg name computation

2013-10-28 Thread PJ Eby
On Mon, Oct 28, 2013 at 4:29 AM, Martin Fiers
martin.fi...@intec.ugent.be wrote:
 I guess we'll have to
 rename them manually after the setup() function, unless there's a way to
 'force' setup() to 'think' it has compiled extensions in them?

You could include a dummy extension that does nothing, I suppose.  Or
which controls the building of your actual extensions.  Setuptools has
long supported Pyrex and I think that Cython might also work, i.e.,
that you could just specify your cython modules as extensions in
setup.py to start with.
___
Distutils-SIG maillist  -  Distutils-SIG@python.org
https://mail.python.org/mailman/listinfo/distutils-sig


Re: [Distutils] Egg name computation

2013-10-24 Thread PJ Eby
On Tue, Oct 15, 2013 at 8:07 AM, Martin Fiers
martin.fi...@intec.ugent.be wrote:
 So the platform argument now is
 self.distribution.has_ext_modules() and self.plat_name
 Shouldn't it just be
 self.plat_name
 ?

No.  The platform name is only included if the distribution has
extension modules, because extension modules are what make the egg
platform-specific.  If there is only Python code and data, then the
egg is considered platform independent.


 Would there be a workaround?

What do you want to work around this *for*?  If the egg doesn't
contain extension modules, what is platform-specific about it?
___
Distutils-SIG maillist  -  Distutils-SIG@python.org
https://mail.python.org/mailman/listinfo/distutils-sig