[Distutils] ctypes and shared libs, and wheels, oh my!

2014-06-11 Thread Chris Barker
Folks,

I'm trying to help figure out how to do binary wheels for a package that
relies on ctypes and a bundles shared lib (dll, .so. etc)

The trick here is that the python code is quite version and platform
independent: py2 and py3, version 2.7 and 3.3+ (I think)

(it's py_enchant, if anyone is interested:
http://pythonhosted.org/pyenchant/)

So the trick is that the binary wheel will be platform dependent, but not
the code itself, so ideally we'd have one wheel, that for instance (and teh
case at hand) should work on any OS-X box version 10.6 and above, with a
any of python2.7, 3.3, 3.4 (an up?)

Usually, a binary wheel involves  compiled extensions, and thus is tied to
a particular python version -- so this is an odd case.

We tried:

pyenchant-1.6.6-py2.py3-none-macosx_10_6_intel.whl

which seems to be saying: any version of python2 or python 3, but only on
macosx 10.6

but trying to install that on my machine (py2.7, os-x 10.6) gives:

pyenchant-1.6.6-py2.py3-none-macosx_10_6_intel.whl is not a supported wheel
on this platform.

(side note: it would be really great if that could be a more useful message
-- what part of the file name didn't match? I know that's a trick, as there
is a whole pile of heuristics to go through, but maybe a way to dump that
process would be helpful...)

Now, this may, in fat be tied to CPython (I have no idea if ctypes
is available on pypy or jython or IronPython...). So I tried:

pyenchant-1.6.6-cp27-none-macosx_10_6_intel.whl

that does, indeed, install on my system.

Also:

pyenchant-1.6.6-cp27.cp33-none-macosx_10_6_intel.whl

works.

As 2.7 is really the only py2 that much matters, no biggie, but is there a
way to get 3.3 and 3.4 and ??? all at once (I don't have py3 on that
machine, so didn't test that...)

So: how should this be done? Is the above the best option there is?

Thanks,
  -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] ctypes and shared libs, and wheels, oh my!

2014-06-11 Thread Daniel Holth
This is in the bug tracker already. We need to add the py2-none-arch tags
etc. to Pip's list.
On Jun 11, 2014 12:05 PM, Chris Barker chris.bar...@noaa.gov wrote:

 Folks,

 I'm trying to help figure out how to do binary wheels for a package that
 relies on ctypes and a bundles shared lib (dll, .so. etc)

 The trick here is that the python code is quite version and platform
 independent: py2 and py3, version 2.7 and 3.3+ (I think)

 (it's py_enchant, if anyone is interested:
 http://pythonhosted.org/pyenchant/)

 So the trick is that the binary wheel will be platform dependent, but not
 the code itself, so ideally we'd have one wheel, that for instance (and teh
 case at hand) should work on any OS-X box version 10.6 and above, with a
 any of python2.7, 3.3, 3.4 (an up?)

 Usually, a binary wheel involves  compiled extensions, and thus is tied to
 a particular python version -- so this is an odd case.

 We tried:

 pyenchant-1.6.6-py2.py3-none-macosx_10_6_intel.whl

 which seems to be saying: any version of python2 or python 3, but only on
 macosx 10.6

 but trying to install that on my machine (py2.7, os-x 10.6) gives:

 pyenchant-1.6.6-py2.py3-none-macosx_10_6_intel.whl is not a supported
 wheel on this platform.

 (side note: it would be really great if that could be a more useful
 message -- what part of the file name didn't match? I know that's a trick,
 as there is a whole pile of heuristics to go through, but maybe a way to
 dump that process would be helpful...)

 Now, this may, in fat be tied to CPython (I have no idea if ctypes
 is available on pypy or jython or IronPython...). So I tried:

 pyenchant-1.6.6-cp27-none-macosx_10_6_intel.whl

 that does, indeed, install on my system.

 Also:

 pyenchant-1.6.6-cp27.cp33-none-macosx_10_6_intel.whl

 works.

 As 2.7 is really the only py2 that much matters, no biggie, but is there a
 way to get 3.3 and 3.4 and ??? all at once (I don't have py3 on that
 machine, so didn't test that...)

 So: how should this be done? Is the above the best option there is?

 Thanks,
   -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


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


Re: [Distutils] ctypes and shared libs, and wheels, oh my!

2014-06-11 Thread Chris Barker
On Wed, Jun 11, 2014 at 9:09 AM, Daniel Holth dho...@gmail.com wrote:

 This is in the bug tracker already. We need to add the py2-none-arch tags
 etc. to Pip's list.

Great, thanks. Is the idea that:

pyenchant-1.6.6-py2.py3-none-macosx_10_6_intel.whl

should have worked? And will in some future version?

-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] ctypes and shared libs, and wheels, oh my!

2014-06-11 Thread Daniel Holth
If you insert those tags into this list, in the
pip.pep425tags.get_supported() function:
https://github.com/pypa/pip/blob/develop/pip/pep425tags.py#L38 then
your wheel will become installable.

I'd probably put it right after these:
https://github.com/pypa/pip/blob/develop/pip/pep425tags.py#L78

On Wed, Jun 11, 2014 at 12:32 PM, Chris Barker chris.bar...@noaa.gov wrote:
 On Wed, Jun 11, 2014 at 9:09 AM, Daniel Holth dho...@gmail.com wrote:

 This is in the bug tracker already. We need to add the py2-none-arch tags
 etc. to Pip's list.

 Great, thanks. Is the idea that:

 pyenchant-1.6.6-py2.py3-none-macosx_10_6_intel.whl

 should have worked? And will in some future version?

 -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] ctypes and shared libs, and wheels, oh my!

2014-06-11 Thread Chris Barker
On Wed, Jun 11, 2014 at 9:50 AM, Daniel Holth dho...@gmail.com wrote:

 If you insert those tags into this list, in the
 pip.pep425tags.get_supported() function:
 https://github.com/pypa/pip/blob/develop/pip/pep425tags.py#L38 then
 your wheel will become installable.

 I'd probably put it right after these:
 https://github.com/pypa/pip/blob/develop/pip/pep425tags.py#L78


OK, thanks -- that's going to take some poking around.

Maybe once we have the build actually working, I'll take a look at that.

-Chris





  On Wed, Jun 11, 2014 at 12:32 PM, Chris Barker chris.bar...@noaa.gov
 wrote:
  On Wed, Jun 11, 2014 at 9:09 AM, Daniel Holth dho...@gmail.com wrote:
 
  This is in the bug tracker already. We need to add the py2-none-arch
 tags
  etc. to Pip's list.
 
  Great, thanks. Is the idea that:
 
  pyenchant-1.6.6-py2.py3-none-macosx_10_6_intel.whl
 
  should have worked? And will in some future version?
 
  -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




-- 

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