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.

Title: Don’t fail silently if ext_modules use absolute paths
Type: behavior Stage: resolved
Components: Distutils Versions: Python 3.4, Python 3.5, Python 2.7
Status: closed Resolution: out of date
Dependencies: 5977 Superseder:
Assigned To: eric.araujo Nosy List: dstufft, eric.araujo, indiedan, steve.dower, tarek, vstinner
Priority: normal Keywords: patch

Created on 2010-07-21 14:05 by indiedan, last changed 2022-04-11 14:57 by admin. This issue is now closed.

File name Uploaded Description Edit
d1-ext-absolute-sources-9322.diff eric.araujo, 2011-09-12 16:24 review
Messages (6)
msg111058 - (view) Author: Dan OD (indiedan) Date: 2010-07-21 14:05
Setting absolute paths for C source code files in breaks bdist_rpm

ext_modules=[Extension('foo', [os.path.abspath('src/foo.c')])],

results in bdist_rpm not including src/foo.c in the RPM, however

ext_modules=[Extension('foo', ['src/foo.c'])],

works just fine.
msg111062 - (view) Author: Éric Araujo (eric.araujo) * (Python committer) Date: 2010-07-21 14:23
Examples in the documentation only use relative paths, so in my opinion the bug here is the silent failure.

Do absolute paths work for sdist or other bdists?
msg111065 - (view) Author: Dan OD (indiedan) Date: 2010-07-21 14:28
I'm still ironing out the crinkles, but this has been working for

build (/install)

unfortunately I don't have access to a Windows machine to test the other two. A non-silent warning/error would keep me happy.
msg143919 - (view) Author: Éric Araujo (eric.araujo) * (Python committer) Date: 2011-09-12 16:24
I started to work on a simple patch but it makes one of our tests fail.  It uses absolute paths because it needs to change directory and check that get_outputs works.
msg348611 - (view) Author: STINNER Victor (vstinner) * (Python committer) Date: 2019-07-29 11:28
This issue is 9 years old has a patch: it's far from being "newcomer friendly", I remove the "Easy" label.
msg386282 - (view) Author: Steve Dower (steve.dower) * (Python committer) Date: 2021-02-03 18:10
Distutils is now deprecated (see PEP 632) and all tagged issues are being closed. From now until removal, only release blocking issues will be considered for distutils.

If this issue does not relate to distutils, please remove the component and reopen it. If you believe it still requires a fix, most likely the issue should be re-reported at
Date User Action Args
2022-04-11 14:57:04adminsetgithub: 53568
2021-02-03 18:10:49steve.dowersetstatus: open -> closed

nosy: + steve.dower
messages: + msg386282

resolution: out of date
stage: needs patch -> resolved
2019-07-29 11:28:33vstinnersetkeywords: - easy
nosy: + vstinner
messages: + msg348611

2014-06-28 14:18:22BreamoreBoysetnosy: + dstufft

components: - Distutils2
versions: + Python 3.4, Python 3.5, - 3rd party, Python 3.2, Python 3.3
2011-09-12 16:24:19eric.araujosetfiles: + d1-ext-absolute-sources-9322.diff
versions: + Python 3.3, - Python 3.1
messages: + msg143919

dependencies: + distutils build_ext.get_outputs returns wrong result
keywords: + patch
2010-12-15 23:12:00eric.araujosetkeywords: + easy
nosy: tarek, eric.araujo, indiedan
2010-11-12 00:51:11eric.araujosettitle: bdist_rpm ext_modules absolute source path fail -> Don’t fail silently if ext_modules use absolute paths
nosy: tarek, eric.araujo, indiedan
versions: + 3rd party, Python 3.1, Python 3.2
assignee: tarek -> eric.araujo
components: + Distutils2
stage: needs patch
2010-07-21 14:28:11indiedansetmessages: + msg111065
2010-07-21 14:23:36eric.araujosetnosy: + eric.araujo
messages: + msg111062
2010-07-21 14:05:28indiedancreate