From 3c361038d4cac3ceb6436f1f2fb650f5f672387e Mon Sep 17 00:00:00 2001 From: Donald Stufft Date: Wed, 17 Feb 2016 18:25:21 -0500 Subject: [PATCH] Update PEP 508 --- pep-0508.txt | 19 +++++++++---------- 1 file changed, 9 insertions(+), 10 deletions(-) diff --git a/pep-0508.txt b/pep-0508.txt index 22fa3238d..3ce0d95f2 100644 --- a/pep-0508.txt +++ b/pep-0508.txt @@ -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 = + 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, }