protected void generatePythonSetup ( IStyleAppendable it , String basename ) { it . appendNl ( "# -*- coding: {0} -*-" , getCodeConfig ( ) . getEncoding ( ) . toLowerCase ( ) ) ; //$NON-NLS-1$ it . appendHeader ( ) ; it . newLine ( ) ; it . append ( "from setuptools import setup" ) ; //$NON-NLS-1$ it . newLine ( ) . newLine ( ) ; it . append ( "setup (" ) ; //$NON-NLS-1$ it . increaseIndentation ( ) . newLine ( ) ; it . append ( "name='" ) . append ( basename ) . append ( "lexer'," ) ; //$NON-NLS-1$ //$NON-NLS-2$ it . newLine ( ) ; it . append ( "version='" ) . append ( getLanguageVersion ( ) ) . append ( "'," ) ; //$NON-NLS-1$ //$NON-NLS-2$ it . newLine ( ) ; it . append ( "packages=['" ) . append ( basename ) . append ( "lexer']," ) ; //$NON-NLS-1$ //$NON-NLS-2$ it . newLine ( ) ; it . append ( "entry_points =" ) ; //$NON-NLS-1$ it . newLine ( ) ; it . append ( "\"\"\"" ) ; //$NON-NLS-1$ it . newLine ( ) ; it . append ( "[pygments.lexers]" ) ; //$NON-NLS-1$ it . newLine ( ) ; it . append ( "sarllexer = " ) . append ( basename ) . append ( "lexer." ) . append ( basename ) ; //$NON-NLS-1$ //$NON-NLS-2$ it . append ( ":SarlLexer" ) ; //$NON-NLS-1$ it . newLine ( ) ; it . append ( "\"\"\"," ) ; //$NON-NLS-1$ it . decreaseIndentation ( ) . newLine ( ) ; it . append ( ")" ) ; //$NON-NLS-1$ it . newLine ( ) ; }
Create the content of the setup . py file .