5
5
import re
6
6
import sys
7
7
import os
8
- from distutils .command .sdist import sdist
9
8
import setuptools
9
+
10
+ from distutils .command .sdist import sdist
11
+
10
12
from numpy .distutils .core import setup
13
+ from numpy .distutils .misc_util import Configuration
11
14
12
15
13
16
DISTNAME = 'sklearn-contrib-lightning'
19
22
MAINTAINER_EMAIL = 'mathieu@mblondel.org'
20
23
URL = 'https://github.com/scikit-learn-contrib/lightning'
21
24
LICENSE = 'new BSD'
22
- DOWNLOAD_URL = URL
23
25
with open (os .path .join ('lightning' , '__init__.py' ), encoding = 'utf-8' ) as f :
24
26
match = re .search (r'__version__[ ]*=[ ]*[\"\'](?P<version>.+)[\"\']' ,
25
27
f .read ())
@@ -37,9 +39,15 @@ def configuration(parent_package='', top_path=None):
37
39
if os .path .exists ('MANIFEST' ):
38
40
os .remove ('MANIFEST' )
39
41
40
- from numpy .distutils .misc_util import Configuration
41
42
config = Configuration (None , parent_package , top_path )
42
43
44
+ # Avoid non-useful msg:
45
+ # "Ignoring attempt to set 'name' (from ... "
46
+ config .set_options (ignore_setup_xxx_py = True ,
47
+ assume_default_configuration = True ,
48
+ delegate_options_to_subpackages = True ,
49
+ quiet = True )
50
+
43
51
config .add_subpackage ('lightning' )
44
52
45
53
return config
@@ -55,7 +63,7 @@ def configuration(parent_package='', top_path=None):
55
63
setup (configuration = configuration ,
56
64
name = DISTNAME ,
57
65
maintainer = MAINTAINER ,
58
- python_requires = '>={}' . format ( MIN_PYTHON_VERSION ) ,
66
+ python_requires = f '>={ MIN_PYTHON_VERSION } ' ,
59
67
install_requires = REQUIREMENTS ,
60
68
include_package_data = True ,
61
69
scripts = ["bin/lightning_train" ,
@@ -65,7 +73,7 @@ def configuration(parent_package='', top_path=None):
65
73
license = LICENSE ,
66
74
url = URL ,
67
75
version = VERSION ,
68
- download_url = DOWNLOAD_URL ,
76
+ download_url = URL ,
69
77
long_description = LONG_DESCRIPTION ,
70
78
zip_safe = False , # the package can run out of an .egg file
71
79
cmdclass = {"sdist" : sdist },
@@ -74,7 +82,7 @@ def configuration(parent_package='', top_path=None):
74
82
'Intended Audience :: Developers' ,
75
83
'License :: OSI Approved' ,
76
84
'Programming Language :: C' ,
77
- 'Programming Language :: Python' ,
85
+ 'Programming Language :: Python :: 3 ' ,
78
86
'Topic :: Software Development' ,
79
87
'Topic :: Scientific/Engineering' ,
80
88
'Operating System :: Microsoft :: Windows' ,
0 commit comments