Skip to content

Releases: superlinear-ai/fastdup

fastdup v1.89 with unpinned requests

06 Feb 16:53
Compare
Choose a tag to compare

This release was created with the following script that repackages the .whl file with a loosened requirement on requests:

import zipfile
import os
import tempfile
from wheel.wheelfile import WheelFile

# Define the paths
wheel_path = 'fastdup-1.89-cp310-cp310-manylinux_2_31_x86_64.orig.whl'
new_wheel_path = 'fastdup-1.89-cp310-cp310-manylinux_2_31_x86_64.whl'
temp_dir = tempfile.mkdtemp()

# Extract the wheel file
with WheelFile(wheel_path, 'r') as wf:
    wf.extractall(temp_dir)

# Modify the METADATA file
metadata_path = os.path.join(temp_dir, 'fastdup-1.89.dist-info', 'METADATA')
with open(metadata_path, 'r') as file:
    metadata = file.read()

metadata = metadata.replace('Requires-Dist: requests (==2.28.1)', 'Requires-Dist: requests (>=2.28.1)')

with open(metadata_path, 'w') as file:
    file.write(metadata)

# Repackage the wheel file into a new file
with WheelFile(new_wheel_path, 'w') as wf:
    for root, _, files in os.walk(temp_dir):
        for file in files:
            file_path = os.path.join(root, file)
            wf.write(file_path, os.path.relpath(file_path, temp_dir))