Refactor setup.py #80327
Copy link
Copy link
Closed
Labels
3.8 (EOL)end of lifeend of lifebuildThe build process and cross-buildThe build process and cross-build
Description
Note: these values reflect the state of the issue at the time it was migrated and might not reflect the current state.
Show more details
GitHub fields:
assignee = None
closed_at = <Date 2019-03-01.17:23:18.722>
created_at = <Date 2019-02-28.15:37:34.103>
labels = ['build', '3.8']
title = 'Refactor setup.py'
updated_at = <Date 2019-04-09.16:41:29.438>
user = 'https://github.com/vstinner'bugs.python.org fields:
activity = <Date 2019-04-09.16:41:29.438>
actor = 'vstinner'
assignee = 'none'
closed = True
closed_date = <Date 2019-03-01.17:23:18.722>
closer = 'vstinner'
components = ['Build']
creation = <Date 2019-02-28.15:37:34.103>
creator = 'vstinner'
dependencies = []
files = []
hgrepos = []
issue_num = 36146
keywords = ['patch']
message_count = 12.0
messages = ['336841', '336851', '336919', '336923', '336926', '336927', '336935', '336938', '337019', '339761', '339774', '339776']
nosy_count = 2.0
nosy_names = ['vstinner', 'miss-islington']
pr_nums = ['12068', '12093', '12097', '12098', '12124', '12125', '12127', '12129', '12708', '12746']
priority = 'normal'
resolution = 'fixed'
stage = 'resolved'
status = 'closed'
superseder = None
type = None
url = 'https://bugs.python.org/issue36146'
versions = ['Python 3.8']Metadata
Metadata
Assignees
Labels
3.8 (EOL)end of lifeend of lifebuildThe build process and cross-buildThe build process and cross-build
Activity
vstinner commentedon Feb 28, 2019
The detect_modules() method of setup.py became longer and longer over
the years. It is now 1128 lines long. It's way too long: it becomes
very hard to track the lifetime of a variable and many variables are
overriden on purpose or not. Shorter functions help to track the
lifetime of variables, ease review and reduce the number of bugs.
vstinner commentedon Feb 28, 2019
New changeset 4cbea51 by Victor Stinner in branch 'master':
bpo-36146: Refactor setup.py (GH-12093)
4cbea51
vstinner commentedon Mar 1, 2019
New changeset 8058bda by Victor Stinner in branch 'master':
bpo-36146: Refactor setup.py: PyBuildExt.add() method (GH-12097)
8058bda
vstinner commentedon Mar 1, 2019
New changeset 625dbf2 by Victor Stinner in branch 'master':
bpo-36146: Refactor setup.py: Add PyBuildExt.srcdir (GH-12124)
625dbf2
vstinner commentedon Mar 1, 2019
New changeset 5ec33a1 by Victor Stinner in branch 'master':
bpo-36146: Split setup.py into subfunctions (GH-12125)
5ec33a1
vstinner commentedon Mar 1, 2019
New changeset c991f24 by Victor Stinner in branch 'master':
bpo-36146: Don't run code at setup.py top level (GH-12127)
c991f24
vstinner commentedon Mar 1, 2019
New changeset cfe172d by Victor Stinner in branch 'master':
bpo-36146: Add TEST_EXTENSIONS to setup.py (GH-12129)
cfe172d
vstinner commentedon Mar 1, 2019
Ok, I splitted my giant PR 12068 into multiple small commits. So they are easier to review and understand ;-) I close the issue.
vstinner commentedon Mar 2, 2019
New changeset 96d8158 by Victor Stinner in branch 'master':
bpo-36146: Fix inc_dirs in setup.py on macOS (GH-12098)
96d8158
miss-islington commentedon Apr 9, 2019
New changeset 2ee077f by Miss Islington (bot) (xdegaye) in branch 'master':
bpo-36544 : Fix regression introduced in bpo-36146 (GH-12708)
2ee077f
miss-islington commentedon Apr 9, 2019
New changeset 8abc3f4 by Miss Islington (bot) (Christian Heimes) in branch 'master':
bpo-36577: setup.py reports missing OpenSSL again (GH-12746)
8abc3f4
vstinner commentedon Apr 9, 2019
For the record, I introduced a regression which has been fixed in bpo-36544.