-
Notifications
You must be signed in to change notification settings - Fork 329
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
clean ffi/build with setup.py clean #569
base: main
Are you sure you want to change the base?
Conversation
@ARF1 thanks for submitting this, I have labeled it as needing review for now. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I've merged main
here and given this a test. It appears to do exactly as intended. For example now when running python setup.py clean
we see:
$ python setup.py clean
/home/gmarkall/mambaforge/envs/numbadev/lib/python3.10/site-packages/setuptools/dist.py:493: UserWarning: Normalizing '0.40.0dev0+54.gab202ba' to '0.40.0.dev0+54.gab202ba'
warnings.warn(tmpl.format(**locals()))
running clean
removing '/home/gmarkall/numbadev/llvmlite/llvmlite.egg-info' (and everything under it)
removing '/home/gmarkall/numbadev/llvmlite/ffi/build' (and everything under it)
removing '/home/gmarkall/numbadev/llvmlite/llvmlite/__pycache__' (and everything under it)
removing '/home/gmarkall/numbadev/llvmlite/__pycache__' (and everything under it)
ffi/build
is removed.
This needs a quick second review as I made a change to the super()
idiom used to call super().run()
but otherwise I think this is good to go.
CI needs #903. |
@gmarkall thank you for adopting this. When is the I did:
So I am not yet sure when the |
It's created when using CMake to build. This happens on Windows, or if you build on Linux / macOS with the environment variable |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for continuing with this @gmarkall. I think there's a hard coded path separator that needs changing, then I guess the check as described above needs to be redone (the cmake
related build on windows).
Co-authored-by: stuartarchibald <[email protected]>
@stuartarchibald thanks for catching that - now updated. |
I also spotted that the clean command leaves
After running the command, there is nothing left:
|
@stuartarchibald I think this should be ready for another look now. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I have checked the following:
💣 zsh» git status --ignored
On branch wip/fix_setup_clean
Untracked files:
gitlog2changelog.py
test.sh
nothing added to commit but untracked files present
💣 zsh» python setup.py build
...
💣 zsh» git status --ignored
On branch wip/fix_setup_clean
Untracked files:
ffi/libllvmlite.dylib.dSYM/
gitlog2changelog.py
test.sh
Ignored files:
__pycache__/
build/
ffi/libllvmlite.dylib
ffi/libllvmlite.dylib.dSYM/Contents/Resources/
llvmlite/__pycache__/
llvmlite/binding/libllvmlite.dylib
nothing added to commit but untracked files present
💣 zsh» python setup.py clean
...
💣 zsh» git status --ignored
On branch wip/fix_setup_clean
Untracked files:
ffi/libllvmlite.dylib.dSYM/
gitlog2changelog.py
test.sh
Ignored files:
build/
nothing added to commit but untracked files present
So, only the build
and ffi/libllvmlite.dylib.dSYM` remains. They contain:
💣 zsh» tree ffi/libllvmlite.dylib.dSYM/
ffi/libllvmlite.dylib.dSYM/
└── Contents
├── Info.plist
└── Resources
└── DWARF
3 directories, 1 file
💣 zsh» tree build
build
└── lib.macosx-11.1-arm64-cpython-310
└── llvmlite
├── __init__.py
├── _version.py
├── binding
│ ├── __init__.py
│ ├── analysis.py
│ ├── common.py
│ ├── context.py
│ ├── dylib.py
│ ├── executionengine.py
│ ├── ffi.py
│ ├── initfini.py
│ ├── linker.py
│ ├── module.py
│ ├── object_file.py
│ ├── options.py
│ ├── passmanagers.py
│ ├── targets.py
│ ├── transforms.py
│ └── value.py
├── ir
│ ├── __init__.py
│ ├── _utils.py
│ ├── builder.py
│ ├── context.py
│ ├── instructions.py
│ ├── module.py
│ ├── transforms.py
│ ├── types.py
│ └── values.py
├── tests
│ ├── __init__.py
│ ├── __main__.py
│ ├── customize.py
│ ├── refprune_proto.py
│ ├── test_binding.py
│ ├── test_ir.py
│ ├── test_refprune.py
│ ├── test_setup.py
│ └── test_valuerepr.py
└── utils.py
5 directories, 37 files
Would it be reasonable to assume that a clean
command would remove those files also?
@gmarkall do you want to pickup work on this again? I think it got reasonably far and just needs a few more lines? |
@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 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. |
Fixes #567