Skip to content

Avoid pip wheel caching #4

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 4 commits into from
Jan 25, 2023
Merged
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 15 additions & 3 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,21 @@
import sys
from datetime import datetime, MAXYEAR
from collections import namedtuple
import setuptools

from setuptools import setup
from setuptools.command.install import install
try:
from wheel.bdist_wheel import bdist_wheel as _bdist_wheel

class bdist_wheel(_bdist_wheel):
def run(self):
raise setuptools.errors.ClassError(
"This is an expected error. Building wheel is disabled for the sklearn package to avoid client-side pip caching."
)

cmdclass = {"bdist_wheel": bdist_wheel}

except ImportError:
cmdclass = {}

with open("README.md") as f:
LONG_DESCRIPTION = f.read()
Expand Down Expand Up @@ -101,10 +112,11 @@ def maybe_raise_error(checked_datetime):

maybe_raise_error(checked_datetime)

setup(
setuptools.setup(
description="deprecated sklearn package, use scikit-learn instead",
long_description=LONG_DESCRIPTION,
long_description_content_type="text/markdown",
name="sklearn",
version="0.0.post1",
cmdclass=cmdclass,
)