Skip to content

clean --all should delete autogenerated <package>.egg-info directory #112

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

Closed
ghost opened this issue Nov 20, 2013 · 1 comment · Fixed by #3062
Closed

clean --all should delete autogenerated <package>.egg-info directory #112

ghost opened this issue Nov 20, 2013 · 1 comment · Fixed by #3062

Comments

@ghost
Copy link

ghost commented Nov 20, 2013

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.


@ghost
Copy link
Author

ghost commented Sep 13, 2014

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)

@ghost ghost added major bug labels Mar 29, 2016
jaraco added a commit that referenced this issue Jan 30, 2022
Fixes #112 install command doesn't use platform in nt_user scheme
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

0 participants