Closed Bug 1712382 Opened 4 years ago Closed 4 years ago

`./mach clobber python` should remove virtualenvs

Categories

(Firefox Build System :: Mach Core, task)

task

Tracking

(firefox90 fixed)

RESOLVED FIXED
90 Branch
Tracking Status
firefox90 --- fixed

People

(Reporter: mhentges, Assigned: mhentges)

References

Details

Attachments

(4 files)

It's called ./mach clobber python, but it only deletes pyc files. Other python-related generated files (such as _virtualenvs) aren't deleted.

We no longer build and install native Python modules in
third_party/python, so purging that doesn't make sense anymore.

After that, all that's being purged is py[cdo] files and their parent
__pycache__ directories.

Also leans into argparse's choices argument, which should make
command migrations easier for consumers: "invalid choice: 'python'
(choose from 'gradle', 'pyc', 'objdir')".

Assignee: nobody → mhentges
Status: NEW → ASSIGNED
Attachment #9223033 - Attachment description: Bug 1712382: Rename `./mach clobber python` to `./mach clobber pyc` → WIP: Bug 1712382: Rename `./mach clobber python` to `./mach clobber pyc`
Attachment #9223033 - Attachment description: WIP: Bug 1712382: Rename `./mach clobber python` to `./mach clobber pyc` → Bug 1712382: Rename `./mach clobber python` to `./mach clobber pyc`
Attachment #9223033 - Attachment description: Bug 1712382: Rename `./mach clobber python` to `./mach clobber pyc` → Bug 1712382: Includes virtualenvs when clobbering Python
Summary: `./mach clobber python` should be `./mach clobber pyc` → `./mach clobber python` should remove virtualenvs

The setup.py action is no longer used, so we can safely remove it.

Depends on D115641

MACH_VIRTUALENV was never used, and MOZBUILD_VIRTUALENV was never
set (the virtualenv was always activated during the build, rather
than before).

Depends on D115913

Back-to-back ./mach clobber gradle invocations were failing
because shutil.rmtree(..) would complain that the target directory
didn't exist.

Pushed by mhentges@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/922cb1e35a9e Remove "setup.py" action support from virtualenvs r=ahal https://hg.mozilla.org/integration/autoland/rev/05c9e4f016fd Remove "set-variable" action support from virtualenvs r=ahal
Pushed by mhentges@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/c1bda584266e Includes virtualenvs when clobbering Python r=glandium https://hg.mozilla.org/integration/autoland/rev/9e0875e5c029 `./mach clobber gradle` works if directory already gone r=nalexander
See Also: → 1720113
Regressions: 1720113
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: