This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

classification
Title: TypeError in ./setup.py
Type: compile error Stage:
Components: Build Versions: Python 3.5
process
Status: closed Resolution: works for me
Dependencies: Superseder:
Assigned To: Nosy List: ned.deily, serhiy.storchaka
Priority: normal Keywords: patch

Created on 2015-01-13 20:18 by serhiy.storchaka, last changed 2022-04-11 14:58 by admin. This issue is now closed.

Files
File name Uploaded Description Edit
setup_py_cflags_nodist.diff serhiy.storchaka, 2015-01-13 20:18 review
Messages (4)
msg233966 - (view) Author: Serhiy Storchaka (serhiy.storchaka) * (Python committer) Date: 2015-01-13 20:18
After updating outdated workspace to current sources I got following error:

$ make
Traceback (most recent call last):
  File "./setup.py", line 26, in <module>
    sysconfig.get_config_vars()['CFLAGS'] = cflags + ' ' + py_cflags_nodist
TypeError: Can't convert 'NoneType' object to str implicitly
make: *** [sharedmods] Error 1

`make distclean` doesn't help.

Here is a patch which fixes symptoms but may be right solution should change something other.
msg233970 - (view) Author: Ned Deily (ned.deily) * (Python committer) Date: 2015-01-13 22:10
The patch LGTM (it doesn't hurt) but I'm not sure under what circumstances anyone would run into this problem.  The only scenario I can think of is where somehow ./configure, Makefile, and setup.py are out-of-sync (not all at the same rev) and the Makefile should minimize the chances of that happening (for example, by automatically re-running configure).  Do you know of a way to reproduce it?
msg234133 - (view) Author: Serhiy Storchaka (serhiy.storchaka) * (Python committer) Date: 2015-01-16 14:48
On one of my computer on one workspace it is reproduced constantly, but I don't know how to reproduce it from clean checkout.
msg235995 - (view) Author: Serhiy Storchaka (serhiy.storchaka) * (Python committer) Date: 2015-02-14 22:02
It was old _sysconfigdata.py in the Lib/ directory. Now it is generated in build directory (build/lib.linux-i686-3.5 in my case). All works after removing Lib/_sysconfigdata.py.

This issue may be considered as misconfiguration. No fix needed.
History
Date User Action Args
2022-04-11 14:58:11adminsetgithub: 67422
2015-02-14 22:02:32serhiy.storchakasetstatus: open -> closed
resolution: works for me
messages: + msg235995
2015-01-16 14:48:31serhiy.storchakasetmessages: + msg234133
2015-01-13 22:10:19ned.deilysetnosy: + ned.deily
messages: + msg233970
2015-01-13 20:18:15serhiy.storchakacreate