File tree Expand file tree Collapse file tree 1 file changed +21
-3
lines changed Expand file tree Collapse file tree 1 file changed +21
-3
lines changed Original file line number Diff line number Diff line change 2
2
import sys
3
3
from datetime import datetime , MAXYEAR
4
4
from collections import namedtuple
5
+ import setuptools
5
6
6
- from setuptools import setup
7
- from setuptools . command . install import install
7
+ try :
8
+ from wheel . bdist_wheel import bdist_wheel as _bdist_wheel
8
9
10
+ class bdist_wheel (_bdist_wheel ):
11
+ def run (self ):
12
+ message = "\n " .join (
13
+ [
14
+ "This is an expected error. Building wheel is disabled "
15
+ "for the deprecated sklearn PyPI package to avoid pip caching." ,
16
+ "For more details about the sklearn PyPI package deprecation, see:" ,
17
+ "https://github.com/scikit-learn/sklearn-pypi-package" ,
18
+ ]
19
+ )
20
+ raise setuptools .errors .ClassError (message )
21
+
22
+ cmdclass = {"bdist_wheel" : bdist_wheel }
23
+
24
+ except ImportError :
25
+ cmdclass = {}
9
26
10
27
with open ("README.md" ) as f :
11
28
LONG_DESCRIPTION = f .read ()
@@ -101,10 +118,11 @@ def maybe_raise_error(checked_datetime):
101
118
102
119
maybe_raise_error (checked_datetime )
103
120
104
- setup (
121
+ setuptools . setup (
105
122
description = "deprecated sklearn package, use scikit-learn instead" ,
106
123
long_description = LONG_DESCRIPTION ,
107
124
long_description_content_type = "text/markdown" ,
108
125
name = "sklearn" ,
109
126
version = "0.0.post1" ,
127
+ cmdclass = cmdclass ,
110
128
)
You can’t perform that action at this time.
0 commit comments