pygradle-plugin/src/main/groovy/com/linkedin/gradle/python/tasks/action/pip/PipWheelAction.java
private boolean doesWheelExist(PackageInfo packageInfo) {
        if (!packageSettings.isCustomized(packageInfo)) {
            Optional<File> wheel = wheelCache.findWheel(packageInfo.getName(), packageInfo.getVersion(), pythonDetails);
            if (wheel.isPresent()) {
                File wheelFile = wheel.get();
                File wheelCopy = new File(wheelExtension.getWheelCache(), wheelFile.getName());

                if (!wheelFile.equals(wheelCopy)) {
                    try {
                        FileUtils.copyFile(wheelFile, wheelCopy);
                    } catch (IOException e) {
                        throw new UncheckedIOException(e);
                    }
                }

                if (PythonHelpers.isPlainOrVerbose(project)) {
                    logger.lifecycle("Skipping {}, in wheel cache {}", packageInfo.toShortHand(), wheelFile);
                }
                return true;
            }
        }

        ConfigurableFileTree tree = project.fileTree(wheelExtension.getWheelCache(), action -> {
            String sanitizedName = packageInfo.getName().replace('-', '_');
            String sanitizedVersion = (packageInfo.getVersion() == null ? "unspecified" : packageInfo.getVersion()).replace('-', '_');
            action.include("**/" + sanitizedName + "-" + sanitizedVersion + "-*.whl");
        });

        if (tree.getFiles().size() >= 1) {
            if (PythonHelpers.isPlainOrVerbose(project)) {
                logger.lifecycle("Skipping {} wheel - Installed", packageInfo.toShortHand());
            }
            return true;
        }
        return false;
    }
/*
     * Check if a wheel exists for this product already and only build it
     * if it is missing. We don't care about the wheel details because we
     * always build these locally.
     */
Check if a wheel exists for this product already and only build it
if it is missing. We don't care about the wheel details because we
always build these locally.
Check if a wheel exists for this product already and only build it if it is missing . We don ' t care about the wheel details because we always build these locally .
private boolean doesWheelExist(PackageInfo packageInfo) {
        if (!packageSettings.isCustomized(packageInfo)) {
            Optional<File> wheel = wheelCache.findWheel(packageInfo.getName(), packageInfo.getVersion(), pythonDetails);
            if (wheel.isPresent()) {
                File wheelFile = wheel.get();
                File wheelCopy = new File(wheelExtension.getWheelCache(), wheelFile.getName());
                if (!wheelFile.equals(wheelCopy)) {
                    try {
                        FileUtils.copyFile(wheelFile, wheelCopy);
                    } catch (IOException e) {
                        throw new UncheckedIOException(e);
                    }
                }
                if (PythonHelpers.isPlainOrVerbose(project)) {
                    logger.lifecycle("Skipping {}, in wheel cache {}", packageInfo.toShortHand(), wheelFile);
                }
                return true;
            }
        }
        ConfigurableFileTree tree = project.fileTree(wheelExtension.getWheelCache(), action -> {
            String sanitizedName = packageInfo.getName().replace('-', '_');
            String sanitizedVersion = (packageInfo.getVersion() == null ? "unspecified" : packageInfo.getVersion()).replace('-', '_');
            action.include("**/" + sanitizedName + "-" + sanitizedVersion + "-*.whl");
        });
        if (tree.getFiles().size() >= 1) {
            if (PythonHelpers.isPlainOrVerbose(project)) {
                logger.lifecycle("Skipping {} wheel - Installed", packageInfo.toShortHand());
            }
            return true;
        }
        return false;
    }
private boolean doesWheelExist ( PackageInfo packageInfo ) { if ( ! packageSettings . isCustomized ( packageInfo ) ) { Optional < File > wheel = wheelCache . findWheel ( packageInfo . getName ( ) , packageInfo . getVersion ( ) , pythonDetails ) ; if ( wheel . isPresent ( ) ) { File wheelFile = wheel . get ( ) ; File wheelCopy = new File ( wheelExtension . getWheelCache ( ) , wheelFile . getName ( ) ) ; if ( ! wheelFile . equals ( wheelCopy ) ) { try { FileUtils . copyFile ( wheelFile , wheelCopy ) ; } catch ( IOException e ) { throw new UncheckedIOException ( e ) ; } } if ( PythonHelpers . isPlainOrVerbose ( project ) ) { logger . lifecycle ( "Skipping {}, in wheel cache {}" , packageInfo . toShortHand ( ) , wheelFile ) ; } return true ; } } ConfigurableFileTree tree = project . fileTree ( wheelExtension . getWheelCache ( ) , action -> { String sanitizedName = packageInfo . getName ( ) . replace ( '-' , '_' ) ; String sanitizedVersion = ( packageInfo . getVersion ( ) == null ? "unspecified" : packageInfo . getVersion ( ) ) . replace ( '-' , '_' ) ; action . include ( "**/" + sanitizedName + "-" + sanitizedVersion + "-*.whl" ) ; } ) ; if ( tree . getFiles ( ) . size ( ) >= 1 ) { if ( PythonHelpers . isPlainOrVerbose ( project ) ) { logger . lifecycle ( "Skipping {} wheel - Installed" , packageInfo . toShortHand ( ) ) ; } return true ; } return false ; }
Check if a wheel exists for this product already and only build it
 if it is missing.
Check if a wheel exists for this product already and only build it if it is missing .