Update PEP 508

This commit is contained in:
Donald Stufft 2016-02-17 18:25:21 -05:00
parent b48031fa48
commit 3c361038d4
1 changed files with 9 additions and 10 deletions

View File

@ -107,7 +107,7 @@ environments::
env_var = ('python_version' | 'python_full_version' |
'os_name' | 'sys_platform' | 'platform_release' |
'platform_system' | 'platform_version' |
'platform_machine' | 'python_implementation' |
'platform_machine' | 'platform_python_implementation' |
'implementation_name' | 'implementation_version' |
'extra' # ONLY when defined by a containing layer
)
@ -124,9 +124,8 @@ environments::
Optional components of a distribution may be specified using the extras
field::
identifier = letterOrDigit (
letterOrDigit |
(( letterOrDigit | '-' | '_' | '.')* letterOrDigit ) )*
identifer_end = letterOrDigit | (('-' | '_' | '.' )* letterOrDigit)
identifier = letterOrDigit identifier_end*
name = identifier
extras_list = identifier (wsp* ',' wsp* identifier)*
extras = '[' wsp* extras_list? wsp* ']'
@ -263,7 +262,7 @@ error like all other unknown variables.
* - ``platform_machine``
- ``platform.machine()``
- ``x86_64``
* - ``python_implementation``
* - ``platform_python_implementation``
- ``platform.python_implementation()``
- ``CPython``, ``Jython``
* - ``platform_release``
@ -375,7 +374,7 @@ The complete parsley grammar::
env_var = ('python_version' | 'python_full_version' |
'os_name' | 'sys_platform' | 'platform_release' |
'platform_system' | 'platform_version' |
'platform_machine' | 'python_implementation' |
'platform_machine' | 'platform_python_implementation' |
'implementation_name' | 'implementation_version' |
'extra' # ONLY when defined by a containing layer
):varname -> lookup(varname)
@ -388,9 +387,8 @@ The complete parsley grammar::
| marker_and:m -> m
marker = marker_or
quoted_marker = ';' wsp* marker
identifier = <letterOrDigit (
letterOrDigit |
(( letterOrDigit | '-' | '_' | '.')* letterOrDigit ) )*>
identifer_end = letterOrDigit | (('-' | '_' | '.' )* letterOrDigit)
identifier = < letterOrDigit identifier_end* >
name = identifier
extras_list = identifier:i (wsp* ',' wsp* identifier)*:ids -> [i] + ids
extras = '[' wsp* extras_list?:e wsp* ']' -> e
@ -475,6 +473,7 @@ A test program - if the grammar is in a string ``grammar``::
"""
tests = [
"A",
"A.B-C_D",
"aa",
"name",
"name>=3",
@ -510,11 +509,11 @@ A test program - if the grammar is in a string ``grammar``::
'implementation_version': implementation_version,
'os_name': os.name,
'platform_machine': platform.machine(),
'platform_python_implementation': platform.python_implementation(),
'platform_release': platform.release(),
'platform_system': platform.system(),
'platform_version': platform.version(),
'python_full_version': platform.python_version(),
'python_implementation': platform.python_implementation(),
'python_version': platform.python_version()[:3],
'sys_platform': sys.platform,
}