Reputation: 63546
This error occurs on line 31 as noted below when I run the following command according to these instructions. How am I getting multiple values for packages
?
python setup.py config_fc --fcompiler=gnu95 \
--f77flags='-fdefault-real-8' \
--f90flags='-fdefault-real-8' build
.
from numpy.distutils.misc_util import Configuration
from numpy.distutils.system_info import get_info
import os, sys
import sys
fflags= '-fdefault-real-8 -ffixed-form'
# TODO: Fix it so that these flags are default.
config = Configuration(
'glmnet',
parent_package=None,
top_path=None
)
f_sources = ['glmnet/glmnet.pyf','glmnet/glmnet.f']
config.add_extension(name='_glmnet',sources=f_sources)
config_dict = config.todict()
if __name__ == '__main__':
from numpy.distutils.core import setup
setup(version='1.1-5',
description='Python wrappers for the GLMNET package',
author='David Warde-Farley',
author_email='[email protected]',
url='github.com/dwf/glmnet-python',
license='GPL2',
requires=['NumPy (>= 1.3)'],
packages=['glmnet'], ### LINE 31
**config_dict)
Upvotes: 1
Views: 695
Reputation: 1121744
The Configuration(package_name).to_dict()
result already includes the packages=[package_name]
entry.
By including it in setup()
and in the config_dict
mapping, setup()
is supplied that keyword twice. You could remove it from the setup()
call (line 31):
setup(version='1.1-5',
description='Python wrappers for the GLMNET package',
author='David Warde-Farley',
author_email='[email protected]',
url='github.com/dwf/glmnet-python',
license='GPL2',
requires=['NumPy (>= 1.3)'],
**config_dict)
I see that the author of the package added the packages
line explicitly 4 years ago; I strongly suspect that the NumPy behaviour has since changed.
You should probably file a another issue with the project.
Upvotes: 2