| 47 | description = "Build the package." |
| 48 | |
| 49 | def run(self): |
| 50 | try: |
| 51 | self.status("Removing previous builds…") |
| 52 | rmtree(dist_directory) |
| 53 | except OSError: |
| 54 | pass |
| 55 | |
| 56 | self.status("Building Source and Wheel (universal) distribution…") |
| 57 | self.system("{0} -m build --sdist --wheel .".format(sys.executable)) |
| 58 | |
| 59 | self.status("Checking wheel contents…") |
| 60 | self.system("check-wheel-contents dist/*.whl") |
| 61 | |
| 62 | self.status("Running twine check…") |
| 63 | self.system("{0} -m twine check dist/*".format(sys.executable)) |
| 64 | |
| 65 | |
| 66 | class UploadTestCommand(BaseCommand): |