Platforms and Python Tags¶
Brood identifies platforms and Python runtime compatibility based on
identification strings. This section describes how to discover the
valid platforms and Python tags using hatcher
.
Contents
Platforms¶
Platforms describe the operating system and system architecture compatibility of an egg, runtime or app.
Listing current platforms recognized by a brood server¶
In order to follow the next examples, the available platform support of Brood is required. This command lists all valid platforms in Brood:
$ hatcher platforms list
osx-x86_64
osx-x86
rh5-x86_64
rh5-x86
win-x86_64
win-x86
These are the valid values for any command that requires specifying a
platform. For example, to list the eggs in the enthought/free
repository for the rh5-x86_64
platform, the following command is
used:
$ hatcher eggs list enthought free rh5-x86_64 cp27
Example Valid Platforms¶
As of Brood v0.3.1
, the following platforms are recognized:
Brood Platform | Operating System | System Architecture |
---|---|---|
osx-x86_64 |
Apple Mac OSX | x86_64 |
osx-x86 |
Apple Mac OSX | x86 |
rh5-x86_64 |
RedHat Linux 5.x | x86_64 |
rh5-x86 |
RedHat Linux 5.x | x86 |
win-x86_64 |
Microsoft Windows | x86_64 |
win-x86 |
Microsoft Windows | x86 |
Python Tags¶
Python tags describe the runtime compatibility of an egg or app. The Python tags are used as defined in PEP425, following the actual implementation in wheel, which does not follow the spec exactly.
Python tags are used to indicate both which Python implementation a package requires (if any), as well as the version required. The tag is made up of two portions which describe this relationship. The tags defined in PEP425 take the following form:
- First two characters contain Python implementation description
- Final one or two characters are the
Major
andMinor
version of the Python implementation. Brood (as wheel) use theMajor
andMinor
version of the Python language that the implementation provides.
For example:
cp27
indicates CPython2.7.x
compatibility.pp27
indicates compatibility with Pypy providing Python language version2.7.x
.py34
indicates that an egg has no dependency on a specific Python implementation, but requires Python language version3.4.x
.jy2
indicates that an egg is compatible with any Jython version that provides Python language2.x
.
Python Tags and Eggs¶
When requesting an egg list or index, the Python tag of the target runtime must be provided. This is to ensure that the index returned contains only packages that will work on the target runtime. To list the possible Python tags that may be used to request the egg list for a Python implementation, use the following command:
$ hatcher python-tags list
Python Tag
------------
cp27
cp30
cp31
cp32
cp33
cp34
ip27
jy27
pp27
Each egg in Brood specifies its own Python runtime compatibility. For
example, numpy
requires a CPython interpreter as it depends on the
CPython/C API. It may specify a Python tag like cp27
or cp32
.
On the other hand, nose
is a pure-python egg which is compatible
with multiple runtimes. It may specify Python tags like py2
and
py3
. When listing eggs with hatcher, the eggs specific runtime tag
is listed along with it, so that the correct egg may be manipulated with
hatcher:
$ hatcher eggs list enthought free rh5-64 cp27
Egg Name Python Tag
---------------- ------------
nose-1.3.0-1.egg py2
...
The Python tag listed alongside the egg is used to download the egg:
$ hatcher eggs download enthought free rh5-64 py2 nose 1.3.0-1
...