pygradle-plugin/src/main/groovy/com/linkedin/gradle/python/tasks/action/pip/WheelBuilder.java
@Override
    void doPipOperation(PackageInfo packageInfo, List<String> extraArgs) {
        List<String> commandLine = makeCommandLine(packageInfo, extraArgs);
        if (commandLine.isEmpty()) {
            return;
        }

        if (PythonHelpers.isPlainOrVerbose(project)) {
            logger.lifecycle("Building wheel for {}", packageInfo.toShortHand());
        }

        Map<String, String> mergedEnv;
        // The flag is set in getPackage method.
        if (customBuild) {
            mergedEnv = environmentMerger.mergeEnvironments(
                Arrays.asList(baseEnvironment, packageSettings.getEnvironment(packageInfo)));
        } else {
            // Have to use this for customized environments that are explicitly marked non-customized
            mergedEnv = packageSettings.getEnvironment(packageInfo);
        }

        OutputStream stream = new ByteArrayOutputStream();

        ExecResult installResult = execCommand(mergedEnv, commandLine, stream);

        if (installResult.getExitValue() == 0) {
            logger.info(stream.toString().trim());
        } else {
            logger.error("Error building package wheel using `{}`", commandLine);
            logger.error(stream.toString().trim());
            throw PipExecutionException.failedWheel(packageInfo, stream.toString().trim());
        }

    }
/*
     * Similar to execute method above, we're skipping some checks already
     * done in PipInstallAction where WheelBuilder is called from.
     * For example, the check for supported versions.
     * Some other checks, such as source build requirement, are moved to
     * the main method of the wheel builder -- getPackage.
     */
Similar to execute method above, we're skipping some checks already
done in PipInstallAction where WheelBuilder is called from.
For example, the check for supported versions.
Some other checks, such as source build requirement, are moved to
the main method of the wheel builder -- getPackage.
Similar to execute method above we ' re skipping some checks already done in PipInstallAction where WheelBuilder is called from . For example the check for supported versions . Some other checks such as source build requirement are moved to the main method of the wheel builder -- getPackage .
@Override
    void doPipOperation(PackageInfo packageInfo, List<String> extraArgs) {
        List<String> commandLine = makeCommandLine(packageInfo, extraArgs);
        if (commandLine.isEmpty()) {
            return;
        }
        if (PythonHelpers.isPlainOrVerbose(project)) {
            logger.lifecycle("Building wheel for {}", packageInfo.toShortHand());
        }
        Map<String, String> mergedEnv;
        if (customBuild) {
            mergedEnv = environmentMerger.mergeEnvironments(
                Arrays.asList(baseEnvironment, packageSettings.getEnvironment(packageInfo)));
        } else {
            mergedEnv = packageSettings.getEnvironment(packageInfo);
        }
        OutputStream stream = new ByteArrayOutputStream();
        ExecResult installResult = execCommand(mergedEnv, commandLine, stream);
        if (installResult.getExitValue() == 0) {
            logger.info(stream.toString().trim());
        } else {
            logger.error("Error building package wheel using `{}`", commandLine);
            logger.error(stream.toString().trim());
            throw PipExecutionException.failedWheel(packageInfo, stream.toString().trim());
        }
    }
@ Override void doPipOperation ( PackageInfo packageInfo , List < String > extraArgs ) { List < String > commandLine = makeCommandLine ( packageInfo , extraArgs ) ; if ( commandLine . isEmpty ( ) ) { return ; } if ( PythonHelpers . isPlainOrVerbose ( project ) ) { logger . lifecycle ( "Building wheel for {}" , packageInfo . toShortHand ( ) ) ; } Map < String , String > mergedEnv ; if ( customBuild ) { mergedEnv = environmentMerger . mergeEnvironments ( Arrays . asList ( baseEnvironment , packageSettings . getEnvironment ( packageInfo ) ) ) ; } else { mergedEnv = packageSettings . getEnvironment ( packageInfo ) ; } OutputStream stream = new ByteArrayOutputStream ( ) ; ExecResult installResult = execCommand ( mergedEnv , commandLine , stream ) ; if ( installResult . getExitValue ( ) == 0 ) { logger . info ( stream . toString ( ) . trim ( ) ) ; } else { logger . error ( "Error building package wheel using `{}`" , commandLine ) ; logger . error ( stream . toString ( ) . trim ( ) ) ; throw PipExecutionException . failedWheel ( packageInfo , stream . toString ( ) . trim ( ) ) ; } }
Similar to execute method above, we're skipping some checks already
 done in PipInstallAction where WheelBuilder is called from.
Similar to execute method above we ' re skipping some checks already done in PipInstallAction where WheelBuilder is called from .
// The flag is set in getPackage method. // Have to use this for customized environments that are explicitly marked non-customized