llvmlite icon indicating copy to clipboard operation
llvmlite copied to clipboard

clean ffi/build with setup.py clean

Open ARF1 opened this issue 5 years ago • 10 comments

Fixes #567

ARF1 avatar Apr 01 '20 08:04 ARF1

@ARF1 thanks for submitting this, I have labeled it as needing review for now.

esc avatar Apr 01 '20 20:04 esc

CI needs #903.

gmarkall avatar Feb 06 '23 11:02 gmarkall

@gmarkall thank you for adopting this. When is the ffi/build directory created:

I did:

$ python setup.py build
...
$ git status --ignored
On branch wip/fix_setup_clean
Untracked files:
	ffi/libllvmlite.dylib.dSYM/
	gitlog2changelog.py
	test.sh

Ignored files:
	build/
	ffi/libllvmlite.dylib
	ffi/libllvmlite.dylib.dSYM/Contents/Resources/
	llvmlite/binding/libllvmlite.dylib
$ python setup.py clean
/Users/esc/miniconda3-arm64/envs/llvmlite_3.10/lib/python3.10/site-packages/setuptools/dist.py:529: UserWarning: Normalizing '0.40.0dev0+54.gab202ba385' to '0.40.0.dev0+54.gab202ba385'
  warnings.warn(tmpl.format(**locals()))
running clean
removing '/Users/esc/git/llvmlite/__pycache__' (and everything under it)
$ git status --ignored
On branch wip/fix_setup_clean
Untracked files:
	ffi/libllvmlite.dylib.dSYM/
	gitlog2changelog.py
	test.sh

Ignored files:
	build/
	ffi/libllvmlite.dylib
	ffi/libllvmlite.dylib.dSYM/Contents/Resources/
	llvmlite/binding/libllvmlite.dylib

So I am not yet sure when the clean command is supposed to pickup ffi/build? Can you explain?

esc avatar Feb 06 '23 11:02 esc

It's created when using CMake to build. This happens on Windows, or if you build on Linux / macOS with the environment variable LLVMLITE_USE_CMAKE set to 1.

gmarkall avatar Feb 06 '23 11:02 gmarkall

@stuartarchibald thanks for catching that - now updated.

gmarkall avatar Feb 06 '23 14:02 gmarkall

I also spotted that the clean command leaves .dll and .dylib files lying around. Testing the clean command on Windows:

(numbadev) PS C:\Users\gmarkall\work\numbadev\llvmlite> python setup.py clean
C:\Users\gmarkall\Miniconda3\envs\numbadev\lib\site-packages\setuptools\dist.py:487: UserWarning: Normalizing '0.40.0dev0+58.g8300243' to '0.40.0.dev0+58.g8300243'
  warnings.warn(tmpl.format(**locals()))
running clean
removing 'C:\Users\gmarkall\work\numbadev\llvmlite\llvmlite.egg-info' (and everything under it)
removing 'C:\Users\gmarkall\work\numbadev\llvmlite\llvmlite\binding\llvmlite.dll'
removing 'C:\Users\gmarkall\work\numbadev\llvmlite\ffi\build' (and everything under it)
removing 'C:\Users\gmarkall\work\numbadev\llvmlite\llvmlite\__pycache__' (and everything under it)
removing 'C:\Users\gmarkall\work\numbadev\llvmlite\__pycache__' (and everything under it)

After running the command, there is nothing left:

(numbadev) PS C:\Users\gmarkall\work\numbadev\llvmlite> git status --ignored
On branch wip/fix_setup_clean
Your branch is up to date with 'ARF1/wip/fix_setup_clean'.

nothing to commit, working tree clean

gmarkall avatar Feb 07 '23 11:02 gmarkall

@stuartarchibald I think this should be ready for another look now.

gmarkall avatar Feb 07 '23 11:02 gmarkall

@gmarkall do you want to pickup work on this again? I think it got reasonably far and just needs a few more lines?

esc avatar Jun 09 '23 11:06 esc

@esc I'm not able to pick this up again in the short term. If you're aiming to tidy up the PRs and reduce the number of things open, I don't mind if you'd prefer to close / abandon this.

gmarkall avatar Jun 09 '23 12:06 gmarkall

@gmarkall it would be a shame to abandon this since it's fairly close to finish. I've placed it on the contributor self-service board, who knows, maybe we get lucky.

esc avatar Jun 28 '23 12:06 esc