...
 
Commits (8)
V 1.16.6:
- Fixed pypi uploading using twine
V 1.16.5:
- Fixed WSGI reloading for flask application
V 1.16.4:
......
......@@ -48,11 +48,15 @@ def main():
username = os.environ["PYPI_USERNAME"]
password = os.environ["PYPI_PASSWORD"]
repo = "pypitest" if test else "pypi"
if test:
repo = "https://test.pypi.org/legacy/"
else:
repo = "https://upload.pypi.org/legacy/"
process_call(["python", "setup.py", "bdist_wheel", "sdist"])
process_call(["twine", "upload",
"-r", repo,
"--repository-url", repo,
"-u", username,
"-p", password] + glob.glob("dist/*"))
......
......@@ -21,7 +21,7 @@ LICENSE"""
from typing import List
from base64 import b64decode
from colorama import Fore, Style
from subprocess import check_output, CalledProcessError
from subprocess import check_output, CalledProcessError, STDOUT
def process_call(command: List[str], ignore_error: bool = False) -> str:
......@@ -34,13 +34,14 @@ def process_call(command: List[str], ignore_error: bool = False) -> str:
"""
print(Fore.CYAN + " ".join(command) + Style.RESET_ALL)
if ignore_error:
try:
output = check_output(command).decode()
except CalledProcessError:
try:
output = check_output(command, stderr=STDOUT).decode()
except CalledProcessError as e:
if ignore_error:
output = "Error ignored during subprocess call"
else:
output = check_output(command).decode()
else:
print(Fore.RED + e.stdout.decode() + Style.RESET_ALL)
raise e
print(Fore.MAGENTA + output + Style.RESET_ALL)
return output.strip()
......
1.16.5
\ No newline at end of file
1.16.6
\ No newline at end of file