Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Cleaning build directory in setup.py

How could I make my setup.py pre-delete and post-delete the build directory?

like image 871
Ram Rachum Avatar asked Oct 20 '09 14:10

Ram Rachum


People also ask

How do you do a clean build in python?

In the Project tool window, right-click a project or directory, where Python compiled files should be deleted from. From the context menu, choose Clean Python compiled files. The . pyc and $py.

What is Install_requires in setup py?

install_requires is a section within the setup.py file in which you need to input a list of the minimum dependencies needed for a project to run correctly on the target operating system (such as ubuntu). When pip runs setup.py, it will install all of the dependencies listed in install_requires.

What does setup py Sdist do?

(assuming you haven't specified any sdist options in the setup script or config file), sdist creates the archive of the default format for the current platform. The default format is a gzip'ed tar file ( . tar. gz ) on Unix, and ZIP file on Windows.

What directory is setup py?

To install a package that includes a setup.py file, open a command or terminal window and: cd into the root directory where setup.py is located. Enter: python setup.py install.


1 Answers

Does this answer it? IIRC, you'll need to use the --all flag to get rid of stuff outside of build/lib:

python setup.py clean --all 
like image 169
Matt Ball Avatar answered Oct 06 '22 17:10

Matt Ball