55import re
66import sys
77import os
8- from distutils .command .sdist import sdist
98import setuptools
9+
10+ from distutils .command .sdist import sdist
11+
1012from numpy .distutils .core import setup
13+ from numpy .distutils .misc_util import Configuration
1114
1215
1316DISTNAME = 'sklearn-contrib-lightning'
1922MAINTAINER_EMAIL = 'mathieu@mblondel.org'
2023URL = 'https://github.com/scikit-learn-contrib/lightning'
2124LICENSE = 'new BSD'
22- DOWNLOAD_URL = URL
2325with open (os .path .join ('lightning' , '__init__.py' ), encoding = 'utf-8' ) as f :
2426 match = re .search (r'__version__[ ]*=[ ]*[\"\'](?P<version>.+)[\"\']' ,
2527 f .read ())
@@ -37,9 +39,15 @@ def configuration(parent_package='', top_path=None):
3739 if os .path .exists ('MANIFEST' ):
3840 os .remove ('MANIFEST' )
3941
40- from numpy .distutils .misc_util import Configuration
4142 config = Configuration (None , parent_package , top_path )
4243
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+
4351 config .add_subpackage ('lightning' )
4452
4553 return config
@@ -55,7 +63,7 @@ def configuration(parent_package='', top_path=None):
5563 setup (configuration = configuration ,
5664 name = DISTNAME ,
5765 maintainer = MAINTAINER ,
58- python_requires = '>={}' . format ( MIN_PYTHON_VERSION ) ,
66+ python_requires = f '>={ MIN_PYTHON_VERSION } ' ,
5967 install_requires = REQUIREMENTS ,
6068 include_package_data = True ,
6169 scripts = ["bin/lightning_train" ,
@@ -65,7 +73,7 @@ def configuration(parent_package='', top_path=None):
6573 license = LICENSE ,
6674 url = URL ,
6775 version = VERSION ,
68- download_url = DOWNLOAD_URL ,
76+ download_url = URL ,
6977 long_description = LONG_DESCRIPTION ,
7078 zip_safe = False , # the package can run out of an .egg file
7179 cmdclass = {"sdist" : sdist },
@@ -74,7 +82,7 @@ def configuration(parent_package='', top_path=None):
7482 'Intended Audience :: Developers' ,
7583 'License :: OSI Approved' ,
7684 'Programming Language :: C' ,
77- 'Programming Language :: Python' ,
85+ 'Programming Language :: Python :: 3 ' ,
7886 'Topic :: Software Development' ,
7987 'Topic :: Scientific/Engineering' ,
8088 'Operating System :: Microsoft :: Windows' ,
0 commit comments