Skip to content

Commit

Permalink
no clean commmand
Browse files Browse the repository at this point in the history
  • Loading branch information
ax3l committed Oct 27, 2023
1 parent 2bf278e commit 1e3522b
Showing 1 changed file with 3 additions and 6 deletions.
9 changes: 3 additions & 6 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,8 @@
import sys

from setuptools import Extension, setup
import setuptools.command.build

Check notice

Code scanning / CodeQL

Unused import Note

Import of 'setuptools' is not used.
from setuptools.command.build_ext import build_ext
from setuptools.command.build_py import build_py as build
from setuptools.command.clean import clean


class CopyPreBuild(build):
Expand All @@ -25,10 +24,8 @@ def run(self):
# by default, this stays around. we want to make sure generated
# files like libwarpx.(1d|2d|rz|3d).(so|pyd) are always only the
# ones we want to package and not ones from an earlier wheel's stage
c = clean(self.distribution)
c.all = True
c.finalize_options()
c.run()
if os.path.exists(self.build_base):
shutil.rmtree(self.build_base)

# call superclass
build.run(self)
Expand Down

0 comments on commit 1e3522b

Please sign in to comment.