Originally reported by: infinity0 (Bitbucket: infinity0, GitHub: infinity0)
$ python setup.py clean --help
[..]
--all (-a) remove all build output, not just temporary by-products
I do not see any other way of deleting it via setup.py, so I have to do it manually on top of python setup.py clean --all. This is inconsistent with other build systems, and what Debian packaging expects.
_Original comment by_ neothemachine (Bitbucket: neothemachine, GitHub: neothemachine):
I just came across the same problem, I was actually even expecting that it would work with a plain clean, didn't know there was an --all option. In my case I include different package_data files depending on whether it's a source or binary distribution. That means, when I run bdist_wheel it leaves SOURCES.txt behind which is then read in again by sdist and this messes up everything. To fix that, I included the following hack in my setup.py:
#!python
cmdline = ''.join(sys.argv[1:])
if 'clean' in cmdline:
shutil.rmtree('projectname.egg-info', ignore_errors=True)
Most helpful comment
_Original comment by_ neothemachine (Bitbucket: neothemachine, GitHub: neothemachine):
I just came across the same problem, I was actually even expecting that it would work with a plain
clean, didn't know there was an--alloption. In my case I include differentpackage_datafiles depending on whether it's a source or binary distribution. That means, when I runbdist_wheelit leavesSOURCES.txtbehind which is then read in again by sdist and this messes up everything. To fix that, I included the following hack in my setup.py: