-
Notifications
You must be signed in to change notification settings - Fork 0
/
bs
executable file
·40 lines (30 loc) · 1.02 KB
/
bs
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
#!/usr/bin/env python
import os
import shlex
import sys
try: from bt import *
except: from __init__ import *
@task(source = ["README.md", "pyproject.toml", "*.py"], output = "dist")
def build():
rm("dist")
sh("python -m build")
@task
def documentation(command = "singlehtml", /):
from sphinx.cmd.build import main
rm(".documentation")
sys.stderr = sys.stdout
main(["-M", command, "documentation", ".documentation"])
@task(build)
def publish(): sh("twine upload -r pypi dist/*")
@task(build)
def publishTest(): sh("twine upload -r testpypi dist/*")
@task
def installEditable(): sh("pip install --user --break-system-packages -e .")
@task(build)
def install(): sh("pip install --user --break-system-packages dist/*.whl")
@task
def uninstall(): sh("pip uninstall --user --break-system-packages buildt")
@task
def download(): sh("pip install --user --break-system-packages --force-reinstall buildt")
@task
def downloadTest(): sh("pip install --user --break-system-packages --force-reinstall -i https://test.pypi.org/project buildt")