Skip to content

WingIDE panel to ease the development of packages for setuptools and distutils

License

Notifications You must be signed in to change notification settings

luc-j-bourhis/WingIDE-setuptools

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

32 Commits
 
 
 
 
 
 

Repository files navigation

WingIDE tool for setuptools (and distutils)

WingIDE is a powerful Python IDE with advanced scripting capabilities. This repository features a custom panel which lets user build Python extensions. It supports extensions written in C or with Cython using Setuptools (or Distutils) setup.py. The panel collect errors and warnings in a table where they can be clicked to jump to the faulty line in the editor window. At the moment it is limited to in-place builds.

Build button

When the Build button is pressed, the following command is executed in the directory of the project file:

    python -u setup.py build_ext -i

where python is the Python executable for the current project. It is therefore required that there is a project and that there is a suitable setup.py sitting in the directory of that project file. An error dialogue is displayed if it is not so. Then

  • build errors are gathered and displayed in a list: clicking one of them opens an editor window displaying the faulty file with the faulty line highlighted;

  • the full text output by the build command is also displayed in another tab.

The panel currently detects Python errors, resulting from an incorrect setup.py, and errors or warnings from the following compilers:

Clean button

When the Clean button is pressed, the following command is executed in the directory of the project file:

    python -u setup.py clean -a

This Setuptools command does not clean the files inside the source directory generated by our in-place build. Therefore an extra cleaning is then performed, removing all shared libraries as well as all C or C++ files generated by Cython. The latter are detected by looking at a tailtale sign in the first line.

Warning: in the off-chance that you generated a C file from a Cython *.pyx file and then got rid of the latter to keep only the former, then you could loose that C file.

Commands

This panel add the following commands:

  • setuptools_build_in_place: this is the same action performed by the Build button;
  • setuptools_clean_all: this is the same action performed by the Clean button.

A keyboard shortcut may be assigned to any of them in the usual way, through Preferences > Keyboard > Custom Key Bindings.

About

WingIDE panel to ease the development of packages for setuptools and distutils

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages