Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Refactor setup.py #80327

Closed
vstinner opened this issue Feb 28, 2019 · 12 comments
Closed

Refactor setup.py #80327

vstinner opened this issue Feb 28, 2019 · 12 comments
Labels
3.8 only security fixes build The build process and cross-build

Comments

@vstinner
Copy link
Member

BPO 36146
Nosy @vstinner, @miss-islington
PRs
  • bpo-36146: Refactor setup.py #12068
  • bpo-36146: Refactor setup.py #12093
  • bpo-36146: Refactor setup.py: add add_ext() method #12097
  • bpo-36146: Fix inc_dirs in setup.py on macOS #12098
  • bpo-36146: Refactor setup.py: Add PyBuildExt.srcdir #12124
  • bpo-36146: Split setup.py into subfunctions #12125
  • bpo-36146: Don't run code at setup.py top level #12127
  • bpo-36146: Add TEST_EXTENSIONS to setup.py #12129
  • bpo-36544 : Fix regression introduced in bpo-36146 #12708
  • bpo-36577: setup.py reports missing OpenSSL again #12746
  • 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']

    @vstinner
    Copy link
    Member Author

    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 vstinner added 3.8 only security fixes build The build process and cross-build labels Feb 28, 2019
    @vstinner
    Copy link
    Member Author

    New changeset 4cbea51 by Victor Stinner in branch 'master':
    bpo-36146: Refactor setup.py (GH-12093)
    4cbea51

    @vstinner
    Copy link
    Member Author

    vstinner commented Mar 1, 2019

    New changeset 8058bda by Victor Stinner in branch 'master':
    bpo-36146: Refactor setup.py: PyBuildExt.add() method (GH-12097)
    8058bda

    @vstinner
    Copy link
    Member Author

    vstinner commented Mar 1, 2019

    New changeset 625dbf2 by Victor Stinner in branch 'master':
    bpo-36146: Refactor setup.py: Add PyBuildExt.srcdir (GH-12124)
    625dbf2

    @vstinner
    Copy link
    Member Author

    vstinner commented Mar 1, 2019

    New changeset 5ec33a1 by Victor Stinner in branch 'master':
    bpo-36146: Split setup.py into subfunctions (GH-12125)
    5ec33a1

    @vstinner
    Copy link
    Member Author

    vstinner commented 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
    Copy link
    Member Author

    vstinner commented Mar 1, 2019

    New changeset cfe172d by Victor Stinner in branch 'master':
    bpo-36146: Add TEST_EXTENSIONS to setup.py (GH-12129)
    cfe172d

    @vstinner
    Copy link
    Member Author

    vstinner commented 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 vstinner closed this as completed Mar 1, 2019
    @vstinner
    Copy link
    Member Author

    vstinner commented 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
    Copy link
    Contributor

    New changeset 2ee077f by Miss Islington (bot) (xdegaye) in branch 'master':
    bpo-36544 : Fix regression introduced in bpo-36146 (GH-12708)
    2ee077f

    @miss-islington
    Copy link
    Contributor

    New changeset 8abc3f4 by Miss Islington (bot) (Christian Heimes) in branch 'master':
    bpo-36577: setup.py reports missing OpenSSL again (GH-12746)
    8abc3f4

    @vstinner
    Copy link
    Member Author

    vstinner commented Apr 9, 2019

    For the record, I introduced a regression which has been fixed in bpo-36544.

    @ezio-melotti ezio-melotti transferred this issue from another repository Apr 10, 2022
    Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
    Labels
    3.8 only security fixes build The build process and cross-build
    Projects
    None yet
    Development

    No branches or pull requests

    2 participants