Skip to content

Running setup.py as a script and its use as a CLI tool are deprecated #2208

@Avasam

Description

@Avasam

https://packaging.python.org/en/latest/discussions/setup-py-deprecated/#is-setup-py-deprecated

python setup.py and the use of setup.py as a command line tool are deprecated

https://setuptools.pypa.io/en/latest/deprecated/commands.html#running-setuptools-commands

running python setup.py directly as a script is considered deprecated.

pywin32 itself should move away from it, I have yet to investigate everything needed for pywin32 to move away from it.

Relates to #2119

To stop using python setup.py, the --skip-verstamp flag needs to be changed. Either trying to pass it through:

Being able to build / install from pip install will open the door to:

  • Building / installing the latest in-development version directly from a GitHub branch Unable to install directly from Git via pip #2306
  • editable installs, which itself:
    • Allows developer to test/import modules directly from the repo https://setuptools.pypa.io/en/latest/userguide/development_mode.html
    • Helps static checkers be more aware of which files should be present, during development.
      // Too many dynamically generated modules. This will require type stubs to properly fix.
      "reportMissingImports": "warning",
      // IDEM, but happens when pywin32 is not in site-packages but module is found from typeshed.
      // TODO: Is intended to be fixed with an editable install
      // Since we're a library, and not user code, we care less about forgetting to install a dependency,
      // as long as we have its stubs. So just disabling for now is fine.
      "reportMissingModuleSource": "none",

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions