platform specific python only wheels
Hi, Is there a way to create a wheel that contains only python code, but can only be installed on particular platforms? In particular, I’m looking for a way to create a wheel for py2app that can only be installed on OSX because py2app cannot “cross-compile” application bundles. Ronald
Your best bet currently is to execute the "mv" command to change the filename of the wheel. I think bdist_wheel should probably accept a setup() argument to set the tags. Currently you can just set a "universal" flag which means pure 2+3 python. On Thu, Jan 30, 2014 at 1:14 PM, Ronald Oussoren <ronaldoussoren@mac.com> wrote:
Hi,
Is there a way to create a wheel that contains only python code, but can only be installed on particular platforms?
In particular, I'm looking for a way to create a wheel for py2app that can only be installed on OSX because py2app cannot "cross-compile" application bundles.
Ronald _______________________________________________ Distutils-SIG maillist - Distutils-SIG@python.org https://mail.python.org/mailman/listinfo/distutils-sig
On 30 Jan 2014, at 19:19, Daniel Holth <dholth@gmail.com> wrote:
Your best bet currently is to execute the "mv" command to change the filename of the wheel.
I think bdist_wheel should probably accept a setup() argument to set the tags. Currently you can just set a "universal" flag which means pure 2+3 python.
There’s also —plat-name argument for the setuptools command, but that doesn’t work. I’d have to rename the platform tag from “any” to a list of supported platforms, is that correct? That would give a pretty convoluted filename, because the platform tag doesn’t allow for wildcards. That is, there is no way to specify “any linux”, only something like “linux_x86_64” (to borrow a tag from PEP 425). Ronald
On Thu, Jan 30, 2014 at 1:14 PM, Ronald Oussoren <ronaldoussoren@mac.com> wrote:
Hi,
Is there a way to create a wheel that contains only python code, but can only be installed on particular platforms?
In particular, I'm looking for a way to create a wheel for py2app that can only be installed on OSX because py2app cannot "cross-compile" application bundles.
Ronald _______________________________________________ Distutils-SIG maillist - Distutils-SIG@python.org https://mail.python.org/mailman/listinfo/distutils-sig
On Thu, Jan 30, 2014 at 1:29 PM, Ronald Oussoren <ronaldoussoren@mac.com> wrote:
On 30 Jan 2014, at 19:19, Daniel Holth <dholth@gmail.com> wrote:
Your best bet currently is to execute the "mv" command to change the filename of the wheel.
I think bdist_wheel should probably accept a setup() argument to set the tags. Currently you can just set a "universal" flag which means pure 2+3 python.
There's also --plat-name argument for the setuptools command, but that doesn't work.
I'd have to rename the platform tag from "any" to a list of supported platforms, is that correct?
That would give a pretty convoluted filename, because the platform tag doesn't allow for wildcards. That is, there is no way to specify "any linux", only something like "linux_x86_64" (to borrow a tag from PEP 425).
My position has been that if there is no alternative that works on a different platform, then at least the wheel metadata should say nothing. It's only there to allow the installer to pick among the best of several alternatives.
On 30 Jan 2014, at 19:36, Daniel Holth <dholth@gmail.com> wrote:
On Thu, Jan 30, 2014 at 1:29 PM, Ronald Oussoren <ronaldoussoren@mac.com> wrote:
On 30 Jan 2014, at 19:19, Daniel Holth <dholth@gmail.com> wrote:
Your best bet currently is to execute the "mv" command to change the filename of the wheel.
I think bdist_wheel should probably accept a setup() argument to set the tags. Currently you can just set a "universal" flag which means pure 2+3 python.
There's also --plat-name argument for the setuptools command, but that doesn't work.
I'd have to rename the platform tag from "any" to a list of supported platforms, is that correct?
That would give a pretty convoluted filename, because the platform tag doesn't allow for wildcards. That is, there is no way to specify "any linux", only something like "linux_x86_64" (to borrow a tag from PEP 425).
My position has been that if there is no alternative that works on a different platform, then at least the wheel metadata should say nothing. It's only there to allow the installer to pick among the best of several alternatives.
The py2app setup.py file currently hardcodes a platform check because users did install py2app on other platforms (mostly Windows) and then complained that it didn’t work. It is much nicer to tell the user that a package won’t work during installation. Ronald
You are probably a perfect customer for supports_environment On Thu, Jan 30, 2014 at 1:40 PM, Ronald Oussoren <ronaldoussoren@mac.com> wrote:
On 30 Jan 2014, at 19:36, Daniel Holth <dholth@gmail.com> wrote:
On Thu, Jan 30, 2014 at 1:29 PM, Ronald Oussoren <ronaldoussoren@mac.com> wrote:
On 30 Jan 2014, at 19:19, Daniel Holth <dholth@gmail.com> wrote:
Your best bet currently is to execute the "mv" command to change the filename of the wheel.
I think bdist_wheel should probably accept a setup() argument to set the tags. Currently you can just set a "universal" flag which means pure 2+3 python.
There's also --plat-name argument for the setuptools command, but that doesn't work.
I'd have to rename the platform tag from "any" to a list of supported platforms, is that correct?
That would give a pretty convoluted filename, because the platform tag doesn't allow for wildcards. That is, there is no way to specify "any linux", only something like "linux_x86_64" (to borrow a tag from PEP 425).
My position has been that if there is no alternative that works on a different platform, then at least the wheel metadata should say nothing. It's only there to allow the installer to pick among the best of several alternatives.
The py2app setup.py file currently hardcodes a platform check because users did install py2app on other platforms (mostly Windows) and then complained that it didn't work. It is much nicer to tell the user that a package won't work during installation.
Ronald
On 31 Jan 2014 04:41, "Daniel Holth" <dholth@gmail.com> wrote:
You are probably a perfect customer for supports_environment
It occurs to me that if we split the hooks stuff out of PEP 359, we'd be pretty close to a releasable metadata 2.0 spec... Cheers, Nick.
On Thu, Jan 30, 2014 at 1:40 PM, Ronald Oussoren <ronaldoussoren@mac.com>
On 30 Jan 2014, at 19:36, Daniel Holth <dholth@gmail.com> wrote:
On Thu, Jan 30, 2014 at 1:29 PM, Ronald Oussoren <
ronaldoussoren@mac.com> wrote:
On 30 Jan 2014, at 19:19, Daniel Holth <dholth@gmail.com> wrote:
Your best bet currently is to execute the "mv" command to change the filename of the wheel.
I think bdist_wheel should probably accept a setup() argument to set the tags. Currently you can just set a "universal" flag which means pure 2+3 python.
There's also --plat-name argument for the setuptools command, but
I'd have to rename the platform tag from "any" to a list of supported
That would give a pretty convoluted filename, because the platform
tag doesn't allow for wildcards. That is, there is no way to specify "any
My position has been that if there is no alternative that works on a different platform, then at least the wheel metadata should say nothing. It's only there to allow the installer to pick among the best of several alternatives.
The py2app setup.py file currently hardcodes a platform check because users did install py2app on other platforms (mostly Windows) and then complained that it didn't work. It is much nicer to tell the user that a
wrote: that doesn't work. platforms, is that correct? linux", only something like "linux_x86_64" (to borrow a tag from PEP 425). package won't work during installation.
Ronald
_______________________________________________ Distutils-SIG maillist - Distutils-SIG@python.org https://mail.python.org/mailman/listinfo/distutils-sig
-------------------------------------------- On Thu, 30/1/14, Ronald Oussoren <ronaldoussoren@mac.com> wrote:
Is there a way to create a wheel that contains only python code, but can only be installed on particular platforms?
Perhaps not yet, but the idea is there in the 'supports_environments' metadata in PEP 426. This is currently supported by distil, but I don't believe pip does yet. Regards, Vinay Sajip
On 30 Jan 2014, at 19:23, Vinay Sajip <vinay_sajip@yahoo.co.uk> wrote:
-------------------------------------------- On Thu, 30/1/14, Ronald Oussoren <ronaldoussoren@mac.com> wrote:
Is there a way to create a wheel that contains only python code, but can only be installed on particular platforms?
Perhaps not yet, but the idea is there in the 'supports_environments' metadata in PEP 426. This is currently supported by distil, but I don't believe pip does yet.
supports_environment would work for me. Ronald
participants (4)
-
Daniel Holth
-
Nick Coghlan
-
Ronald Oussoren
-
Vinay Sajip