From c326f93bbb7241d7e4d5b0afa1f50a60efb3af67 Mon Sep 17 00:00:00 2001 From: Nguyễn Gia Phong Date: Wed, 4 Mar 2020 09:41:05 +0700 Subject: Redirect pygame message and add wiki to sdist --- brutalmaze/game.py | 4 +++- pyproject.toml | 3 ++- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/brutalmaze/game.py b/brutalmaze/game.py index f8c3cdd..e5670f8 100644 --- a/brutalmaze/game.py +++ b/brutalmaze/game.py @@ -21,13 +21,15 @@ __version__ = '0.9.0' import re from argparse import ArgumentParser, FileType, RawTextHelpFormatter from configparser import ConfigParser +from contextlib import redirect_stdout +from io import StringIO from math import atan2, radians, pi from os.path import join as pathjoin, pathsep from socket import socket, SOL_SOCKET, SO_REUSEADDR from sys import stdout from threading import Thread -import pygame +with redirect_stdout(StringIO()): import pygame from pygame import KEYDOWN, MOUSEBUTTONUP, QUIT, VIDEORESIZE from pygame.time import Clock, get_ticks from appdirs import AppDirs diff --git a/pyproject.toml b/pyproject.toml index 5be1f72..bed1ac4 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -28,4 +28,5 @@ license = 'AGPLv3+' brutalmaze = "brutalmaze.game:main" [tool.flit.sdist] -exclude = ['docs', 'wiki'] +include = ['wiki'] +exclude = ['docs'] -- cgit 1.4.1